/**
 * Mega Savings — Hero banner styles.
 *
 * CSS-only design: gradient background, chunky display type, decorative
 * SVG sale-tag composition, ambient motion. Loaded only on the
 * /product-category/mega-savings/ archive via inc/mega-savings/assets-enqueue.php.
 *
 * Logical properties throughout for clean RTL flip. Tajawal stack for AR.
 */

.asi-mega-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	border-radius: var(--asi-archive-radius, 18px);
	margin-block-end: clamp(1.75rem, 3.5vw, 2.75rem);
	color: #fff;
	background:
		radial-gradient(120% 80% at 100% 0%, rgba(255, 209, 102, 0.22), transparent 60%),
		radial-gradient(80% 60% at 0% 100%, rgba(114, 185, 74, 0.16), transparent 55%),
		linear-gradient(135deg, #0155B7 0%, #013A7A 55%, #062043 100%);
	box-shadow: 0 20px 50px -28px rgba(1, 58, 122, 0.55);
}

/* Ambient orbs — drifting blurred colour blobs that bring the surface to life. */
.asi-mega-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	z-index: 0;
}

.asi-mega-hero__orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(60px);
	opacity: 0.55;
	mix-blend-mode: screen;
	will-change: transform;
}

.asi-mega-hero__orb--1 {
	inline-size: 360px;
	block-size: 360px;
	inset-inline-end: -80px;
	inset-block-start: -120px;
	background: radial-gradient(circle, #F59E0B 0%, transparent 70%);
	animation: asi-mega-drift-a 14s ease-in-out infinite;
}

.asi-mega-hero__orb--2 {
	inline-size: 280px;
	block-size: 280px;
	inset-inline-start: 20%;
	inset-block-end: -100px;
	background: radial-gradient(circle, #72B94A 0%, transparent 70%);
	animation: asi-mega-drift-b 18s ease-in-out infinite;
}

.asi-mega-hero__orb--3 {
	inline-size: 220px;
	block-size: 220px;
	inset-inline-start: -60px;
	inset-block-start: 30%;
	background: radial-gradient(circle, #38BDF8 0%, transparent 70%);
	animation: asi-mega-drift-c 16s ease-in-out infinite;
	opacity: 0.4;
}

@keyframes asi-mega-drift-a {
	0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
	50%      { transform: translate3d(-20px, 30px, 0) scale(1.08); }
}

@keyframes asi-mega-drift-b {
	0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
	50%      { transform: translate3d(40px, -20px, 0) scale(1.05); }
}

@keyframes asi-mega-drift-c {
	0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
	50%      { transform: translate3d(30px, 40px, 0) scale(1.1); }
}

.asi-mega-hero__inner {
	position: relative;
	z-index: 1;
	padding: clamp(1.2rem, 2.8vw, 2rem) clamp(1.25rem, 3.5vw, 2.5rem);
}

/* Breadcrumbs — same density as the standard hero strip, inverted palette. */
.asi-mega-hero__crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.6875rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.7);
	margin-block-end: clamp(1.25rem, 3vw, 1.75rem);
}

.asi-mega-hero__crumbs a {
	color: inherit;
	text-decoration: none;
	transition: color 160ms ease;
}

.asi-mega-hero__crumbs a:hover,
.asi-mega-hero__crumbs a:focus-visible {
	color: #fff;
}

.asi-mega-hero__crumbs span[aria-hidden] { opacity: 0.4; }
.asi-mega-hero__crumbs [aria-current="page"] { color: #fff; font-weight: 600; }

/* Stage — copy on the start side, art on the end side. */
.asi-mega-hero__stage {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	align-items: center;
	gap: clamp(1.5rem, 4vw, 3rem);
	min-block-size: clamp(176px, 22vw, 256px);
}

@media (max-width: 720px) {
	.asi-mega-hero__stage {
		grid-template-columns: minmax(0, 1fr);
		min-block-size: 0;
	}
}

/* ── Copy ── */
.asi-mega-hero__copy {
	position: relative;
	z-index: 2;
}

.asi-mega-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.375rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.12);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #fff;
	margin-block-end: 1rem;
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.asi-mega-hero__pulse {
	inline-size: 0.5rem;
	block-size: 0.5rem;
	border-radius: 50%;
	background: #FFE066;
	box-shadow: 0 0 0 0 rgba(255, 224, 102, 0.6);
	animation: asi-mega-pulse 1.8s ease-in-out infinite;
}

@keyframes asi-mega-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(255, 224, 102, 0.6); }
	70%  { box-shadow: 0 0 0 10px rgba(255, 224, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 224, 102, 0); }
}

