/**
 * IJ Black Friday — Core design tokens, shared components & motion utilities.
 * Loaded on both the landing page and slider widgets.
 */

@property --bf-a {
	syntax: '<angle>';
	initial-value: 0deg;
	inherits: false;
}

:root {
	--bf-font: 'IranSansXV', 'IRANSansXV', 'IRANSans', Tahoma, system-ui, -apple-system, sans-serif;
	--bf-bg: #07070b;
	--bf-surface: #12121a;
	--bf-surface-2: #1b1b26;
	--bf-accent: #ffb81f;
	--bf-hot: #ff2d78;
	--bf-cool: #2ec4ff;
	--bf-text: #f4f4f8;
	--bf-muted: #a3a3b8;
	--bf-border: rgba(255, 255, 255, .1);
	--bf-grad: linear-gradient(135deg, var(--bf-accent) 0%, var(--bf-hot) 52%, var(--bf-cool) 100%);
	--bf-ease: cubic-bezier(.22, 1, .36, 1);
	--bf-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
	--bf-speed: 1.25s;
	--bf-delay: 0s;
	--bf-radius: 20px;
}

/* Scoped base */
.bf-w,
.bf-sl {
	font-family: var(--bf-font);
	color: var(--bf-text);
	line-height: 1.65;
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}
.bf-w *,
.bf-w *::before,
.bf-w *::after,
.bf-sl *,
.bf-sl *::before,
.bf-sl *::after {
	box-sizing: border-box;
}
.bf-w a,
.bf-sl a {
	color: inherit;
	text-decoration: none;
}
.bf-w button,
.bf-sl button {
	font-family: inherit;
	color: inherit;
	cursor: pointer;
}
.bf-w img,
.bf-sl img {
	max-width: 100%;
	height: auto;
	display: block;
}
.bf-w :focus-visible,
.bf-sl :focus-visible {
	outline: 2px solid var(--bf-cool);
	outline-offset: 3px;
}

/* Containers */
.bf-container {
	width: min(1320px, 100% - 32px);
	margin-inline: auto;
}
.bf-container--narrow {
	width: min(860px, 100% - 32px);
}

/* Eyebrow & Section headings */
.bf-eyebrow {
	display: inline-block;
	font-size: .82rem;
	font-weight: 700;
	color: var(--bf-accent);
	margin-bottom: 8px;
}
.bf-sec__head {
	text-align: center;
	max-width: 680px;
	margin: 0 auto 24px;
}
.bf-sec__title {
	margin: 0 0 10px;
	font-size: clamp(1.65rem, 3.1vw, 2.45rem);
	font-weight: 850;
	line-height: 1.25;
	color: var(--bf-text);
}
.bf-sec__sub {
	margin: 0;
	color: var(--bf-muted);
	font-size: clamp(.94rem, 1.3vw, 1.06rem);
}

/* Buttons */
.bf-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: 12px 26px;
	border-radius: 14px;
	font-size: .96rem;
	font-weight: 750;
	border: 1px solid transparent;
	overflow: hidden;
	isolation: isolate;
	transition: translate .35s var(--bf-ease), box-shadow .35s var(--bf-ease), border-color .35s var(--bf-ease), background-color .35s var(--bf-ease);
}
.bf-btn--primary {
	background: linear-gradient(135deg, var(--bf-accent), #ff9100);
	color: #0b0b12;
	box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--bf-accent) 60%, transparent);
}
.bf-btn--primary:hover {
	translate: 0 -2px;
	box-shadow: 0 16px 38px -6px color-mix(in srgb, var(--bf-accent) 75%, transparent);
}
.bf-btn--hot {
	background: linear-gradient(135deg, var(--bf-hot), #c41463);
	color: #fff;
	box-shadow: 0 10px 30px -8px color-mix(in srgb, var(--bf-hot) 60%, transparent);
}
.bf-btn--hot:hover {
	translate: 0 -2px;
	box-shadow: 0 16px 38px -6px color-mix(in srgb, var(--bf-hot) 78%, transparent);
}
.bf-btn--glass,
.bf-btn--ghost {
	background: rgba(255, 255, 255, .05);
	border-color: rgba(255, 255, 255, .16);
	color: var(--bf-text);
	backdrop-filter: blur(12px);
}
.bf-btn--glass:hover,
.bf-btn--ghost:hover {
	translate: 0 -2px;
	border-color: color-mix(in srgb, var(--bf-cool) 65%, #fff);
	background: rgba(255, 255, 255, .1);
	box-shadow: 0 10px 28px -10px color-mix(in srgb, var(--bf-cool) 55%, transparent);
}
.bf-btn--shine::after {
	content: '';
	position: absolute;
	inset: 0;
	width: 45%;
	background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, .55) 50%, transparent 80%);
	transform: translateX(260%) skewX(-20deg);
	transition: transform .8s var(--bf-ease);
	pointer-events: none;
}
.bf-btn--shine:hover::after {
	transform: translateX(-260%) skewX(-20deg);
}

