.agah-mh-wrapper {
	--agah-mh-primary: #a96045;
	--agah-mh-bg: #fffaf7;
	--agah-mh-text: #3f2c25;
	--agah-mh-muted: #8b6b5f;
	--agah-mh-border: #ead9d1;
	--agah-mh-white: #ffffff;
	--agah-mh-badge: #a96045;
	--agah-mh-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
	--agah-mh-radius: 16px;
	color: var(--agah-mh-text);
	font-family: 'iransans', sans-serif;
}

.agah-mh-wrapper * {
	box-sizing: border-box;
}
.agah-mh-wrapper [type=button]:focus,.agah-mh-wrapper [type=button]:hover,.agah-mh-wrapper [type=submit]:focus,.agah-mh-wrapper [type=submit]:hover,.agah-mh-wrapper button:focus,.agah-mh-wrapper button:hover {
    background: rgba(169, 96, 69, 0.1) !important;
    color: #a96045;
}

.agah-mh-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: var(--agah-mh-white);
	border-bottom: 1px solid var(--agah-mh-border);
	padding: 12px 16px;
}

.agah-mh-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.agah-mh-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.agah-mh-logo {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: rgba(169, 96, 69, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--agah-mh-primary);
	font-weight: bold;
	flex-shrink: 0;
	overflow: hidden;
}

.agah-mh-logo img {
	width: 60%;
	height: 60%;
	object-fit: cover;
}

.agah-mh-title {
	font-size: 16px;
	font-weight: 800;
	color : #a96045;
	font-family:'yekanbakh' !important;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.agah-mh-subtitle {
	font-size: 12px;
	color: #6F625B;
}

.agah-mh-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.agah-mh-icon-button {
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 14px;
	background: rgba(169, 96, 69, 0.1);
	color: var(--agah-mh-primary);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
	text-decoration: none;
	padding: 0;
}

.agah-mh-icon-button svg {
	width: 22px;
	height: 22px;
}

.agah-mh-cart-button img {
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.agah-mh-cart-badge {
	position: absolute;
	top: 4px;
	left: 4px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--agah-mh-badge);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	border: 2px solid #fff;
}

.agah-mh-backdrop {
	position: fixed;
	inset: 0;
	background: rgba(32, 23, 19, 0.45);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
	z-index: 1100;
}

.agah-mh-backdrop.active {
	opacity: 1;
	pointer-events: auto;
}

.agah-mh-sidebar {
	position: fixed;
	top: 0;
	right: 0;
	width: min(86vw, 340px);
	height: 100vh;
	background: var(--agah-mh-white);
	box-shadow: var(--agah-mh-shadow);
	transform: translateX(100%);
	transition: transform 0.28s ease;
	z-index: 1200;
	display: flex;
	flex-direction: column;
}

.agah-mh-sidebar.active {
	transform: translateX(0);
}

.agah-mh-sidebar-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 16px;
	border-bottom: 1px solid var(--agah-mh-border);
	background: var(--agah-mh-bg);
}

.agah-mh-sidebar-title {
	font-size: 16px;
	font-weight: 700;
	color: var(--agah-mh-primary);
}

.agah-mh-close-button {
    padding: 0;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 12px;
	background: rgba(169, 96, 69, 0.1);
	color: var(--agah-mh-primary);
	font-size: 22px;
	cursor: pointer;
}

.agah-mh-sidebar-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	padding: 16px;
	padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	overflow-y: auto;
}

.agah-mh-user-card {
	background: var(--agah-mh-bg);
	border: 1px solid var(--agah-mh-border);
	border-radius: var(--agah-mh-radius);
	padding: 14px;
	margin-bottom: 16px;
}

.agah-mh-user-card-title {
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 4px;
}

.agah-mh-user-card-text {
	font-size: 13px;
	color: var(--agah-mh-muted);
	line-height: 1.8;
}

.agah-mh-nav {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
}

.agah-mh-nav a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	text-decoration: none;
	padding: 14px;
	border-radius: 14px;
	color: var(--agah-mh-text);
	background: #fff;
	border: 0.3px solid var(--agah-mh-border);
	transition: background 0.2s ease, border-color 0.2s ease;

}
.agah-mh-nav a span{
    	font-size:14px;
	font-weight: 600;
}
.agah-mh-nav a:hover {
	background: var(--agah-mh-bg);
	border-color: #dcbeb2;
}

.agah-mh-nav-empty {
	padding: 12px;
	border: 1px dashed var(--agah-mh-border);
	border-radius: 12px;
	color: var(--agah-mh-muted);
	font-size: 13px;
}