/* Title — two stacked condensed display lines, the noon move. */
.asi-mega-hero__title {
	display: flex;
	flex-direction: column;
	line-height: 0.88;
	margin: 0;
	font-family: var(--asi-font-family);
	font-weight: 800;
	letter-spacing: -0.04em;
	color: #fff;
	font-size: clamp(3rem, 8.5vw, 6.5rem);
	text-transform: uppercase;
}

.asi-mega-hero__title-1,
.asi-mega-hero__title-2 {
	display: block;
	text-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
}

.asi-mega-hero__title-2 {
	background: linear-gradient(135deg, #FFE066 0%, #F59E0B 60%, #FB923C 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}

:lang(ar) .asi-mega-hero__title {
	/* Tajawal's hamza/dots sit well above cap height — the LTR line-height
	   of 0.88 clips ء on "هائلة". Drop the size a touch and open the leading
	   so the second line breathes without colliding with the first. */
	font-size: clamp(2rem, 6vw, 4.5rem);
	letter-spacing: -0.01em;
	line-height: 1.15;
}

/* Extra crown space for the gradient line specifically — its hamza on the
   alif sits high above the cap height, so even line-height: 1.15 isn't
   enough in some weights without a small block-start padding. */
:lang(ar) .asi-mega-hero__title-2 {
	padding-block-start: 0.08em;
}

.asi-mega-hero__tagline {
	margin: 1.25rem 0 0;
	max-inline-size: 38ch;
	font-size: clamp(0.95rem, 1.2vw, 1.0625rem);
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
}

.asi-mega-hero__meta {
	margin: 1.25rem 0 0;
	display: inline-flex;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.5rem 0.875rem;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.85);
}

.asi-mega-hero__meta strong {
	font-size: 1.125rem;
	font-weight: 700;
	color: #FFE066;
}

/* ── Art (SVG sale-tag composition) ── */
.asi-mega-hero__art {
	position: relative;
	z-index: 1;
	min-block-size: clamp(180px, 24vw, 280px);
	display: flex;
	align-items: center;
	justify-content: center;
}

.asi-mega-hero__art-svg {
	inline-size: 100%;
	max-inline-size: 420px;
	block-size: auto;
	filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.25));
}

.asi-mega-hero__tag {
	transform-origin: center;
	transform-box: fill-box;
}

.asi-mega-hero__tag--back {
	animation: asi-mega-tag-back 6s ease-in-out infinite;
}

.asi-mega-hero__tag--front {
	animation: asi-mega-tag-front 5s ease-in-out infinite;
}

@keyframes asi-mega-tag-back {
	0%, 100% { transform: translate(40px, 100px) rotate(-14deg); }
	50%      { transform: translate(40px, 92px) rotate(-12deg); }
}

@keyframes asi-mega-tag-front {
	0%, 100% { transform: translate(110px, 60px) rotate(8deg); }
	50%      { transform: translate(110px, 50px) rotate(10deg); }
}

.asi-mega-hero__spark {
	transform-box: fill-box;
	transform-origin: center;
}

.asi-mega-hero__spark--1 { animation: asi-mega-twinkle 2.4s ease-in-out infinite; }
.asi-mega-hero__spark--2 { animation: asi-mega-twinkle 3.2s ease-in-out infinite 0.6s; }
.asi-mega-hero__spark--3 { animation: asi-mega-twinkle 2.8s ease-in-out infinite 1.2s; }

@keyframes asi-mega-twinkle {
	0%, 100% { opacity: 0.3; transform: scale(0.7); }
	50%      { opacity: 1;   transform: scale(1.1); }
}

/* In RTL, mirror the art horizontally so the tag composition still feels
   like it's "entering" from the trailing side. */
[dir="rtl"] .asi-mega-hero__art-svg {
	transform: scaleX(-1);
}

/* ── Controls (sort row) ── */
.asi-mega-hero__controls {
	margin-block-start: clamp(1.5rem, 3vw, 2rem);
	display: flex;
	justify-content: flex-end;
}

.asi-mega-hero__sort {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	padding: 0.25rem;
	background: rgba(0, 0, 0, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.asi-mega-hero__sort-btn {
	padding: 0.5rem 1rem;
	border-radius: 999px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease, transform 160ms ease;
	white-space: nowrap;
}

.asi-mega-hero__sort-btn:hover,
.asi-mega-hero__sort-btn:focus-visible {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.asi-mega-hero__sort-btn.is-active {
	background: #fff;
	color: var(--wp--preset--color--accent-1, #0155B7);
}

/* Reduced-motion users get a still hero — all the chrome, none of the drift. */
@media (prefers-reduced-motion: reduce) {
	.asi-mega-hero__orb,
	.asi-mega-hero__pulse,
	.asi-mega-hero__tag,
	.asi-mega-hero__spark {
		animation: none !important;
	}
}

