/* ===================== Ahjar Homepage – front end ===================== */

/* Empty shortcode (slider off / no offers): hide the widget and the Elementor container that holds it */
.ahjar-empty-slot { display: none !important; }
body:not(.elementor-editor-active) .elementor-widget-shortcode:has(.ahjar-empty-slot),
body:not(.elementor-editor-active) .e-con:has(> .elementor-widget-shortcode .ahjar-empty-slot),
body:not(.elementor-editor-active) .e-con:has(> .e-con-inner > .elementor-widget-shortcode .ahjar-empty-slot),
body:not(.elementor-editor-active) .elementor-column:has(> .elementor-widget-wrap > .elementor-widget-shortcode .ahjar-empty-slot) { display: none !important; }

/* Show/hide helpers for Elementor elements */
body.ahjar-hero-mode-slider .ahjar-hide-in-slider-mode,
body.ahjar-hero-mode-video .ahjar-hide-in-video-mode { display: none !important; }

.ahjar-admin-note {
	padding: 12px 16px; margin: 0; background: #fff8e5; border: 1px dashed #dba617; color: #6b4b00;
	font: 14px/1.5 system-ui, sans-serif; text-align: center;
}

/* ---------- Hero (video + slider) ---------- */
.ahjar-hero {
	--ahjar-speed: 1000ms;
	--ahjar-interval: 5000ms;
	position: relative; width: 100%; overflow: hidden; isolation: isolate;
	height: calc(var(--ahjar-hd, 100) * 1vh);
	background: #1b0a0d; color: #fff;
}
@media (max-width: 767px) {
	.ahjar-hero { height: calc(var(--ahjar-hm, 100) * 1vh); }
	@supports (height: 1svh) {
		.ahjar-hero { height: calc(var(--ahjar-hm, 100) * 1svh); }
	}
}

.ahjar-hero__video {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
}
.ahjar-hero__overlay {
	position: absolute; inset: 0; z-index: 3; pointer-events: none;
	background: linear-gradient(180deg, rgba(0,0,0,calc(var(--ahjar-ov) + .1)) 0%, rgba(0,0,0,var(--ahjar-ov)) 40%, rgba(0,0,0,calc(var(--ahjar-ov) + .05)) 100%);
}

.ahjar-hero__slides { position: absolute; inset: 0; }
.ahjar-hero__slide {
	position: absolute; inset: 0; overflow: hidden;
	opacity: 0; visibility: hidden; z-index: 0;
}
.ahjar-hero__slide picture,
.ahjar-hero__link { display: block; width: 100%; height: 100%; }
.ahjar-hero__img {
	display: block; width: 100% !important; height: 100% !important; max-width: none !important;
	object-fit: cover; object-position: center; border-radius: 0 !important;
	transform-origin: center; will-change: transform; user-select: none; -webkit-user-drag: none;
}

/* Slide up under the transparent header, like the existing Elementor hero */
.ahjar-hero--slider { margin-top: calc(var(--ahjar-pd, 0) * -1px); }
@media (max-width: 767px) {
	.ahjar-hero--slider { margin-top: calc(var(--ahjar-pm, 0) * -1px); }
}

/* Fade – the new slide fades in on top; the old one is released instantly once covered
   (no fade-out, so its zoom never "snaps back" while visible = no layout shift / CLS) */
.ahjar-hero.is-fade .ahjar-hero__slide { transition: none; }
.ahjar-hero.is-fade .ahjar-hero__slide.is-prev { opacity: 1; visibility: visible; z-index: 1; transition: none; }
.ahjar-hero.is-fade .ahjar-hero__slide.is-active { opacity: 1; visibility: visible; z-index: 2; transition: opacity var(--ahjar-speed) cubic-bezier(.4,0,.2,1), visibility 0s; }

/* Slide */
.ahjar-hero.is-slide .ahjar-hero__slide { opacity: 1; }
.ahjar-hero.is-slide .ahjar-hero__slide.is-active { visibility: visible; z-index: 2; }

/* Slow zoom (Ken Burns) */
@keyframes ahjarKenBurns {
	from { transform: scale(1); }
	to   { transform: scale(1.09); }
}
.ahjar-hero.is-kenburns .ahjar-hero__slide.is-active .ahjar-hero__img,
.ahjar-hero.is-kenburns .ahjar-hero__slide.is-prev .ahjar-hero__img {
	animation: ahjarKenBurns calc(var(--ahjar-interval) + var(--ahjar-speed) * 2) linear forwards;
}