/* Rotating conic-gradient neon border */
.bf-border-run {
	position: relative;
	border-radius: var(--bf-radius);
	padding: 1.5px;
	background: conic-gradient(from var(--bf-a), var(--bf-accent), var(--bf-hot), var(--bf-cool), var(--bf-accent));
	animation: bf-spin-angle 5s linear infinite;
}
@supports not (background: conic-gradient(from 0deg, red, blue)) {
	.bf-border-run {
		background: var(--bf-grad);
	}
}
@keyframes bf-spin-angle {
	to { --bf-a: 360deg; }
}

/* Festival Countdown Timer */
.bf-timer-wrap {
	display: inline-flex;
	flex-direction: column;
	gap: 10px;
}
.bf-timer__label {
	font-size: .92rem;
	font-weight: 700;
	color: var(--bf-muted);
}
.bf-timer {
	display: inline-flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 8px;
}
.bf-timer__cell {
	min-width: 74px;
	padding: 10px 12px;
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03));
	border: 1px solid rgba(255, 255, 255, .13);
	backdrop-filter: blur(14px);
	text-align: center;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 12px 28px -14px rgba(0, 0, 0, .8);
}
.bf-timer__num {
	display: block;
	font-size: clamp(1.55rem, 3.2vw, 2.4rem);
	font-weight: 850;
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
	color: var(--bf-accent);
	text-shadow: 0 0 18px color-mix(in srgb, var(--bf-accent) 45%, transparent);
}
.bf-timer__unit {
	display: block;
	font-size: .74rem;
	color: var(--bf-muted);
	margin-top: 2px;
}
.bf-timer__sep {
	font-size: 1.6rem;
	font-weight: 800;
	color: var(--bf-hot);
	animation: bf-blink 1.2s steps(2, start) infinite;
}
.bf-timer--sm .bf-timer__cell {
	min-width: 62px;
	padding: 8px 10px;
}
.bf-timer--sm .bf-timer__num {
	font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}
.bf-timer__post {
	padding: 12px 18px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .14);
	font-weight: 700;
	color: var(--bf-accent);
}
@keyframes bf-blink {
	50% { opacity: .25; }
}

