/* BUILD 1.8.0 — 2026-09-30 — Kingdom Car rebrand */
/* =====================================================================
   Kingdom Car — مملكة السيارات | Elementor widgets stylesheet
   Direction: RTL (Arabic). Tokens copied verbatim from Lovable src/styles.css
   ===================================================================== */

:root {
	/* Kingdom Car — مملكة السيارات: navy + gold, sampled from the logo */
	--agate-bg:            #FAF9F6;
	--agate-fg:            #0E1B2E;
	--agate-card:          #FFFFFF;
	--agate-primary:       #A8813D;
	--agate-primary-rgb:   168, 129, 61;
	--agate-primary-fg:    #0E1B2E;
	--agate-secondary:     #13233F;
	--agate-muted:         #F2F0EB;
	--agate-muted-fg:      #5E6778;
	--agate-accent:        #F5EEDF;
	--agate-destructive:   #D22B2B;
	--agate-border:        #E5E2D9;
	--agate-input:         #E5E2D9;
	--agate-brand:         #C9A56A;
	--agate-brand-dark:    #7E5E2A;
	--agate-gold-light:    #E6CD95;
	--agate-ink:           #0E1B2E;
	--agate-wa:            #25D366;

	--agate-radius:        0.75rem;
	--agate-radius-sm:     0.5rem;
	--agate-radius-lg:     1rem;
	--agate-radius-xl:     1.5rem;

	--agate-gradient-brand: linear-gradient(135deg, #E6CD95, #A67C3A);
	--agate-gradient-dark:  linear-gradient(135deg, #182B4A, #070E1C);
	--agate-shadow-brand:   0 20px 50px -20px rgba(168, 129, 61, 0.55);
	--agate-shadow-card:    0 30px 60px -30px rgba(14, 27, 46, 0.35);

	--agate-font:         "Tajawal", "Cairo", system-ui, sans-serif;
	--agate-font-display: "Tajawal", "Cairo", system-ui, sans-serif;

	--agate-max:          80rem;   /* max-w-7xl */
}

/* =====================================================================
   1. BOX SIZING
   ===================================================================== */
[class^="agate-"], [class*=" agate-"],
[class^="agate-"] *, [class*=" agate-"] *,
[class^="agate-"] *::before, [class*=" agate-"] *::before,
[class^="agate-"] *::after,  [class*=" agate-"] *::after {
	box-sizing: border-box;
}

/* =====================================================================
   2. SECTION-LEVEL CLIP — no horizontal scroll, anywhere
   ===================================================================== */
.agate-section,
.agate-hero,
.agate-header,
.agate-footer,
.agate-offers,
.agate-brands,
.agate-cars,
.agate-apply,
.agate-purchase-hero,
.agate-contact,
.agate-compare,
.agate-car-hero,
.agate-car-specs,
.agate-car-related,
.agate-form {
	max-width: 100%;
	overflow-x: hidden;
	overflow-x: clip;
}

/* 3. GRID CHILDREN must shrink below intrinsic width */
[class^="agate-"][class*="-grid"] > *,
[class^="agate-"][class*="-row"] > *,
.agate-form-row > *,
.agate-form-field {
	min-width: 0;
	max-width: 100%;
}

/* 4. MEDIA never breaks out */
[class^="agate-"] img, [class*=" agate-"] img,
[class^="agate-"] iframe, [class*=" agate-"] iframe,
[class^="agate-"] svg, [class*=" agate-"] svg { max-width: 100%; }
[class^="agate-"] img, [class*=" agate-"] img { height: auto; }

/* 5. FORM CONTROLS */
[class^="agate-"] input, [class^="agate-"] textarea,
[class^="agate-"] select, [class^="agate-"] button { max-width: 100%; }
[class^="agate-"] input[type="text"],
[class^="agate-"] input[type="email"],
[class^="agate-"] input[type="tel"],
[class^="agate-"] input[type="number"],
[class^="agate-"] textarea,
[class^="agate-"] select { width: 100%; }

/* 6. LONG UNBROKEN STRINGS (emails / phones in RTL) */
[class^="agate-"] p, [class^="agate-"] a, [class^="agate-"] span,
[class^="agate-"] li, [class^="agate-"] td,
[class^="agate-"] [class*="email"], [class^="agate-"] [class*="phone"] {
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* 7. FORM ROWS collapse on mobile */
.agate-form-row {
	display: grid;
	gap: 1.25rem;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) {
	.agate-form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* 8. HONEYPOT */
.agate-honeypot {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* 9. FORM-SECTION CONTAINMENT */
.elementor-widget-agate-contact-form,
.agate-contact,
.agate-form-card,
.agate-contact form {
	max-width: 100%;
	overflow-x: hidden;
	overflow-x: clip;
}

/* =====================================================================
   TYPOGRAPHY — Arabic needs a taller line-height than Latin
   ===================================================================== */
[class^="agate-"], [class*=" agate-"] { font-family: var(--agate-font); }

[class^="agate-"] h1, [class*=" agate-"] h1,
[class^="agate-"] h2, [class*=" agate-"] h2,
[class^="agate-"] h3, [class*=" agate-"] h3,
[class^="agate-"] h4, [class*=" agate-"] h4,
[class^="agate-"][class*="-title"] {
	font-family: var(--agate-font-display);
	line-height: 1.3;
	color: inherit;
}
[class^="agate-"] p, [class^="agate-"] li { line-height: 1.85; }

/* =====================================================================
   LAYOUT PRIMITIVES
   ===================================================================== */
.agate-wrap {
	width: 100%;
	max-width: var(--agate-max);
	margin-inline: auto;
	padding-inline: 1rem;
}
.agate-wrap-sm { max-width: 64rem; }
.agate-wrap-xs { max-width: 56rem; }
.agate-section { position: relative; padding-block: 5rem; }
@media (max-width: 640px) { .agate-section { padding-block: 3rem; } }

.agate-relative { position: relative; z-index: 1; }

/* Elementor container reset — our sections own their own width */
.elementor-widget-agate-header .elementor-widget-container,
.elementor-widget-agate-footer .elementor-widget-container { width: 100%; }

/* =====================================================================
   SECTION-HEAD RHYTHM — one owner, doubled class beats Elementor's reset
   ===================================================================== */
.agate-section-head.agate-section-head {
	max-width: 42rem;
	margin: 0 auto 2.5rem;
}
.agate-section-head.agate-section-head.agate-align-center { text-align: center; }
.agate-section-head.agate-section-head.agate-align-start  { text-align: start; margin-inline: 0; }

.agate-section-head.agate-section-head .agate-eyebrow {
	display: inline-block;
	margin: 0 0 1rem;
	padding: 0.375rem 1rem;
	border-radius: var(--agate-radius-sm);
	background: rgba(var(--agate-primary-rgb), 0.10);
	color: var(--agate-primary);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.6;
}
.agate-section-head.agate-section-head .agate-section-title {
	margin: 0 0 1rem;
	font-size: clamp(1.75rem, 4vw, 3rem);
	font-weight: 900;
	color: var(--agate-ink);
}
.agate-section-head.agate-section-head .agate-section-desc {
	margin: 0;
	color: var(--agate-muted-fg);
	font-size: 1rem;
}

/* Dark variant (Brands section) */
.agate-section-head.agate-head-dark .agate-eyebrow {
	background: rgba(255, 255, 255, 0.10);
	color: #fff;
}
.agate-section-head.agate-head-dark .agate-section-title { color: #fff; }
.agate-section-head.agate-head-dark .agate-section-desc  { color: rgba(255, 255, 255, 0.70); }

/* =====================================================================
   ICON CONTAINER — SIZE AND LAYOUT ONLY. Colour is per component.
   ===================================================================== */
[class^="agate-"][class*="-icon"],
[class*=" agate-"][class*="-icon"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
}
[class^="agate-"][class*="-icon"] svg,
[class*=" agate-"][class*="-icon"] svg {
	width: 1.25rem;
	height: 1.25rem;
	display: block;
	color: inherit;
	fill: none;
	stroke: currentColor;
}
[class^="agate-"][class*="-icon"] i,
[class*=" agate-"][class*="-icon"] i {
	font-size: 1.1rem;
	color: inherit;
	line-height: 1;
}

/* Per-component icon colours, each chosen against its own background */
.agate-foot-icon      { color: var(--agate-primary); }   /* black footer   */
.agate-burger-icon    { color: var(--agate-ink); }       /* light header   */
.agate-nav-close-icon { color: var(--agate-ink); }
.agate-arrow-icon     { color: var(--agate-primary); }   /* white circle   */
.agate-btn-icon       { color: inherit; }                /* inherits btn   */
.agate-compare-icon   { color: var(--agate-primary); }   /* tinted chip    */
.agate-compare-icon-on{ color: var(--agate-primary-fg); } /* solid gold chip */
.agate-check-icon     { color: var(--agate-primary); }
.agate-trophy-icon    { color: var(--agate-primary-fg); } /* gold badge     */
.agate-select-icon    { color: var(--agate-muted-fg); }
.agate-crumb-icon     { color: var(--agate-muted-fg); }
.agate-social-icon    { color: rgba(255, 255, 255, 0.75); }
.agate-social-link:hover .agate-social-icon { color: var(--agate-primary); }

/* =====================================================================
   BUTTONS — three-layer defence (layer 2 lives inline in plugin.php)
   ===================================================================== */
.agate-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border: 0;
	border-radius: var(--agate-radius-sm);
	font-family: var(--agate-font);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.agate-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.agate-btn:active { transform: translateY(0); }
.agate-btn-block { width: 100%; }
.agate-btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }

.agate-btn-primary {
	background: var(--agate-gradient-brand);
	color: var(--agate-primary-fg);
	box-shadow: var(--agate-shadow-brand);
}
.agate-btn-light  { background: #fff; color: var(--agate-primary); box-shadow: var(--agate-shadow-card); }
.agate-btn-wa     { background: var(--agate-wa); color: #fff; }
.agate-btn-ghost  {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, 0.2);
}
.agate-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.agate-btn[disabled] { opacity: .6; pointer-events: none; }

/* =====================================================================
   CARD GLOW — the Lovable `card-glow` utility, gradient border + lift
   ===================================================================== */
.agate-card {
	position: relative;
	background: #fff;
	border: 1px solid transparent;
	border-radius: var(--agate-radius);
	background-image: linear-gradient(#fff, #fff), var(--agate-gradient-brand);
	background-origin: border-box;
	background-clip: padding-box, border-box;
	box-shadow: var(--agate-shadow-card);
	transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s ease;
}
.agate-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 40px 80px -30px rgba(168, 129, 61, 0.45);
}

/* Decorative backgrounds from the Lovable utilities */
.agate-bg-grid {
	background-image:
		linear-gradient(rgba(14, 27, 46, 0.06) 1px, transparent 1px),
		linear-gradient(90deg, rgba(14, 27, 46, 0.06) 1px, transparent 1px);
	background-size: 40px 40px;
}
.agate-bg-noise {
	background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
	background-size: 6px 6px;
}
.agate-bg-layer {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
.agate-glow {
	position: absolute;
	border-radius: 9999px;
	background: rgba(var(--agate-primary-rgb), 0.18);
	filter: blur(64px);
	pointer-events: none;
}
.agate-text-gradient {
	background: linear-gradient(135deg, #B8904A, #7E5E2A);   /* deep gold — readable on light backgrounds */
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.agate-apply .agate-text-gradient {
	background-image: linear-gradient(135deg, #F0DDAE, #C9A56A); /* bright gold on the navy band */
}

/* =====================================================================
   ANIMATIONS — replicated from Lovable verbatim
   ===================================================================== */
@keyframes agate-float-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes agate-float-y  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes agate-marquee  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes agate-wobble   { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes agate-spin     { to { transform: rotate(360deg); } }

.agate-float-y { animation: agate-float-y 4s ease-in-out infinite; }

/* Scroll reveal */
.agate-reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
}
.agate-reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Editor preview: reveal elements must render immediately (v4 fix) */
body.elementor-editor-active .agate-reveal,
body.elementor-editor-active .agate-reveal.is-visible {
	opacity: 1 !important;
	transform: none !important;
}
/* Dynamic content (car grids, compare, offers) never waits on the observer */
[data-agate-dynamic] .agate-reveal {
	opacity: 1 !important;
	transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
	.agate-reveal { opacity: 1 !important; transform: none !important; }
	.agate-float-y { animation: none; }
}

/* =====================================================================
   HEADER
   ===================================================================== */
.agate-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(250, 249, 246, 0.85);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--agate-border);
}
.agate-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 5rem;
}
.agate-logo { display: inline-flex; align-items: center; }
.agate-logo img { height: 2.5rem; width: auto; display: block; }
@media (min-width: 640px) { .agate-logo img { height: 3.5rem; } }

.agate-nav { display: none; align-items: center; gap: 2rem; }
@media (min-width: 900px) { .agate-nav { display: flex; } }
.agate-nav a {
	color: var(--agate-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	transition: color .2s ease;
}
.agate-nav a:hover { color: var(--agate-primary); }

/* WP nav-menu output inside the header */
.agate-nav ul { display: flex; align-items: center; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.agate-nav li { position: relative; }
.agate-nav .sub-menu {
	position: absolute;
	top: 100%;
	inset-inline-start: 0;
	display: none;
	flex-direction: column;
	gap: 0;
	min-width: 12rem;
	padding: 0.5rem 0;
	background: #fff;
	border: 1px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	box-shadow: var(--agate-shadow-card);
	z-index: 60;
}
.agate-nav li:hover > .sub-menu { display: flex; }
.agate-nav .sub-menu a { display: block; padding: 0.5rem 1rem; }

.agate-header-cta { display: none; }
@media (min-width: 900px) { .agate-header-cta { display: inline-flex; } }

.agate-burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: transparent;
	border: 1px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	cursor: pointer;
}
@media (min-width: 900px) { .agate-burger { display: none; } }
.agate-burger:hover { background: var(--agate-muted); }

.agate-mobile-nav {
	display: none;
	background: var(--agate-bg);
	border-bottom: 1px solid var(--agate-border);
	box-shadow: 0 18px 30px -20px rgba(14, 27, 46, .4);
}
.agate-mobile-nav.is-open { display: block; }
.agate-mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.agate-mobile-nav a,
.agate-mobile-nav li > a {
	display: block;
	padding: 0.625rem 0.75rem;
	border-radius: var(--agate-radius-sm);
	color: var(--agate-ink);
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
}
.agate-mobile-nav a:hover { background: var(--agate-muted); color: var(--agate-primary); }
.agate-mobile-nav .agate-btn { margin-top: 0.75rem; }
.agate-mobile-inner { display: flex; flex-direction: column; gap: 0.25rem; padding-block: 1rem; }

/* =====================================================================
   HERO — the banner is a single full-bleed clickable image
   ===================================================================== */
.agate-hero { position: relative; background: var(--agate-secondary); }
.agate-hero-link { display: block; position: relative; overflow: hidden; }
.agate-hero-link img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	transition: transform .7s ease;
}
.agate-hero-link:hover img { transform: scale(1.02); }

/* =====================================================================
   OFFERS SLIDER — 3D coverflow, matches the Lovable transform maths
   ===================================================================== */
.agate-offers { background: rgba(242, 240, 235, 0.4); }
.agate-offers-stage {
	position: relative;
	height: 520px;
	width: 100%;
	max-width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 1.5rem;
	overflow: hidden;
}
@media (max-width: 640px) {
	.agate-offers-stage { height: 380px; margin-top: 0.5rem; }
	.agate-offer-card { padding: 0.875rem; }
	.agate-offer-media { margin-bottom: 0.625rem; }
	.agate-offer-name { font-size: 1rem; }
	.agate-offer-meta { margin: 0.125rem 0 0.5rem; }
	.agate-offer-card .agate-price-block { margin-bottom: 0.625rem; gap: 1rem; }
	.agate-offer-card .agate-price-value { font-size: 1.0625rem; }
	.agate-offer-card .agate-price-divider { height: 2rem; }
	/* One-line WhatsApp button: no wrapping, tighter metrics. */
	.agate-offer-card .agate-btn {
		white-space: nowrap;
		padding: 0.625rem 0.75rem;
		font-size: 0.8125rem;
		gap: 0.375rem;
	}
	.agate-offer-card .agate-btn .agate-btn-icon svg { width: 1rem; height: 1rem; }
}
/* The button must never wrap onto two lines on any screen. */
.agate-offer-card .agate-btn { white-space: nowrap; }
@media (min-width: 640px) { .agate-offers-stage { margin-top: 4rem; } }

.agate-offer-slide {
	position: absolute;
	top: 50%;
	/* Physical `left`, NOT inset-inline-start: the JS transform maths are
	   direction-agnostic, so a logical property would flip the stack in RTL
	   and push the active card off-centre. */
	left: 50%;
	inset-inline-start: auto;
	inset-inline-end: auto;
	width: 300px;
	transition: transform .5s cubic-bezier(.2,.8,.2,1), opacity .5s ease;
}
@media (max-width: 640px) {
	.agate-offer-slide { width: 240px; }
}
.agate-offer-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.25rem;
	background: var(--agate-card);
	border-radius: var(--agate-radius);
	box-shadow: 0 10px 30px -12px rgba(14, 27, 46, .25);
	outline: 1px solid var(--agate-border);
}
.agate-offer-slide.is-active .agate-offer-card { outline: 2px solid var(--agate-primary); }
.agate-offer-slide:not(.is-active) { filter: grayscale(30%); }

.agate-offer-media {
	position: relative;
	aspect-ratio: 4 / 3;
	margin-bottom: 1rem;
	border-radius: var(--agate-radius-sm);
	background: linear-gradient(135deg, var(--agate-muted), var(--agate-accent));
	overflow: hidden;
}
.agate-offer-media img { width: 100%; height: 100%; object-fit: contain; }
.agate-offer-badge {
	position: absolute;
	top: 0.75rem;
	inset-inline-end: 0.75rem;
	padding: 0.25rem 0.75rem;
	border-radius: var(--agate-radius-sm);
	background: var(--agate-gradient-brand);
	color: var(--agate-primary-fg);
	font-size: 0.75rem;
	font-weight: 700;
}
.agate-offer-name { margin: 0; font-size: 1.125rem; font-weight: 700; color: var(--agate-ink); }
.agate-offer-meta { margin: 0.25rem 0 0.75rem; font-size: 0.75rem; color: var(--agate-muted-fg); }
.agate-offer-link { text-decoration: none; color: inherit; display: block; }

.agate-offers-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 30;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	box-shadow: 0 12px 28px -14px rgba(14, 27, 46, .5);
	cursor: pointer;
	transition: transform .2s ease;
}
.agate-offers-nav:hover { transform: translateY(-50%) scale(1.1); }
.agate-offers-prev { inset-inline-end: 0.5rem; }
.agate-offers-next { inset-inline-start: 0.5rem; }
@media (min-width: 768px) {
	.agate-offers-prev { inset-inline-end: 1.5rem; }
	.agate-offers-next { inset-inline-start: 1.5rem; }
}

.agate-offers-dots { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1.5rem; }
.agate-offers-dot {
	width: 0.5rem;
	height: 0.5rem;
	padding: 0;
	border: 0;
	border-radius: var(--agate-radius-sm);
	background: var(--agate-border);
	cursor: pointer;
	transition: width .3s ease, background .3s ease;
}
.agate-offers-dot.is-active { width: 2rem; background: var(--agate-primary); }

/* =====================================================================
   BRANDS MARQUEE — forced-LTR subtree, four identical groups
   ===================================================================== */
.agate-brands {
	position: relative;
	background: var(--agate-secondary);
	color: #fff;
	overflow: hidden;
}
.agate-marquee {
	direction: ltr;
	position: relative;
	margin-top: 3rem;
	overflow: hidden;
}
.agate-marquee-track {
	display: flex;
	width: max-content;
	animation: agate-marquee 30s linear infinite;
}
.agate-marquee:hover .agate-marquee-track { animation-play-state: paused; }
.agate-marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.agate-marquee-item {
	flex-shrink: 0;
	width: 7rem;
	height: 4rem;
	margin-inline: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
}
@media (min-width: 640px) {
	.agate-marquee-item { width: 8rem; height: 5rem; margin-inline: 1.25rem; }
}
.agate-marquee-item img {
	max-height: 3rem;
	max-width: 100%;
	object-fit: contain;
	filter: brightness(0) invert(1);
	opacity: 0.85;
	transition: opacity .3s ease, transform .3s ease;
}
@media (min-width: 640px) { .agate-marquee-item img { max-height: 3.5rem; } }
.agate-marquee-item:hover img { opacity: 1; transform: scale(1.1); }
.agate-marquee-item .agate-brand-name {
	color: rgba(255, 255, 255, 0.7);
	font-weight: 700;
	font-size: 0.9375rem;
	white-space: nowrap;
}

/* =====================================================================
   CARS GRID + FILTERS
   ===================================================================== */
.agate-filters {
	display: grid;
	gap: 1rem;
	grid-template-columns: minmax(0, 1fr);
	margin-top: 2.5rem;
	padding: 1.5rem;
	background: var(--agate-card);
	border: 1px solid var(--agate-border);
	border-radius: var(--agate-radius);
	box-shadow: 0 10px 30px -22px rgba(14, 27, 46, .5);
}
@media (min-width: 640px)  { .agate-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px)  { .agate-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.agate-filter {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	/* inline-start is the right edge in RTL — that is the side the label sits
	   against, so it gets the larger value. */
	padding-inline-start: 1.5rem;
	padding-inline-end: 0.85rem;
	background: var(--agate-bg);
	border: 1px solid var(--agate-input);
	border-radius: var(--agate-radius-sm);
	min-width: 0;
}
.agate-filter select {
	flex: 1 1 0;
	min-width: 0;
	padding-block: 0.75rem;
	padding-inline: 0;
	background: transparent;
	border: 0;
	outline: none;
	font-family: var(--agate-font);
	font-size: 0.875rem;
	color: var(--agate-ink);
	text-overflow: ellipsis;
	white-space: nowrap;
	overflow: hidden;
	appearance: none;
	-webkit-appearance: none;
}
.agate-filter .agate-select-icon { flex: 0 0 auto; display: inline-flex; }

/* --- custom dropdown ----------------------------------------------- */
/* The native <select> stays in the DOM as the value holder, but is taken out
   of the visual flow — the .agate-dd-value span takes its place so the option
   list can be a real element we control. */
.agate-filter.is-enhanced {
	position: relative;
	cursor: pointer;
	user-select: none;
}
.agate-filter.is-enhanced select {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	pointer-events: none;
}
.agate-filter.is-enhanced:focus-visible {
	outline: 2px solid var(--agate-primary);
	outline-offset: 2px;
}
.agate-dd-value {
	flex: 1 1 0;
	min-width: 0;
	padding-block: 0.75rem;
	font-family: var(--agate-font);
	font-size: 0.875rem;
	color: var(--agate-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.agate-filter.is-open .agate-select-icon { transform: rotate(180deg); }
.agate-filter .agate-select-icon { transition: transform .2s ease; }

.agate-dd-list {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	inset-inline: 0;
	z-index: 70;
	max-height: 280px;
	overflow-y: auto;
	padding: 0.375rem;
	background: var(--agate-card);
	border: 1px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	box-shadow: 0 18px 40px -18px rgba(14, 27, 46, .45);
}
.agate-filter.is-open .agate-dd-list { display: block; }
.agate-dd-option {
	padding: 0.625rem 1rem;
	border-radius: calc(var(--agate-radius-sm) - 4px);
	font-family: var(--agate-font);
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--agate-ink);
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}
.agate-dd-option:hover { background: rgba(168, 129, 61, .07); color: var(--agate-primary); }
.agate-dd-option.is-on {
	background: rgba(168, 129, 61, .1);
	color: var(--agate-primary);
	font-weight: 700;
}
/* The open list must paint over the car cards that follow it in the DOM.

   The bar deliberately has NO z-index of its own: any value there would make
   it a stacking context and trap the dropdown inside it, which is exactly why
   the compare toggle and the "جديدة" badge (z-index 20, and free to escape to
   the root context) used to cover the open list. With the bar transparent to
   stacking, the open filter competes directly with those badges — 45 beats
   them, and still stays under the sticky header (50). */
.agate-filters { position: relative; }
.agate-filters.has-open { position: relative; }
.agate-filter { position: relative; }
.agate-filter.is-open { z-index: 45; }
.agate-filter.is-open .agate-dd-list { z-index: 1; }

/* While any dropdown is open, drop the cards' floating controls behind it —
   belt and braces for themes that add their own stacking contexts. */
.agate-cars.agate-dd-open .agate-cond-badge,
.agate-cars.agate-dd-open .agate-compare-toggle,
.agate-cars:has(.agate-filter.is-open) .agate-cond-badge,
.agate-cars:has(.agate-filter.is-open) .agate-compare-toggle { z-index: 1; }
.agate-filter-range {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.25rem;
	padding: 0.5rem 1rem;
	background: var(--agate-bg);
	border: 1px solid var(--agate-input);
	border-radius: var(--agate-radius-sm);
	font-size: 0.875rem;
}
.agate-filter-range label { font-size: 0.75rem; font-weight: 500; }
.agate-filter-range b { color: var(--agate-primary); font-variant-numeric: tabular-nums; }
.agate-filter-range input[type="range"] { width: 100%; accent-color: var(--agate-primary); }

/* --- dual-handle instalment bar ----------------------------------- */
.agate-range-dual { gap: 0.5rem; }
.agate-range-track {
	position: relative;
	height: 22px;
	display: flex;
	align-items: center;
}
.agate-range-track::before {
	content: "";
	position: absolute;
	inset-inline: 9px;
	height: 4px;
	border-radius: 999px;
	background: var(--agate-input);
}
.agate-range-fill {
	position: absolute;
	height: 4px;
	border-radius: 999px;
	background: var(--agate-primary);
	inset-inline-start: 0;
	width: 100%;
}
.agate-range-dual .agate-range-input {
	position: absolute;
	inset-inline: 0;
	width: 100%;
	margin: 0;
	height: 22px;
	background: none;
	pointer-events: none;
	appearance: none;
	-webkit-appearance: none;
}
.agate-range-dual .agate-range-input:focus { outline: none; }
.agate-range-dual .agate-range-input::-webkit-slider-runnable-track {
	height: 22px;
	background: transparent;
	border: 0;
}
.agate-range-dual .agate-range-input::-moz-range-track {
	height: 22px;
	background: transparent;
	border: 0;
}
.agate-range-dual .agate-range-input::-webkit-slider-thumb {
	appearance: none;
	-webkit-appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--agate-primary);
	box-shadow: 0 2px 6px -1px rgba(14, 27, 46, .45);
	cursor: pointer;
}
.agate-range-dual .agate-range-input::-moz-range-thumb {
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--agate-primary);
	box-shadow: 0 2px 6px -1px rgba(14, 27, 46, .45);
	cursor: pointer;
}
.agate-range-dual .agate-range-input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(168, 129, 61, .25); }
.agate-range-dual .agate-range-input:focus-visible::-moz-range-thumb     { box-shadow: 0 0 0 4px rgba(168, 129, 61, .25); }

/* --- filter footer ------------------------------------------------- */
.agate-filter-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 1rem;
	font-size: 0.8125rem;
}
.agate-filter-count b { color: var(--agate-primary); font-variant-numeric: tabular-nums; }
.agate-filter-reset {
	padding: 0.5rem 1rem;
	background: transparent;
	border: 1px solid var(--agate-input);
	border-radius: 999px;
	font-family: var(--agate-font);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--agate-ink);
	cursor: pointer;
	transition: border-color .2s ease, color .2s ease;
}
.agate-filter-reset:hover { border-color: var(--agate-primary); color: var(--agate-primary); }

/* --- desktop: everything on ONE line ------------------------------- */
/* Must come AFTER all the base .agate-filter rules above — same specificity,
   so source order decides. Grid would drop an item to a second row as soon as
   the columns ran out; nowrap flex with min-width:0 makes them all shrink
   together instead, and the ellipsis on the select absorbs the squeeze. */
@media (min-width: 1100px) {
	.agate-filters {
		display: flex;
		flex-wrap: nowrap;
		align-items: stretch;
		gap: 0.75rem;
		padding: 1.25rem;
	}
	.agate-filters > .agate-filter { flex: 1 1 0; min-width: 0; }
	.agate-filters > .agate-filter-range { flex: 1.7 1 0; min-width: 180px; }
	.agate-filters > .agate-filter-actions { flex: 0 0 auto; }
	.agate-filters > .agate-filter {
		padding-inline-start: 1.5rem;
		padding-inline-end: 0.5rem;
		gap: 0.35rem;
	}
	.agate-filters > .agate-filter select,
	.agate-filters > .agate-filter .agate-dd-value { font-size: 0.8125rem; }
	.agate-filters > .agate-filter-range { padding-inline: 0.85rem; }
	.agate-filters > .agate-filter-range label { white-space: nowrap; }
	.agate-filters > .agate-filter-actions {
		padding: 0 0.25rem;
		gap: 0.6rem;
		white-space: nowrap;
	}
	.agate-filters > .agate-filter-actions .agate-filter-reset { padding: 0.45rem 0.85rem; }
}

/* --- new / used badge on the card ---------------------------------- */
.agate-cond-badge {
	position: absolute;
	top: 1.25rem;
	inset-inline-end: 1.25rem;
	z-index: 20;
	padding: 0.25rem 0.75rem;
	border-radius: 999px;
	font-size: 0.6875rem;
	font-weight: 800;
	line-height: 1.6;
	letter-spacing: .01em;
	pointer-events: none;
}
.agate-cond-new  { background: rgba(22, 128, 61, .12); color: #16803D; border: 1px solid rgba(22, 128, 61, .3); }
.agate-cond-used { background: rgba(14, 27, 46, .08);  color: #3F4A5E; border: 1px solid rgba(14, 27, 46, .18); }

.agate-cars-grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: minmax(0, 1fr);
	margin-top: 3rem;
}
@media (min-width: 768px)  { .agate-cars-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .agate-cars-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.agate-car-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1.5rem;
}
.agate-car-card.is-hidden { display: none; }
.agate-car-media {
	position: relative;
	width: 100%;
	aspect-ratio: 5 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 1rem;
}
.agate-car-media-glow {
	position: absolute;
	inset-inline: 1.5rem;
	top: 50%;
	height: 8rem;
	border-radius: 9999px;
	background: rgba(var(--agate-primary-rgb), 0.2);
	filter: blur(48px);
	opacity: .4;
	transition: opacity .3s ease;
}
.agate-car-card:hover .agate-car-media-glow { opacity: .8; }
.agate-car-media img {
	position: relative;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 25px 25px rgba(0, 0, 0, .15));
}
.agate-car-card:hover .agate-car-media img { animation: agate-wobble 3s ease-in-out infinite; }
.agate-car-body { text-align: center; }
.agate-car-name { margin: 0; font-size: 1.5rem; font-weight: 900; color: var(--agate-ink); }
.agate-car-meta { margin: 0.25rem 0 0.75rem; font-size: 0.875rem; color: var(--agate-muted-fg); }
.agate-car-link { display: block; flex: 1; text-decoration: none; color: inherit; }

/* =====================================================================
   COMPARE CONTROLS
   1) .agate-compare-toggle — the small square on HOME GRID CARDS ONLY.
   2) .agate-compare-pill   — the labelled button on the car detail page.
   ===================================================================== */

/* --- 1) Square card toggle -------------------------------------------- */
.agate-compare-toggle {
	position: absolute;
	top: 0.75rem;
	inset-inline-start: 0.75rem;
	z-index: 20;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	line-height: 1;
	background: #FFFFFF;
	border: 2px solid var(--agate-primary);
	border-radius: var(--agate-radius-sm);
	box-shadow: 0 6px 16px -8px rgba(14, 27, 46, .45);
	color: var(--agate-primary);
	cursor: pointer;
	opacity: 1;
	visibility: visible;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
/* The two glyph spans are absolutely stacked on the SAME centre point, and
   visibility flips between them — so exactly one icon is ever visible, and it
   is dead-centre by geometry, not by flow. Specificity here is 0,2,0 on both
   the show and hide rules, so neither can leak past the other. */
.agate-compare-toggle .agate-compare-icon,
.agate-compare-toggle .agate-compare-check-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
}
.agate-compare-toggle .agate-compare-icon svg,
.agate-compare-toggle .agate-compare-check-icon svg {
	width: 1rem;
	height: 1rem;
	display: block;
}
.agate-compare-toggle .agate-compare-check-icon { opacity: 0; visibility: hidden; color: var(--agate-primary-fg); }
.agate-compare-toggle.is-on .agate-compare-icon { opacity: 0; visibility: hidden; }
.agate-compare-toggle.is-on .agate-compare-check-icon { opacity: 1; visibility: visible; }
.agate-compare-toggle:hover,
.agate-compare-toggle.is-on {
	background: var(--agate-primary);
	border-color: var(--agate-primary);
	color: var(--agate-primary-fg);
}
.agate-compare-toggle:hover .agate-compare-icon { color: var(--agate-primary-fg); }

/* --- 2) Car-page pill button (Lovable buybox style) -------------------- */
.agate-compare-pill { position: static; }
.agate-pill-icon { color: #fff; }
.agate-compare-pill.is-on {
	background: rgba(255, 255, 255, 0.12);
	border-color: rgba(255, 255, 255, 0.35);
	color: #fff;
}

.agate-empty { padding: 3rem 0; text-align: center; color: var(--agate-muted-fg); }

/* =====================================================================
   PRICE BLOCK — the show/hide contract lives here
   ===================================================================== */
.agate-price-block {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.5rem;
	margin-bottom: 1rem;
}
/* Total price hidden → the installment centres alone, no leftover gap */
.agate-price-block.agate-price-solo { gap: 0; }
.agate-price-col { min-width: 0; }
.agate-price-divider { width: 1px; height: 2.5rem; background: var(--agate-border); }
.agate-price-label { margin: 0; font-size: 0.6875rem; color: var(--agate-muted-fg); }
.agate-price-value { margin: 0.125rem 0 0; font-size: 1.25rem; font-weight: 900; color: var(--agate-ink); }
.agate-price-installment { color: var(--agate-primary); }
.agate-price-cur { font-size: 0.75rem; font-weight: 500; }

/* Dark variant used on the car detail page */
.agate-price-dark {
	justify-content: flex-start;
	gap: 1.5rem;
	margin: 0;
}
.agate-price-dark .agate-price-label { color: rgba(255, 255, 255, 0.6); }
.agate-price-dark .agate-price-value,
.agate-price-dark .agate-price-installment { color: #fff; font-size: clamp(1.25rem, 3vw, 1.875rem); }
.agate-price-dark .agate-price-cur { color: rgba(255, 255, 255, 0.7); }
.agate-price-dark .agate-price-divider { background: rgba(255, 255, 255, 0.2); height: 3rem; }

/* =====================================================================
   APPLY CTA — dark gradient band
   ===================================================================== */
.agate-apply { position: relative; overflow: hidden; color: #fff; }
.agate-apply-bg { position: absolute; inset: 0; background: var(--agate-gradient-dark); }
.agate-apply .agate-relative { text-align: center; }
.agate-apply-eyebrow {
	display: inline-block;
	margin-bottom: 1.5rem;
	padding: 0.375rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--agate-radius-sm);
	background: rgba(255, 255, 255, 0.1);
	font-size: 0.75rem;
	font-weight: 700;
}
.agate-apply-title {
	margin: 0;
	font-size: clamp(1.5rem, 6vw, 3.75rem);
	font-weight: 900;
	line-height: 1.2;
	color: #fff;
}
.agate-apply-desc {
	max-width: 42rem;
	margin: 1.5rem auto 0;
	color: rgba(255, 255, 255, 0.7);
	font-size: 1rem;
}
.agate-apply .agate-btn { margin-top: 2rem; }

/* =====================================================================
   PURCHASE HERO + CONTACT FORM
   ===================================================================== */
.agate-purchase-hero { position: relative; overflow: hidden; padding-block: 3.5rem; text-align: center; }
.agate-purchase-title { margin: 0; font-size: clamp(1.875rem, 5vw, 3rem); font-weight: 900; }
.agate-purchase-desc { margin: 0.75rem 0 0; color: var(--agate-muted-fg); }

.agate-contact { position: relative; padding-block: 3.5rem; }
.agate-form-card { padding: 1.5rem; }
@media (min-width: 768px) { .agate-form-card { padding: 2.5rem; } }

.agate-form-field label,
.agate-field-label {
	display: block;
	margin-bottom: 0.375rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--agate-ink);
}
.agate-required { color: var(--agate-primary); }
.agate-input,
.agate-form-field input[type="text"],
.agate-form-field input[type="tel"],
.agate-form-field input[type="email"],
.agate-form-field input[type="number"],
.agate-form-field select,
.agate-form-field textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	background: var(--agate-bg);
	border: 1px solid var(--agate-input);
	border-radius: var(--agate-radius-sm);
	font-family: var(--agate-font);
	font-size: 0.875rem;
	color: var(--agate-ink);
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.agate-form-field textarea { resize: none; }
.agate-form-field input:focus,
.agate-form-field select:focus,
.agate-form-field textarea:focus {
	border-color: var(--agate-primary);
	box-shadow: 0 0 0 3px rgba(var(--agate-primary-rgb), 0.2);
}
.agate-form-error { margin: 0.25rem 0 0; font-size: 0.75rem; color: var(--agate-destructive); }

.agate-radio-row { display: flex; gap: 0.75rem; padding-top: 0.5rem; }
.agate-radio-pill {
	flex: 1;
	padding: 0.75rem 1rem;
	border: 2px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	text-align: center;
	font-weight: 700;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.agate-radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.agate-radio-pill.is-on {
	border-color: var(--agate-primary);
	background: rgba(var(--agate-primary-rgb), 0.05);
	color: var(--agate-primary);
}
.agate-form-divider { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--agate-border); }
.agate-form-subtitle { margin: 0 0 1rem; font-size: 1.25rem; font-weight: 900; }
.agate-form-actions { padding-top: 1.5rem; }

.agate-notice { margin-top: 1rem; padding: 1rem; border-radius: var(--agate-radius-sm); text-align: center; font-weight: 700; }
.agate-notice-success { background: rgba(37, 211, 102, 0.12); color: #0f7a3d; }
.agate-notice-error   { background: rgba(210, 43, 43, 0.10); color: var(--agate-destructive); }
.agate-notice[hidden] { display: none; }

/* Inline field note — رقم الجوال مسجل من قبل */
.agate-field-note {
	margin: 0.5rem 0 0;
	padding: 0.65rem 0.85rem;
	border-radius: var(--agate-radius-sm);
	background: rgba(210, 43, 43, 0.10);
	color: var(--agate-destructive);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.6;
}
.agate-field-note[hidden] { display: none; }
.agate-form-field input.agate-input-error,
input.agate-input-error {
	border-color: var(--agate-destructive) !important;
	box-shadow: 0 0 0 3px rgba(210, 43, 43, 0.12);
}

/* =====================================================================
   CAR DETAIL PAGE
   ===================================================================== */
.agate-car-hero { position: relative; overflow: hidden; padding-block: 3rem; }
.agate-crumb { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; color: var(--agate-muted-fg); }
.agate-crumb a { color: inherit; text-decoration: none; }
.agate-crumb a:hover { color: var(--agate-primary); }

.agate-car-layout { display: grid; gap: 2.5rem; align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .agate-car-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.agate-gallery-main {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: var(--agate-radius);
	background: linear-gradient(135deg, var(--agate-muted), var(--agate-bg) 50%, var(--agate-accent));
	box-shadow: 0 30px 60px -30px rgba(14, 27, 46, .5);
	overflow: hidden;
}
.agate-gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 2rem; }
.agate-gallery-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1rem; }
.agate-gallery-thumb {
	aspect-ratio: 1;
	padding: 0;
	background: #fff;
	border: 2px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	overflow: hidden;
	cursor: pointer;
}
.agate-gallery-thumb.is-on { border-color: var(--agate-primary); box-shadow: var(--agate-shadow-brand); }
.agate-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.agate-car-badge {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border-radius: var(--agate-radius-sm);
	background: rgba(var(--agate-primary-rgb), 0.1);
	color: var(--agate-primary);
	font-size: 0.75rem;
	font-weight: 700;
}
.agate-car-h1 { margin: 0.75rem 0 0; font-size: clamp(2rem, 6vw, 3.75rem); font-weight: 900; line-height: 1.15; color: var(--agate-ink); }
.agate-car-sub { margin: 0.5rem 0 0; font-size: 1.25rem; color: var(--agate-muted-fg); }

.agate-colors { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.5rem; }
.agate-colors-label { font-size: 0.875rem; color: var(--agate-muted-fg); }
.agate-color-dot { width: 2rem; height: 2rem; border: 2px solid #fff; border-radius: 9999px; box-shadow: 0 4px 10px -4px rgba(0,0,0,.4); }

.agate-buybox {
	margin-top: 2rem;
	padding: 1.5rem;
	border-radius: var(--agate-radius);
	background: linear-gradient(135deg, var(--agate-secondary), #070E1C);
	color: #fff;
}
.agate-buybox-actions { display: grid; gap: 0.75rem; margin-top: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .agate-buybox-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.agate-feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; margin: 2rem 0 0; padding: 0; list-style: none; font-size: 0.875rem; }
.agate-feature-list li { display: flex; align-items: flex-start; gap: 0.5rem; }

/* Specs table */
.agate-specs-card { border: 1px solid var(--agate-border); border-radius: var(--agate-radius); background: var(--agate-card); box-shadow: 0 20px 40px -30px rgba(14, 27, 46,.6); overflow: hidden; }
.agate-specs-head { padding: 1.25rem 1.5rem; background: linear-gradient(270deg, var(--agate-secondary), #070E1C); color: #fff; }
.agate-specs-head h2 { margin: 0; font-size: clamp(1.25rem, 3vw, 1.875rem); font-weight: 900; color: #fff; }
.agate-specs-head p { margin: 0.25rem 0 0; font-size: 0.8125rem; color: rgba(255,255,255,.7); }
.agate-specs-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.agate-specs-group th {
	padding: 0.625rem 1.5rem;
	background: linear-gradient(270deg, var(--agate-secondary), #070E1C);
	color: #fff;
	font-weight: 900;
	text-align: start;
}
.agate-specs-table tbody tr:nth-child(even) { background: rgba(242, 240, 235, 0.3); }
.agate-specs-key {
	width: 45%;
	padding: 0.5rem 1.5rem;
	background: rgba(var(--agate-primary-rgb), 0.08);
	color: var(--agate-primary);
	font-weight: 700;
	text-align: start;
	vertical-align: top;
	border-inline-start: 1px solid var(--agate-border);
	font-size: 0.8125rem;
}
.agate-specs-val { padding: 0.5rem 1.5rem; }
.agate-spec-yes { color: var(--agate-primary); font-weight: 900; }
.agate-spec-no  { color: var(--agate-muted-fg); }
@media (max-width: 640px) {
	.agate-specs-key, .agate-specs-val, .agate-specs-group th { padding-inline: 0.75rem; font-size: 0.75rem; }
	.agate-specs-key { width: 55%; }
}

/* Related cars */
.agate-related-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); margin-top: 1.5rem; }
@media (min-width: 768px) { .agate-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.agate-related-card { display: block; padding: 1.25rem; text-decoration: none; color: inherit; }
.agate-related-media { aspect-ratio: 5 / 3; display: flex; align-items: center; justify-content: center; margin-bottom: 0.75rem; }
.agate-related-media img { max-height: 100%; object-fit: contain; }
.agate-related-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.agate-related-price { color: var(--agate-primary); font-weight: 900; }

/* Sticky bottom bar */
.agate-sticky-bar {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 40;
	background: var(--agate-secondary);
	color: #fff;
	border-top: 4px solid var(--agate-brand);
	box-shadow: 0 -10px 30px -10px rgba(14, 27, 46, .5);
	transform: translateZ(0);
}
.agate-sticky-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.75rem; }
.agate-sticky-inner .agate-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 639px) {
	.agate-sticky-inner .agate-btn { padding: 0.625rem 0.875rem; font-size: 0.8125rem; gap: 0.375rem; }
}
.agate-sticky-title { margin: 0; font-size: 0.8125rem; font-weight: 900; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; }
.agate-sticky-sub { margin: 0; font-size: 0.6875rem; color: rgba(255,255,255,.9); line-height: 1.2; }
.agate-sticky-sub b { font-size: 0.8125rem; color: #fff; }
@media (min-width: 640px) {
	.agate-sticky-inner { padding-block: 1rem; }
	.agate-sticky-title { font-size: 1.5rem; }
	.agate-sticky-sub { font-size: 1rem; }
	.agate-sticky-sub b { font-size: 1.75rem; }
}
body.agate-has-sticky { padding-bottom: 5rem; }

/* =====================================================================
   COMPARE PAGE
   ===================================================================== */
.agate-compare-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.agate-compare-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: var(--agate-radius-sm);
	background: rgba(var(--agate-primary-rgb), 0.1);
	flex-shrink: 0;
}
.agate-compare-h1 { margin: 0; font-size: clamp(1.25rem, 4vw, 2.25rem); font-weight: 900; }
.agate-compare-sub { margin: 0; font-size: 0.8125rem; color: var(--agate-muted-fg); }
.agate-compare-clear { margin-inline-start: auto; background: none; border: 0; font-size: 0.75rem; color: var(--agate-muted-fg); cursor: pointer; }
.agate-compare-clear:hover { color: var(--agate-destructive); }

.agate-compare-empty { padding: 3rem; border: 2px dashed var(--agate-border); border-radius: var(--agate-radius); text-align: center; }
.agate-compare-scroll { overflow-x: auto; border: 1px solid var(--agate-border); border-radius: var(--agate-radius); background: var(--agate-card); }
.agate-compare-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.agate-compare-table th, .agate-compare-table td { border: 1px solid var(--agate-border); }
.agate-compare-crit { width: 8rem; padding: 0.75rem 1rem; background: var(--agate-muted); text-align: start; font-size: 0.75rem; }
@media (min-width: 640px) { .agate-compare-crit { width: 14rem; font-size: 0.875rem; } }
.agate-compare-col { position: relative; min-width: 8rem; padding: 1rem; vertical-align: top; text-align: center; }
@media (min-width: 640px) { .agate-compare-col { min-width: 12.5rem; } }
.agate-compare-col.is-cheapest { background: rgba(var(--agate-primary-rgb), 0.05); }
.agate-compare-remove {
	position: absolute;
	top: 0.25rem;
	inset-inline-start: 0.25rem;
	z-index: 10;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	background: rgba(210, 43, 43, 0.1);
	color: var(--agate-destructive);
	border: 0;
	border-radius: var(--agate-radius-sm);
	cursor: pointer;
}
.agate-compare-remove:hover { background: var(--agate-destructive); color: #fff; }
.agate-cheapest-badge {
	position: absolute;
	top: 0.25rem;
	inset-inline-end: 0.25rem;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.125rem 0.375rem;
	border-radius: var(--agate-radius-sm);
	background: var(--agate-gradient-brand);
	color: var(--agate-primary-fg);
	font-size: 0.625rem;
	font-weight: 700;
}
.agate-compare-add {
	width: 100%;
	min-height: 7.5rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: transparent;
	border: 2px dashed rgba(var(--agate-primary-rgb), 0.4);
	border-radius: var(--agate-radius-sm);
	color: var(--agate-primary);
	font-weight: 700;
	font-size: 0.8125rem;
	cursor: pointer;
}
.agate-compare-add:hover { background: rgba(var(--agate-primary-rgb), 0.05); }
.agate-compare-group th {
	padding: 0.5rem 1rem;
	background: linear-gradient(270deg, var(--agate-secondary), #070E1C);
	color: #fff;
	font-weight: 900;
	text-align: start;
	font-size: 0.8125rem;
}
.agate-compare-key { padding: 0.5rem 1rem; background: rgba(242, 240, 235, 0.6); text-align: start; font-weight: 600; font-size: 0.75rem; line-height: 1.4; }
.agate-compare-val { padding: 0.625rem; text-align: center; font-size: 0.75rem; }
.agate-compare-thumb { max-height: 3.5rem; object-fit: contain; margin-inline: auto; display: block; }
@media (min-width: 640px) { .agate-compare-thumb { max-height: 6rem; } }

/* Picker modal */
.agate-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, 0.7);
}
.agate-modal.is-open { display: flex; }
.agate-modal-box {
	width: 100%;
	max-width: 40rem;
	max-height: 80vh;
	overflow-y: auto;
	padding: 1.5rem;
	background: var(--agate-card);
	border-radius: var(--agate-radius);
}
.agate-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.agate-modal-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
@media (min-width: 560px) {
	.agate-modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.agate-modal-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	background: transparent;
	border: 1px solid var(--agate-border);
	border-radius: var(--agate-radius-sm);
	text-align: start;
	cursor: pointer;
}
.agate-modal-item:hover { border-color: var(--agate-primary); background: rgba(var(--agate-primary-rgb), 0.05); }
.agate-modal-item img { width: 3.25rem; height: 2.5rem; flex-shrink: 0; object-fit: contain; }
/* The global `overflow-wrap: anywhere` rule breaks these short names one
   letter per line inside a narrow column. Names are short — let them wrap
   normally and ellipsis if they still overflow. */
.agate-modal-item .agate-modal-text { flex: 1; min-width: 0; }
.agate-modal-item .agate-modal-name,
.agate-modal-item .agate-modal-meta {
	display: block;
	overflow-wrap: normal;
	word-break: normal;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.agate-modal-item .agate-modal-name { font-weight: 700; font-size: 0.875rem; }
.agate-modal-item .agate-modal-meta { font-size: 0.75rem; color: var(--agate-muted-fg); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.agate-footer { position: relative; background: #08111F; color: #fff; overflow: hidden; }
.agate-footer-bg {
	position: absolute;
	bottom: 0;
	inset-inline-start: 50%;
	transform: translateX(50%);
	width: 1400px;
	max-width: none;
	opacity: .1;
	pointer-events: none;
	user-select: none;
}
.agate-footer-veil {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, #08111F, rgba(8,17,31,.9), rgba(8,17,31,.7));
	pointer-events: none;
}
.agate-footer-glow {
	position: absolute;
	top: -10rem;
	inset-inline-end: 0;
	width: 500px;
	height: 500px;
	border-radius: 9999px;
	background: rgba(var(--agate-primary-rgb), 0.2);
	filter: blur(64px);
	pointer-events: none;
}
.agate-footer-grid {
	position: relative;
	display: grid;
	gap: 2.5rem;
	grid-template-columns: minmax(0, 1fr);
	padding-block: 4rem;
}
@media (min-width: 768px) {
	.agate-footer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.agate-footer-about { grid-column: span 2; }
}
.agate-footer .agate-footer-logo { height: 5rem; width: auto; max-width: 100%; margin-bottom: 1rem; display: block; } /* (0,2,0) beats the generic img height:auto reset */
.agate-footer-about p { max-width: 28rem; margin: 0; color: rgba(255, 255, 255, 0.7); }
.agate-footer h4 { margin: 0 0 1rem; font-size: 1.125rem; font-weight: 700; color: #fff; }
.agate-footer ul { list-style: none; margin: 0; padding: 0; }
.agate-footer-links li { margin-bottom: 0.5rem; }
.agate-footer-links a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.agate-footer-links a:hover { color: var(--agate-primary); }
.agate-footer-contact li { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; color: rgba(255, 255, 255, 0.7); font-size: 0.875rem; }
.agate-footer-contact a { color: inherit; text-decoration: none; }
.agate-footer-contact a:hover { color: var(--agate-primary); }
.agate-socials { display: flex; gap: 0.75rem; margin-top: 1.25rem; }
.agate-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: var(--agate-radius-sm);
}
.agate-social-link:hover { border-color: var(--agate-primary); }
.agate-footer-bottom { position: relative; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.agate-footer-bottom .agate-wrap { padding-block: 1.25rem; text-align: center; font-size: 0.875rem; color: rgba(255, 255, 255, 0.5); }
.agate-credit { margin: 0.5rem 0 0; font-size: 0.8125rem; color: rgba(255, 255, 255, 0.45); }
.agate-credit a { color: rgba(255, 255, 255, 0.7); text-decoration: none; }
.agate-credit a:hover { color: var(--agate-primary); }

/* =====================================================================
   ELEMENTOR / THEME OVERRIDES
   ===================================================================== */
.elementor-widget-agate-header,
.elementor-widget-agate-footer,
.elementor-widget-agate-hero { width: 100%; }
.elementor-section, .elementor-container, .e-con, .e-con-inner { background-color: transparent; }
[class^="agate-"] a { text-decoration: none; }
[class^="agate-"] button { font-family: var(--agate-font); }

/* Total-price value — inherits .agate-price-value, kept as its own hook so the
   client can restyle only the total without touching the installment. */
.agate-price-total { color: var(--agate-ink); }
.agate-price-dark .agate-price-total { color: #fff; }

/* Admin-only helpers (WP dashboard meta box). Harmless on the front end. */
.agate-mb { max-width: 100%; }
.agate-mb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.agate-price-note { background: #fff8e5; border-inline-start: 4px solid #dba617; padding: 10px 12px; margin: 10px 0; }

/* =====================================================================
   FLOATING WHATSAPP BUTTON — زر واتساب عائم ثابت (site-wide)
   Physical positioning on purpose: "يمين" always means visual right,
   in both RTL and LTR. Internal direction forced LTR so the label
   always expands toward the middle of the screen.
   ===================================================================== */
.agate-wafloat {
	position: fixed;
	bottom: var(--agate-wa-offset, 20px);
	z-index: 90;
	direction: ltr;
	display: inline-flex;
	align-items: center;
	gap: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #25D366;
	color: #FFFFFF !important;
	text-decoration: none !important;
	font-family: var(--agate-font);
	box-shadow: 0 14px 34px -10px rgba(37, 211, 102, .65), 0 2px 8px rgba(14, 27, 46, .18);
	transition: transform .25s cubic-bezier(.22,1,.36,1), box-shadow .25s ease, background .25s ease;
	-webkit-tap-highlight-color: transparent;
}
.agate-wafloat.is-right { right: var(--agate-wa-offset, 20px); flex-direction: row-reverse; }
.agate-wafloat.is-left  { left:  var(--agate-wa-offset, 20px); flex-direction: row; }

.agate-wafloat:hover,
.agate-wafloat:focus-visible {
	background: #1FBE5B;
	color: #FFFFFF !important;
	transform: translateY(-2px);
	box-shadow: 0 20px 44px -12px rgba(37, 211, 102, .8), 0 3px 10px rgba(14, 27, 46, .22);
}
.agate-wafloat:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 3px; }

.agate-wafloat-icon {
	position: relative;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 3.5rem;
	height: 3.5rem;
	flex: 0 0 auto;
	border-radius: 999px;
	color: #FFFFFF;
}
.agate-wafloat-icon svg { display: block; width: 28px; height: 28px; }

/* Label pill — hidden until hover on desktop, never shown on touch */
.agate-wafloat-label {
	position: relative;
	z-index: 2;
	direction: rtl;
	unicode-bidi: isolate;
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	opacity: 0;
	font-size: 0.9375rem;
	font-weight: 800;
	line-height: 1;
	color: #FFFFFF;
	transition: max-width .35s cubic-bezier(.22,1,.36,1), opacity .2s ease, padding .35s cubic-bezier(.22,1,.36,1);
}
.agate-wafloat.is-right .agate-wafloat-label { padding-right: 0; padding-left: 0; }
.agate-wafloat:hover .agate-wafloat-label,
.agate-wafloat:focus-visible .agate-wafloat-label {
	max-width: 16rem;
	opacity: 1;
}
.agate-wafloat.is-right:hover .agate-wafloat-label,
.agate-wafloat.is-right:focus-visible .agate-wafloat-label { padding-left: 1.125rem; }
.agate-wafloat.is-left:hover .agate-wafloat-label,
.agate-wafloat.is-left:focus-visible .agate-wafloat-label { padding-right: 1.125rem; }

/* Pulse ring */
.agate-wafloat-ring {
	position: absolute;
	top: 0;
	z-index: 1;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 999px;
	background: rgba(37, 211, 102, .55);
	pointer-events: none;
	opacity: 0;
}
.agate-wafloat.is-right .agate-wafloat-ring { right: 0; }
.agate-wafloat.is-left  .agate-wafloat-ring { left: 0; }
.agate-wafloat.has-pulse .agate-wafloat-ring {
	opacity: 1;
	animation: agate-wafloat-pulse 2.4s cubic-bezier(.22,1,.36,1) infinite;
}
.agate-wafloat:hover .agate-wafloat-ring { animation-play-state: paused; opacity: 0; }

@keyframes agate-wafloat-pulse {
	0%   { transform: scale(1);    opacity: .55; }
	70%  { transform: scale(1.75); opacity: 0; }
	100% { transform: scale(1.75); opacity: 0; }
}

/* Lift above the single-car sticky bottom bar */
body.agate-has-sticky .agate-wafloat { bottom: calc(var(--agate-wa-offset, 20px) + 5.25rem); }

/* Device targeting */
@media (max-width: 767px) {
	.agate-wafloat.is-dev-desktop { display: none !important; }
	.agate-wafloat-icon { width: 3.25rem; height: 3.25rem; }
	.agate-wafloat-ring { width: 3.25rem; height: 3.25rem; }
	.agate-wafloat-label { display: none; }
}
@media (min-width: 768px) {
	.agate-wafloat.is-dev-mobile { display: none !important; }
}
/* Touch devices: no hover state, so keep it a clean circle */
@media (hover: none) {
	.agate-wafloat-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.agate-wafloat,
	.agate-wafloat-label { transition: none; }
	.agate-wafloat.has-pulse .agate-wafloat-ring { animation: none; opacity: 0; }
	.agate-wafloat:hover { transform: none; }
}

/* Brand logo -> filter jump (marquee items are <button> now) */
button.agate-marquee-item.agate-brand-jump {
	appearance: none;
	-webkit-appearance: none;
	background: transparent;
	border: 0;
	padding: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
	border-radius: var(--agate-radius-sm);
	transition: transform .3s cubic-bezier(.22,1,.36,1), background .3s ease;
}
button.agate-brand-jump:hover { background: rgba(255,255,255,.06); }
button.agate-brand-jump:focus-visible { outline: 2px solid rgba(255,255,255,.85); outline-offset: 2px; }
button.agate-brand-jump.is-picked { background: rgba(168, 129, 61, .35); transform: scale(.94); }