/* Account button (pinned to top of nav) */
.agah-mh-account-wrap {
	display: flex;
	flex-direction: column;
}

.agah-mh-sidebar-body .agah-mh-account {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	text-align: inherit;
	text-decoration: none;
	padding: 14px;
	border-radius: 14px;
	color: var(--agah-mh-primary);
	background: rgba(169, 96, 69, 0.1);
	border: 1px solid rgba(169, 96, 69, 0.32);
	font-family: inherit;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.agah-mh-sidebar-body .agah-mh-account:hover,
.agah-mh-sidebar-body .agah-mh-account:focus {
	background: rgba(169, 96, 69, 0.16) !important;
	border-color: rgba(169, 96, 69, 0.45);
	color: var(--agah-mh-primary);
}

/* Plain link variant (logged-out login, or logged-in with no submenu) is centered like the exit button. */
.agah-mh-sidebar-body .agah-mh-account-link {
	justify-content: center;
}

.agah-mh-account-main {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.agah-mh-account-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.agah-mh-account-icon img,
.agah-mh-account-icon svg {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

.agah-mh-sidebar-body .agah-mh-account-label {
	font-size: 14px;
	font-weight: 700;
}

.agah-mh-account-caret {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	transition: transform 0.25s ease;
}

.agah-mh-account-wrap.open .agah-mh-account-caret {
	transform: rotate(180deg);
}

.agah-mh-account-submenu {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-height: 0;
	margin-top: 0;
	opacity: 0;
	overflow: hidden;
	/* Nesting cue: indent the group and run an accent rail down the start edge
	   (right in RTL) so submenu items read as children of the account button
	   instead of blending in with the top-level menu items. */
	margin-right: 13px;
	padding: 0 12px 0 0;
	border-right: 2px solid rgba(169, 96, 69, 0.25);
	transition: max-height 0.28s ease, margin-top 0.28s ease, opacity 0.2s ease;
}

.agah-mh-account-wrap.open .agah-mh-account-submenu {
	max-height: 600px;
	margin-top: 10px;
	opacity: 1;
}

.agah-mh-account-submenu a {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	text-decoration: none;
	padding: 9px 12px;
	border-radius: 10px;
	color: var(--agah-mh-muted);
	background: var(--agah-mh-bg);
	border: 1px solid transparent;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.agah-mh-account-submenu a:hover,
.agah-mh-account-submenu a.active {
	background: rgba(169, 96, 69, 0.08);
	border-color: var(--agah-mh-border);
	color: var(--agah-mh-primary);
}

.agah-mh-submenu-main {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.agah-mh-submenu-label {
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Icon chip for each submenu item (echoes the account button's own icon). */
.agah-mh-submenu-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 9px;
	background: rgba(169, 96, 69, 0.12);
	color: var(--agah-mh-primary);
	flex-shrink: 0;
}

.agah-mh-submenu-icon img,
.agah-mh-submenu-icon svg {
	width: 16px;
	height: 16px;
	object-fit: contain;
}

/* Fallback when no icon is uploaded: a small neutral dot keeps rows aligned. */
.agah-mh-submenu-icon--empty {
	background: rgba(169, 96, 69, 0.08);
}

.agah-mh-submenu-icon--empty::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.55;
}

/* Footer pinned to the bottom of the sidebar (holds the exit or login button). */
.agah-mh-sidebar-footer {
}

/* Exit / logout button at the end of the menu */
.agah-mh-logout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	text-decoration: none;
	padding: 14px;
	border-radius: 14px;
	color: var(--agah-mh-muted);
	background: #fff;
	border: 0.3px solid var(--agah-mh-border);
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.agah-mh-logout:hover {
	background: rgba(169, 96, 69, 0.06);
	border-color: #dcbeb2;
	color: var(--agah-mh-primary);
}

.agah-mh-logout-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.agah-mh-logout-icon svg {
	width: 18px;
	height: 18px;
}

.agah-mh-logout-label {
	font-size: 14px;
	font-weight: 700;
}

body.agah-mh-open {
	overflow: hidden;
}

/* ================================================================== *
 * Desktop header (wide layout: logo · nav · account + cart)
 * Hidden by default; shown from 1025px up. The mobile header is
 * hidden at the same breakpoint so only one layout renders at a time.
 * ================================================================== */
.agah-mh-desktop {
	display: none;
}

@media (min-width: 1025px) {
	.agah-mh-mobile {
		display: none;
	}

	.agah-mh-desktop {
		display: block;
		position: sticky;
		top: 0;
		z-index: 1000;
		background: var(--agah-mh-white);
		border-bottom: 0.4px solid var(--agah-mh-border);
	}
}

.agah-mh-desktop-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: 100%;
	max-width: 1300px;
	margin: 0 auto;
	padding: 12px 32px;
}

/* Brand / logo (right side in RTL) */
.agah-mh-desktop-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	flex-shrink: 0;
}

.agah-mh-desktop-logo {
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: rgba(169, 96, 69, 0.12);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--agah-mh-primary);
	font-family: 'gramophone', sans-serif;
	font-weight: bold;
	font-size: 22px;
	overflow: hidden;
	flex-shrink: 0;
}

.agah-mh-desktop-logo img {
	width: 64%;
	height: 64%;
	object-fit: contain;
}

.agah-mh-desktop-brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	gap: 6px;
}

.agah-mh-desktop-title {
	font-family: 'gramophone', sans-serif;
	font-size: 18px;
	font-weight: 800;
	color: var(--agah-mh-primary);
}

.agah-mh-desktop-subtitle {
	font-family: 'iransans', sans-serif;
	font-size: 12px;
	color: #6F625B9C;
}

/* Navigation (center) */
.agah-mh-desktop-nav {
	display: flex;
	align-items: center;
	gap: 48px;
	flex-wrap: nowrap;
}

.agah-mh-desktop-nav a {
	text-decoration: none;
	color: var(--agah-mh-text);
	transition: color 0.2s ease;
	white-space: nowrap;
}

.agah-mh-desktop-nav a span {
	font-family: 'iransans', sans-serif;
	font-size: 14px;
	font-weight: 700;
}

.agah-mh-desktop-nav a:hover,
.agah-mh-desktop-nav a.active {
	color: var(--agah-mh-primary);
}

/* Actions (left side in RTL): account + cart — exact "cac" boxes. */
.agah-mh-desktop .cac-wrapper {
	display: flex;
	align-items: center;
	gap: 12px;
	direction: rtl;
	font-family: IRANSans, sans-serif;
	flex-shrink: 0;
}

.agah-mh-desktop .cac-wrapper,
.agah-mh-desktop .cac-wrapper * {
	box-sizing: border-box;
}

.agah-mh-desktop .cac-box {
	position: relative;
	width: 160px;
	background-color: #A9604512;
	color: #A96045;
	border: 1px solid #ffffff00;
	border-radius: 12px;
	padding: 18px 14px;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	direction: rtl;
	text-align: right;
	text-decoration: none;
	cursor: pointer;
	transition: all .25s ease;
}

.agah-mh-desktop .cac-box:hover {
	background-color: #A9604522;
	color: #A96045;
	border-color: #A96045;
	text-decoration: none;
}

.agah-mh-desktop .cac-box:hover .cac-main-text {
	color: #A96045;
}

.agah-mh-desktop .cac-box:hover .cac-small-text {
	color: #777777;
}

.agah-mh-desktop .cac-box:hover .cac-icon-img {
	opacity: .85;
}

.agah-mh-desktop .cac-icon-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.agah-mh-desktop .cac-icon-img {
	display: block;
	object-fit: contain;
	transition: all .25s ease;
}

.agah-mh-desktop .cac-text-wrap {
	display: flex;
	gap: 6px;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	text-align: right;
	line-height: 1.5;
	min-width: 0;
}

.agah-mh-desktop .cac-small-text {
	color: #777777;
	font-size: 11px;
	font-weight: 400;
	transition: all .25s ease;
}

.agah-mh-desktop .cac-main-text {
	color: #A96045;
	font-size: 13px;
	font-weight: 700;
	padding-right: 8px;
	transition: all .25s ease;
	white-space: nowrap;
}

.agah-mh-desktop .cac-account-wrap {
	position: relative;
}

.agah-mh-desktop .cac-account-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 24px);
	min-width: 210px;
	background: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 8px;
	margin: 0;
	list-style: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: all .2s ease;
	z-index: 9999;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
	direction: rtl;
	text-align: right;
}