/* Product Card (Landing: Daily & Tabs — independent of Byno) */
.bf-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: linear-gradient(165deg, rgba(27, 27, 38, .92), rgba(14, 14, 22, .96));
	border: 1px solid var(--bf-border);
	border-radius: 22px;
	padding: 14px;
	overflow: hidden;
	isolation: isolate;
	animation: bf-card-in .65s var(--bf-ease) var(--ci-d, 0s) backwards;
	transition: translate .35s var(--bf-ease), border-color .35s var(--bf-ease), box-shadow .35s var(--bf-ease);
}
@keyframes bf-card-in {
	from { opacity: 0; translate: 0 22px; }
	to { opacity: 1; translate: 0 0; }
}
.bf-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 20%), color-mix(in srgb, var(--bf-accent) 16%, transparent), transparent 65%);
	opacity: 0;
	transition: opacity .35s var(--bf-ease);
	pointer-events: none;
	z-index: 0;
}
@media (hover: hover) and (pointer: fine) {
	.bf-card:hover {
		translate: 0 -6px;
		border-color: color-mix(in srgb, var(--bf-accent) 55%, transparent);
		box-shadow: 0 22px 44px -18px rgba(0, 0, 0, .85), 0 0 24px -10px color-mix(in srgb, var(--bf-accent) 45%, transparent);
	}
	.bf-card:hover::before {
		opacity: 1;
	}
}
.bf-card > * {
	position: relative;
	z-index: 1;
}
.bf-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	background: radial-gradient(circle at 50% 45%, rgba(46, 196, 255, .14), rgba(7, 7, 11, .7) 75%);
	display: grid;
	place-items: center;
	padding: 14px;
	margin-bottom: 12px;
	overflow: hidden;
}
.bf-card__img {
	max-height: 100%;
	max-width: 100%;
	object-fit: contain;
	filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .6));
	transition: scale .45s var(--bf-ease), rotate .45s var(--bf-ease);
}
@media (hover: hover) {
	.bf-card:hover .bf-card__img {
		scale: 1.07;
		rotate: -2deg;
	}
}
.bf-badge-off {
	position: absolute;
	top: 10px;
	left: 10px;
	padding: 4px 10px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--bf-hot), #d61466);
	color: #fff;
	font-size: .8rem;
	font-weight: 850;
	box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--bf-hot) 70%, transparent);
	z-index: 2;
}
.bf-ribbon-out {
	position: absolute;
	inset: 0;
	background: rgba(7, 7, 11, .62);
	display: grid;
	place-items: center;
	z-index: 3;
}
.bf-ribbon-out span {
	padding: 6px 18px;
	border-radius: 999px;
	background: rgba(20, 20, 30, .92);
	border: 1px solid rgba(255, 255, 255, .2);
	font-weight: 800;
	font-size: .88rem;
	color: var(--bf-muted);
}
.bf-card__title {
	margin: 0 0 10px;
	font-size: .95rem;
	font-weight: 700;
	line-height: 1.45;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.9em;
}
.bf-card__prices {
	margin-top: auto;
	margin-bottom: 10px;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.bf-price-old {
	font-size: .8rem;
	color: var(--bf-muted);
	text-decoration: line-through;
	opacity: .8;
}
.bf-price-now {
	font-size: 1.12rem;
	font-weight: 850;
	color: var(--bf-accent);
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
}
.bf-price-now small {
	font-size: .74rem;
	font-weight: 600;
	color: var(--bf-muted);
}
.bf-price-lock {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.bf-price-lock__blur {
	display: inline-block;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--bf-accent);
	filter: blur(7px);
	user-select: none;
	pointer-events: none;
}
.bf-price-lock__txt {
	font-size: .74rem;
	color: var(--bf-cool);
	font-weight: 600;
}

/* Stock bar */
.bf-stock {
	margin-bottom: 10px;
}
.bf-stock__row {
	display: flex;
	justify-content: space-between;
	font-size: .75rem;
	color: var(--bf-muted);
	margin-bottom: 5px;
}
.bf-stock__bar {
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .09);
	overflow: hidden;
}
.bf-stock__fill {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: linear-gradient(90deg, var(--bf-accent), var(--bf-hot));
	transition: width .5s var(--bf-ease);
}
.bf-stock.is-low .bf-stock__row {
	color: var(--bf-hot);
	font-weight: 750;
	animation: bf-pulse 1.8s ease-in-out infinite;
}
.bf-stock.is-low .bf-stock__fill {
	background: linear-gradient(90deg, var(--bf-hot), #ff5c99);
	box-shadow: 0 0 12px color-mix(in srgb, var(--bf-hot) 65%, transparent);
}

/* Card timer */
.bf-ctimer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .07);
	font-size: .75rem;
	color: var(--bf-muted);
	margin-bottom: 10px;
}
.bf-ctimer__val {
	font-weight: 800;
	color: var(--bf-cool);
	font-variant-numeric: tabular-nums;
	direction: ltr;
}
.bf-card__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 14px;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--bf-accent), #ff9800);
	color: #0b0b12;
	font-size: .88rem;
	font-weight: 800;
	transition: translate .3s var(--bf-ease), box-shadow .3s var(--bf-ease);
}
.bf-card__cta:hover {
	translate: 0 -2px;
	box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--bf-accent) 70%, transparent);
}
.bf-card__cta.is-disabled {
	background: rgba(255, 255, 255, .07);
	color: var(--bf-muted);
	pointer-events: none;
	cursor: default;
	box-shadow: none;
}
.bf-card.is-out,
.bf-card.is-ended {
	opacity: .62;
	filter: saturate(.55);
}

