/**
 * AMIR SUITE — Mobile Header Nav CSS v1
 * Loaded AFTER nav-desktop.css (see get_style_depends()), so all the shared
 * .as-nd-* rules (gradient border, glow, glass, centering fix, shadows,
 * action-btn styling, etc.) already apply. This file only adds the bits
 * unique to this widget: the 3-column centered-logo row2, and the
 * hamburger drawer menu.
 */

/* Show only below desktop width — this widget is the mobile counterpart
   of the desktop nav, so it should never render at the same time. */
.as-nmh-bar.hide-desktop,
.as-nd-gb-wrap.hide-desktop {
	display: block; /* default for <1025px; overridden below */
}

@media (min-width: 1025px) {
	.as-nmh-bar.hide-desktop,
	.as-nd-gb-wrap.hide-desktop {
		display: none !important;
	}
}

/* Robust horizontal centering, same fix as Desktop Nav — this rule is
   scoped per-widget-class, so it needed its own copy here; without it,
   "فاصله از لبه‌ها" and "حداکثر عرض منو" could conflict (one control's
   plain `margin` shorthand silently cancelling the other's
   `margin-inline: auto`), leaving the bar narrower than expected and
   shifted to one side instead of centered — exactly the bug seen when
   this widget's width didn't match the desktop nav's. */
.elementor-widget-amir-suite-nav-mobile-header > .elementor-widget-container {
	display: flex;
	justify-content: center;
	width: 100%;
}

/* ══════════════════════════════════════════
   ROW 0 — countdown alone (new topmost row)
══════════════════════════════════════════ */
.as-nmh-row0-inner {
	padding-inline: 16px;
	justify-content: center;
}

/* ══════════════════════════════════════════
   ROW 1 — ticker alone
══════════════════════════════════════════ */
.as-nmh-row1-inner {
	padding-inline: 16px;
}

/* Font-icon fallback sizing (Icons_Manager can render <i> instead of <svg>
   when the user picks a Font Awesome icon for the customizable left button) */
.as-nd-action-btn i { font-size: 18px; line-height: 1; }

/* ══════════════════════════════════════════
   TICKER — smooth-scroll ("marquee") effect
   Renders every item twice back-to-back in one flex track, animated with
   a continuous translateX loop — duplicating the content is what makes
   the wrap-around invisible. Direction mirrors for RTL bars so the scroll
   still moves toward the reading-start side.
══════════════════════════════════════════ */
.as-nd-ticker-viewport.is-marquee { overflow: hidden; }

.as-nd-ticker-track {
	--nd-marquee-speed: 18s;
	display: flex;
	align-items: center;
	gap: 40px;
	width: max-content;
	white-space: nowrap;
	animation: as-nd-marquee var(--nd-marquee-speed) linear infinite;
}

.as-nd-ticker-viewport.is-marquee:hover .as-nd-ticker-track {
	animation-play-state: paused;
}

.as-nd-ticker-track .as-nd-ticker-marquee-item { flex-shrink: 0; }

@keyframes as-nd-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

.as-nd-bar[dir="rtl"] .as-nd-ticker-track {
	animation-name: as-nd-marquee-rtl;
}

@keyframes as-nd-marquee-rtl {
	from { transform: translateX(0); }
	to   { transform: translateX(50%); }
}

@media (prefers-reduced-motion: reduce) {
	.as-nd-ticker-track { animation: none; }
}

/* ══════════════════════════════════════════
   ROW 2 — hamburger (physical RIGHT) / logo (center) / action button
   (physical LEFT). Uses absolute positioning with literal `left`/`right`
   instead of a direction-aware grid — this keeps the sides fixed to the
   requested physical edges regardless of the site's text direction
   (is_rtl() isn't always reliable for this), rather than "start/end"
   flipping with dir="rtl"/"ltr".
══════════════════════════════════════════ */
.as-nmh-row2-inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	padding-inline: 16px;
	min-height: inherit;
}

.as-nmh-hamburger-btn {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
}

.as-nmh-row2-inner .as-nd-cart-btn {
	position: absolute;
	left: 4px;
	top: 50%;
	transform: translateY(-50%);
}

.as-nmh-logo {
	font-size: 20px;
}

/* ══════════════════════════════════════════
   DRAWER MENU (opened by the hamburger button)
══════════════════════════════════════════ */
.as-nmh-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
}

.as-nmh-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
}

.as-nmh-drawer-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.55);
	opacity: 0;
	transition: opacity .3s ease;
}

.as-nmh-drawer.is-open .as-nmh-drawer-backdrop { opacity: 1; }

.as-nmh-drawer-panel {
	position: absolute;
	top: 0;
	inset-inline-end: 0;
	height: 100%;
	width: min(78vw, 320px);
	background-color: #0d1117;
	box-shadow: -8px 0 32px rgba(0,0,0,.4);
	padding: 20px;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	overflow-y: auto;
}

.as-nmh-drawer-panel[dir="ltr"] { transform: translateX(-100%); }

.as-nmh-drawer.is-open .as-nmh-drawer-panel { transform: translateX(0); }

.as-nmh-drawer-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-inline-start: auto;
	margin-bottom: 12px;
	background: rgba(255,255,255,.06);
	border: none;
	border-radius: 50%;
	color: #f0f6fc;
	font-size: 15px;
	cursor: pointer;
}

.as-nmh-drawer-nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.as-nmh-drawer-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 10px;
	border-radius: 8px;
	color: rgba(240,246,252,.9);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	transition: background-color .2s, color .2s;
}

.as-nmh-drawer-link:hover { background-color: rgba(255,255,255,.06); }

.as-nmh-drawer-link.is-active { color: var(--nd-nav-active, #4ee08a); }

@media (prefers-reduced-motion: reduce) {
	.as-nmh-drawer-panel, .as-nmh-drawer-backdrop { transition: none; }
}