.agah-mh-desktop .cac-account-wrap:hover .cac-account-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.agah-mh-desktop .cac-account-menu li {
	margin: 0;
	padding: 0;
}

.agah-mh-desktop .cac-account-menu a {
	display: block;
	padding: 9px 10px;
	border-radius: 8px;
	color: #222222;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	transition: all .2s ease;
}

.agah-mh-desktop .cac-account-menu a:hover {
	background: #A9604512;
	color: #A96045;
}

/* ================================================================== *
 * Mini cart — desktop hover dropdown + mobile tap dropdown.
 * The white "card" is shared; only the positioning/reveal differs.
 * ================================================================== */
.agah-mh-minicart {
	z-index: 9999;
}

.agah-mh-mc-card {
	background: #fff;
	border: 1px solid var(--agah-mh-border);
	border-radius: 14px;
	box-shadow: var(--agah-mh-shadow);
	padding: 12px;
	direction: rtl;
	text-align: right;
	font-family: 'iransans', sans-serif;
}

/* Desktop: dropdown hangs under the cart box, revealed on hover. The
   transparent padding-top bridges the gap so the pointer can travel from
   the box into the card without the panel closing. */
.agah-mh-desktop .cac-cart-wrap {
	position: relative;
}

.agah-mh-desktop .agah-mh-minicart--desktop {
	position: absolute;
	top: 110%;
	/* Cart box sits at the far left of the RTL header, so anchor the panel's
	   left edge and open rightward into the viewport — anchoring right:0 made
	   the 340px panel overflow off the left edge of the screen. */
	left: 0;
	width: 340px;
	padding-top: 12px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
	pointer-events: none;
}