/* Empty & Skeletons */
.bf-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 46px 20px;
	border-radius: 20px;
	background: rgba(255, 255, 255, .03);
	border: 1px dashed rgba(255, 255, 255, .14);
	color: var(--bf-muted);
	font-size: 1rem;
}
.bf-sk {
	border-radius: 22px;
	min-height: 360px;
	background: linear-gradient(110deg, rgba(255, 255, 255, .04) 25%, rgba(255, 255, 255, .09) 45%, rgba(255, 255, 255, .04) 65%);
	background-size: 220% 100%;
	animation: bf-shimmer 1.6s linear infinite;
}
.bf-sk--basket { min-height: 290px; }
.bf-sk--poster { min-height: 410px; flex: 0 0 270px; }
@keyframes bf-shimmer {
	to { background-position: -220% 0; }
}

/* ==========================================================================
   Ready-made Motion & Effect Utility Classes (documented in README)
   ========================================================================== */
.bf-js .bf-reveal,
.bf-js .bf-reveal-left,
.bf-js .bf-reveal-right,
.bf-js .bf-reveal-zoom,
.bf-js .bf-reveal-blur {
	opacity: 0;
	transition-property: opacity, transform, filter;
	transition-duration: var(--bf-speed, 1.25s);
	transition-timing-function: var(--bf-ease);
	transition-delay: var(--bf-delay, 0s);
}
.bf-js .bf-reveal { transform: translateY(34px); }
.bf-js .bf-reveal-left { transform: translateX(-42px); }
.bf-js .bf-reveal-right { transform: translateX(42px); }
.bf-js .bf-reveal-zoom { transform: scale(.9); }
.bf-js .bf-reveal-blur { filter: blur(12px); transform: translateY(18px); }

.bf-js .bf-reveal.is-in,
.bf-js .bf-reveal-left.is-in,
.bf-js .bf-reveal-right.is-in,
.bf-js .bf-reveal-zoom.is-in,
.bf-js .bf-reveal-blur.is-in {
	opacity: 1;
	transform: none;
	filter: none;
}

.bf-js .bf-stagger > * {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 1.1s var(--bf-ease), transform 1.1s var(--bf-ease);
}
.bf-js .bf-stagger.is-in > * { opacity: 1; transform: none; }
.bf-js .bf-stagger.is-in > *:nth-child(1) { transition-delay: .05s; }
.bf-js .bf-stagger.is-in > *:nth-child(2) { transition-delay: .14s; }
.bf-js .bf-stagger.is-in > *:nth-child(3) { transition-delay: .23s; }
.bf-js .bf-stagger.is-in > *:nth-child(4) { transition-delay: .32s; }
.bf-js .bf-stagger.is-in > *:nth-child(5) { transition-delay: .41s; }
.bf-js .bf-stagger.is-in > *:nth-child(6) { transition-delay: .50s; }
/* Release delay after reveal so hover transitions stay instant */
.bf-js .bf-stagger.bf-done > * { transition-delay: 0s !important; }

.bf-slow { --bf-speed: 1.6s; }
.bf-slower { --bf-speed: 2.1s; }
.bf-delay-1 { --bf-delay: .12s; }
.bf-delay-2 { --bf-delay: .24s; }
.bf-delay-3 { --bf-delay: .36s; }
.bf-delay-4 { --bf-delay: .48s; }
.bf-delay-5 { --bf-delay: .60s; }