/* Arrows */
.ahjar-hero__arrow {
	position: absolute; top: 50%; z-index: 6; transform: translateY(-50%);
	width: 54px; height: 54px; padding: 0; margin: 0; border-radius: 50%;
	display: flex; align-items: center; justify-content: center; cursor: pointer;
	color: #fff; background: rgba(20, 6, 9, .22); border: 1px solid rgba(255,255,255,.45);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	transition: background .3s, border-color .3s, transform .3s, opacity .3s; opacity: .85;
	box-shadow: none; line-height: 1;
}
.ahjar-hero__arrow svg { width: 22px; height: 22px; display: block; }
.ahjar-hero__arrow:hover, .ahjar-hero__arrow:focus-visible {
	background: rgba(255,255,255,.95); color: #4a0e17; border-color: #fff; opacity: 1; outline: none;
}
.ahjar-hero__arrow--prev { inset-inline-start: clamp(14px, 3vw, 40px); }
.ahjar-hero__arrow--next { inset-inline-end: clamp(14px, 3vw, 40px); }
.ahjar-hero.is-rtl .ahjar-hero__arrow svg { transform: scaleX(-1); }

/* Dots */
.ahjar-hero__dots {
	position: absolute; left: 50%; bottom: clamp(22px, 4vh, 40px); z-index: 6; transform: translateX(-50%);
	display: flex; gap: 10px; align-items: center;
}
.ahjar-hero__dot {
	width: 9px; height: 9px; padding: 0; margin: 0; border-radius: 9px; border: 0; cursor: pointer;
	background: rgba(255,255,255,.5); transition: width .4s cubic-bezier(.4,0,.2,1), background .3s; box-shadow: none; min-height: 0;
}
.ahjar-hero__dot:hover { background: rgba(255,255,255,.85); }
.ahjar-hero__dot.is-active { width: 30px; background: #fff; }
.ahjar-hero__dot:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Progress line */
@keyframes ahjarProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ahjar-hero__progress {
	position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 6; background: rgba(255,255,255,.18);
}
.ahjar-hero__progress span {
	display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left center;
}
.ahjar-hero.is-rtl .ahjar-hero__progress span { transform-origin: right center; }
.ahjar-hero.is-running .ahjar-hero__progress span { animation: ahjarProgress var(--ahjar-interval) linear forwards; }
.ahjar-hero.is-paused .ahjar-hero__progress span,
.ahjar-hero.is-paused .ahjar-hero__img { animation-play-state: paused !important; }
.ahjar-hero.no-progress .ahjar-hero__progress { opacity: 0; }

@media (max-width: 767px) {
	.ahjar-hero__arrow { display: none; }
	.ahjar-hero__dots { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
	.ahjar-hero .ahjar-hero__img { animation: none !important; }
	.ahjar-hero .ahjar-hero__slide { transition-duration: 1ms !important; }
}

/* ---------- Offers ---------- */
.ahjar-offers {
	--ahjar-accent: #4a0e17;
	--ahjar-gap: clamp(12px, 2vw, 24px);
	position: relative; width: 100%; max-width: 1320px; margin: 0 auto; box-sizing: border-box;
	padding: clamp(30px, 5vw, 60px) clamp(14px, 3vw, 24px);
}
.ahjar-offers__head { text-align: center; margin-bottom: clamp(20px, 3vw, 36px); }
.ahjar-offers__title {
	margin: 0; color: var(--ahjar-accent); font-family: "Crimson Text", serif;
	font-size: clamp(28px, 3.4vw, 45px); line-height: 1.2; font-weight: 600;
}
.ahjar-offers__title::after {
	content: ""; display: block; width: 56px; height: 2px; margin: 14px auto 0;
	background: linear-gradient(90deg, transparent, #c9a24a, transparent);
}
.ahjar-offers__subtitle { margin: 12px auto 0; max-width: 620px; color: #6b5a5c; font-size: 16px; }

.ahjar-offers__track { display: grid; gap: var(--ahjar-gap); margin: 0 !important; padding: 0 !important; }
.ahjar-offers--grid .ahjar-offers__track { grid-template-columns: repeat(var(--ahjar-cols, 4), minmax(0, 1fr)); }
.ahjar-offers--carousel .ahjar-offers__viewport {
	/* Clipping wrapper: also works around a Chrome paint bug with RTL horizontal scrollers */
	position: relative; overflow: hidden; padding: 10px 2px 22px; margin: -10px -2px -22px;
}
.ahjar-offers--carousel .ahjar-offers__track {
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - var(--ahjar-gap) * (var(--ahjar-cols, 4) - 1)) / var(--ahjar-cols, 4));
	overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
	/* no CSS scroll-behavior:smooth here – it blanks the page in Chrome for RTL scrollers; JS scrolls smoothly instead */
	scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 6px !important;
}
.ahjar-offers--carousel .ahjar-offers__track::-webkit-scrollbar { display: none; }
.ahjar-offers--carousel .ahjar-offer { scroll-snap-align: start; }

@media (max-width: 767px) {
	.ahjar-offers--grid .ahjar-offers__track { grid-template-columns: repeat(var(--ahjar-cols-m, 2), minmax(0, 1fr)); }
	.ahjar-offers--carousel .ahjar-offers__track {
		/* show a peek of the next card so visitors know they can swipe */
		grid-auto-columns: calc((100% - var(--ahjar-gap) * var(--ahjar-cols-m, 2)) / (var(--ahjar-cols-m, 2) + .25));
	}
}

/* Card */
.ahjar-offer {
	display: flex; flex-direction: column; min-width: 0; margin: 0 !important; width: auto !important; float: none !important;
	background: #fff; border-radius: 16px; overflow: hidden;
	border: 1px solid rgba(74, 14, 23, .08);
	box-shadow: 0 2px 10px rgba(74, 14, 23, .05);
	transition: transform .35s cubic-bezier(.4,0,.2,1), box-shadow .35s;
}
.ahjar-offer:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(74, 14, 23, .12); }
.ahjar-offer__media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: #f6f1ee; }
.ahjar-offer__media img, .ahjar-offer__img {
	width: 100% !important; height: 100% !important; object-fit: cover; display: block; margin: 0 !important;
	transition: transform .7s cubic-bezier(.4,0,.2,1);
}
.ahjar-offer:hover .ahjar-offer__media img { transform: scale(1.06); }
.ahjar-offer__badge {
	position: absolute; top: 12px; inset-inline-start: 12px; z-index: 2;
	background: var(--ahjar-accent); color: #fff; font-weight: 700; font-size: 13px; line-height: 1;
	padding: 7px 11px; border-radius: 30px; letter-spacing: .3px; direction: ltr;
	box-shadow: 0 4px 12px rgba(74, 14, 23, .25);
}
.ahjar-offer__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; text-align: center; }
.ahjar-offer__title { margin: 0 !important; font-size: 16px !important; line-height: 1.45 !important; font-weight: 600; padding: 0 !important; }
.ahjar-offer__title a {
	color: #2a1a1c; text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ahjar-offer__title a:hover { color: var(--ahjar-accent); }
.ahjar-offer__price { font-size: 15px; color: var(--ahjar-accent); font-weight: 700; display: flex; gap: 8px; justify-content: center; align-items: baseline; flex-wrap: wrap; }
.ahjar-offer__price del { color: #a39597; font-weight: 400; font-size: 13px; opacity: 1; }
.ahjar-offer__price ins { text-decoration: none; background: none; color: var(--ahjar-accent); }
.ahjar-offer__actions { margin-top: auto; padding-top: 4px; }
.ahjar-offer__actions .button,
.ahjar-offer__actions a.button {
	display: flex !important; align-items: center; justify-content: center; width: 100%; box-sizing: border-box;
	margin: 0 !important; padding: 11px 14px !important; border-radius: 40px !important;
	background: var(--ahjar-accent) !important; color: #fff !important; border: 1px solid var(--ahjar-accent) !important;
	font-size: 14px !important; font-weight: 600 !important; line-height: 1.2 !important; text-align: center;
	transition: background .25s, color .25s;
}
.ahjar-offer__actions .button:hover { background: #fff !important; color: var(--ahjar-accent) !important; }
.ahjar-offer__actions .added_to_cart { display: block; margin-top: 8px; font-size: 13px; color: var(--ahjar-accent); }
.ahjar-offer__actions .button.loading { opacity: .7; }
@media (max-width: 767px) {
	.ahjar-offer__body { padding: 12px 10px 12px; gap: 6px; }
	.ahjar-offer__title { font-size: 14px !important; }
	.ahjar-offer__price { font-size: 14px; }
	.ahjar-offer__actions .button, .ahjar-offer__actions a.button { padding: 9px 8px !important; font-size: 13px !important; }
	.ahjar-offer__badge { top: 8px; inset-inline-start: 8px; font-size: 12px; padding: 6px 9px; }
}

/* Carousel arrows */
.ahjar-offers__nav { display: flex; justify-content: center; gap: 12px; margin-top: 22px; }
.ahjar-offers__arrow {
	width: 46px; height: 46px; padding: 0; margin: 0; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center; line-height: 1; box-shadow: none;
	background: #fff; color: var(--ahjar-accent); border: 1px solid rgba(74, 14, 23, .25);
	transition: background .25s, color .25s, opacity .25s;
}
.ahjar-offers__arrow svg { width: 20px; height: 20px; display: block; }
.ahjar-offers__arrow:hover:not(:disabled) { background: var(--ahjar-accent); color: #fff; border-color: var(--ahjar-accent); }
.ahjar-offers__arrow:disabled { opacity: .35; cursor: default; }
.ahjar-offers.is-rtl .ahjar-offers__arrow svg { transform: scaleX(-1); }
.ahjar-offers__nav.is-hidden { display: none; }

.ahjar-offers__foot { text-align: center; margin-top: 28px; }
.ahjar-offers__btn {
	display: inline-block; padding: 13px 34px; border-radius: 40px; text-decoration: none;
	border: 1px solid var(--ahjar-accent); color: var(--ahjar-accent); font-weight: 600;
	transition: background .25s, color .25s;
}
.ahjar-offers__btn:hover { background: var(--ahjar-accent); color: #fff; }