.agah-mh-desktop .cac-cart-wrap:hover .agah-mh-minicart--desktop,
.agah-mh-desktop .cac-cart-wrap:focus-within .agah-mh-minicart--desktop {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

/* Mobile: dropdown is anchored to the sticky header (the cart wrap stays
   un-positioned on purpose) so it spans nearly the full width below it. */
.agah-mh-minicart--mobile {
	position: absolute;
	top: 100%;
	left: 12px;
	right: 12px;
	margin-top: 8px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.agah-mh-cart-wrap.open .agah-mh-minicart--mobile {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Items list */
.agah-mh-mc-items {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 320px;
	overflow-y: auto;
}

.agah-mh-mc-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 4px;
	border-bottom: 1px solid var(--agah-mh-border);
	transition: opacity .2s ease;
}

.agah-mh-mc-item:last-child {
	border-bottom: 0;
}

.agah-mh-mc-item--removing {
	opacity: .45;
	pointer-events: none;
}

.agah-mh-mc-thumb {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 10px;
	overflow: hidden;
	background: var(--agah-mh-bg);
}

.agah-mh-mc-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.agah-mh-mc-info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.agah-mh-mc-name {
	font-size: 13px;
	font-weight: 700;
	color: var(--agah-mh-text);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.agah-mh-mc-name a {
	color: inherit;
	text-decoration: none;
}

.agah-mh-mc-qtyprice {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--agah-mh-muted);
}

.agah-mh-mc-line {
	color: var(--agah-mh-primary);
	font-weight: 700;
}

.agah-mh-mc-remove {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: rgba(169, 96, 69, 0.1);
	color: var(--agah-mh-primary);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Footer: subtotal + actions */
.agah-mh-mc-footer {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid var(--agah-mh-border);
}

.agah-mh-mc-subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
	font-size: 13px;
}

.agah-mh-mc-subtotal-label {
	color: var(--agah-mh-muted);
	font-weight: 600;
}

.agah-mh-mc-subtotal-value {
	color: var(--agah-mh-primary);
	font-weight: 800;
}

.agah-mh-mc-actions {
	display: flex;
	gap: 8px;
}

.agah-mh-mc-btn {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 12px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.agah-mh-mc-btn-primary {
	background: var(--agah-mh-primary);
	color: #fff;
}

.agah-mh-mc-btn-primary:hover {
	background: #92503a;
	color: #fff;
}

.agah-mh-mc-btn-ghost {
	background: rgba(169, 96, 69, 0.1);
	color: var(--agah-mh-primary);
	border-color: rgba(169, 96, 69, 0.2);
}

.agah-mh-mc-btn-ghost:hover {
	background: rgba(169, 96, 69, 0.16);
}

/* Empty + loading states */
.agah-mh-mc-empty {
	text-align: center;
	padding: 18px 8px;
}

.agah-mh-mc-empty-text {
	margin: 0 0 14px;
	color: var(--agah-mh-muted);
	font-size: 13px;
}

.agah-mh-mc-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px 0;
}

.agah-mh-mc-spinner {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: 2px solid rgba(169, 96, 69, 0.25);
	border-top-color: var(--agah-mh-primary);
	animation: agahMhSpin .7s linear infinite;
}

@keyframes agahMhSpin {
	to {
		transform: rotate(360deg);
	}
}