/* Continuous animations (keep on transform; interactive effects use translate/scale) */
.bf-float { animation: bf-float 5.2s ease-in-out infinite; }
.bf-float-slow { animation: bf-float 7.4s ease-in-out infinite; }
.bf-float-fast { animation: bf-float 3.4s ease-in-out infinite; }
@keyframes bf-float {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-12px); }
}
.bf-pulse { animation: bf-pulse 2.2s ease-in-out infinite; }
@keyframes bf-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: .62; }
}
.bf-heartbeat { animation: bf-heartbeat 1.8s ease-in-out infinite; }
@keyframes bf-heartbeat {
	0%, 100% { transform: scale(1); }
	14% { transform: scale(1.07); }
	28% { transform: scale(1); }
	42% { transform: scale(1.05); }
}
.bf-wiggle { animation: bf-wiggle 3.2s ease-in-out infinite; }
@keyframes bf-wiggle {
	0%, 88%, 100% { transform: rotate(0); }
	92% { transform: rotate(-4deg); }
	96% { transform: rotate(4deg); }
}
.bf-spin-slow { animation: bf-spin 18s linear infinite; }
@keyframes bf-spin {
	to { transform: rotate(360deg); }
}

/* Neon & Glow */
.bf-neon-text {
	color: var(--bf-accent);
	text-shadow: 0 0 14px color-mix(in srgb, var(--bf-accent) 65%, transparent), 0 0 34px color-mix(in srgb, var(--bf-hot) 35%, transparent);
}
.bf-glow {
	box-shadow: 0 0 28px -6px color-mix(in srgb, var(--bf-accent) 55%, transparent);
}
.bf-gradient-text {
	background: var(--bf-grad);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: bf-grad-shift 6s ease-in-out infinite alternate;
}
@keyframes bf-grad-shift {
	from { background-position: 0% 50%; }
	to { background-position: 100% 50%; }
}
.bf-shimmer {
	position: relative;
	overflow: hidden;
}
.bf-shimmer::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .28) 50%, transparent 65%);
	animation: bf-sheen 3.6s ease-in-out infinite;
	pointer-events: none;
}
@keyframes bf-sheen {
	0% { transform: translateX(130%); }
	45%, 100% { transform: translateX(-130%); }
}

/* Interactive helpers (use independent translate so transform animations don't collide) */
.bf-hover-lift {
	transition: translate .35s var(--bf-ease), border-color .35s var(--bf-ease), box-shadow .35s var(--bf-ease);
}
@media (hover: hover) {
	.bf-hover-lift:hover { translate: 0 -6px; }
	.bf-hover-glow:hover {
		border-color: color-mix(in srgb, var(--bf-accent) 55%, transparent);
		box-shadow: 0 18px 40px -16px color-mix(in srgb, var(--bf-accent) 50%, transparent);
	}
}
.bf-marquee {
	overflow: hidden;
	white-space: nowrap;
}
.bf-marquee > * {
	display: inline-block;
	animation: bf-marq 22s linear infinite;
}
@keyframes bf-marq {
	from { transform: translateX(0); }
	to { transform: translateX(50%); }
}

/* Elementor Editor: force reveals visible */
.elementor-editor-active .bf-reveal,
.elementor-editor-active .bf-reveal-left,
.elementor-editor-active .bf-reveal-right,
.elementor-editor-active .bf-reveal-zoom,
.elementor-editor-active .bf-reveal-blur,
.elementor-editor-active .bf-stagger > *,
.elementor-editor-active .bf-hero-in {
	opacity: 1 !important;
	transform: none !important;
	filter: none !important;
	animation: none !important;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.bf-js .bf-reveal,
	.bf-js .bf-reveal-left,
	.bf-js .bf-reveal-right,
	.bf-js .bf-reveal-zoom,
	.bf-js .bf-reveal-blur,
	.bf-js .bf-stagger > * {
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
	}
}
