/*
 * Abis responsive code-based header
 * Uses IranYekan from assets/css/abis-fonts.css
 * Uses local icons from assets/icons/sty5/
 */

:root {
	--abis-header-blue: #075cda;
	--abis-header-blue-dark: #064eb9;
	--abis-header-text: #0e356b;
	--abis-header-muted: #6f8097;
	--abis-header-border: #dfe7f1;
	--abis-header-bg: #ffffff;
	--abis-header-soft: #f6f9fd;
	--abis-header-shadow: 0 8px 28px rgba(18, 58, 105, .08);
}

.abis-code-header-active {
	padding-top: 0 !important;
}

.abis-site-header,
.abis-site-header * {
	box-sizing: border-box;
}

.abis-site-header {
	position: relative;
	width: 100%;
	background: var(--abis-header-bg);
	color: var(--abis-header-text);
	direction: rtl;
	font-family: var(--abis-font-family, "IranYekan", Tahoma, Arial, sans-serif);
	border-bottom: 1px solid var(--abis-header-border);
	z-index: 900;
}

.abis-header-container {
	width: min(1440px, calc(100% - 38px));
	margin-inline: auto;
}

.abis-site-header a {
	color: inherit;
	text-decoration: none;
}

.abis-site-header button,
.abis-site-header input {
	font-family: inherit;
}

.abis-site-header .abis-icon {
	display: inline-grid;
	width: 1em;
	height: 1em;
	flex: 0 0 auto;
	place-items: center;
	color: currentColor;
	line-height: 1;
}

.abis-site-header .abis-svg,
.abis-mobile-drawer .abis-svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Thin top bar */
.abis-header-topbar {
	border-bottom: 1px solid var(--abis-header-border);
	background: #fff;
}

.abis-header-topbar__inner {
	display: flex;
	min-height: 36px;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	font-size: 11px;
	font-weight: 400;
}

.abis-header-topbar__status,
.abis-header-utility-nav {
	display: flex;
	align-items: center;
	gap: 20px;
}

.abis-header-topbar__status a,
.abis-header-utility-nav a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #3f5675;
	white-space: nowrap;
	transition: color .18s ease;
}

.abis-header-topbar__status a:hover,
.abis-header-utility-nav a:hover {
	color: var(--abis-header-blue);
}

.abis-header-topbar__status .abis-icon {
	width: 15px;
	height: 15px;
	color: var(--abis-header-text);
}

.abis-header-phone {
	direction: ltr;
}

/* Main row */
.abis-header-main {
	background: #fff;
}

.abis-header-main__inner {
	display: grid;
	min-height: 84px;
	grid-template-columns: 210px minmax(320px, 1fr) 285px;
	gap: clamp(18px, 3vw, 44px);
	align-items: center;
}

.abis-header-logo {
	min-width: 0;
}

.abis-header-logo a {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}


/* The picture wrapper keeps the desktop/mobile source switch layout-neutral. */
.abis-header-logo picture {
	display: block;
	line-height: 0;
}

.abis-header-logo img,
.abis-header-logo .custom-logo {
	display: block;
	width: auto;
	max-width: 188px;
	height: 69px;
	object-fit: contain;
}

.abis-header-search {
	position: relative;
	width: 100%;
	max-width: 680px;
	margin-inline: auto;
}

.abis-header-search input[type="search"] {
	width: 100%;
	height: 48px;
	padding: 9px 50px 9px 16px;
	border: 1px solid #cfdae8;
	border-radius: 12px;
	background: #fff;
	color: var(--abis-header-text);
	font-size: 12px;
	font-weight: 400;
	outline: 0;
	box-shadow: inset 0 1px 2px rgba(20, 57, 102, .02);
	transition:
		border-color .18s ease,
		box-shadow .18s ease;
}

.abis-header-search input[type="search"]::placeholder {
	color: #8a98aa;
	opacity: 1;
}

.abis-header-search input[type="search"]:focus {
	border-color: var(--abis-header-blue);
	box-shadow: 0 0 0 3px rgba(7, 92, 218, .09);
}

.abis-header-search button {
	position: absolute;
	top: 50%;
	right: 14px;
	display: grid;
	width: 28px;
	height: 28px;
	padding: 0;
	place-items: center;
	border: 0;
	background: transparent;
	color: var(--abis-header-text);
	transform: translateY(-50%);
	cursor: pointer;
}

.abis-header-search button .abis-icon {
	width: 22px;
	height: 22px;
}

.abis-header-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 20px;
}

.abis-header-action {
	display: inline-flex;
	min-height: 42px;
	align-items: center;
	gap: 8px;
	color: var(--abis-header-text);
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.abis-header-action:hover {
	color: var(--abis-header-blue);
}

.abis-header-action > .abis-icon {
	width: 23px;
	height: 23px;
}

.abis-header-cart-icon {
	position: relative;
	display: inline-grid;
	width: 29px;
	height: 29px;
	place-items: center;
}

.abis-header-cart-icon > .abis-icon {
	width: 25px;
	height: 25px;
}

.abis-header-cart-count {
	position: absolute;
	top: -7px;
	right: -7px;
	display: grid;
	min-width: 18px;
	height: 18px;
	padding-inline: 4px;
	place-items: center;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--abis-header-blue);
	color: #fff;
	font-size: 8px;
	font-weight: 700;
	line-height: 1;
}

.abis-mobile-menu-button {
	display: none;
}

/* Bottom navigation */
.abis-header-navigation {
	border-top: 1px solid #eef2f7;
	background: #fff;
}

.abis-header-navigation__inner {
	position: relative;
	display: flex;
	min-height: 58px;
	align-items: stretch;
	gap: 20px;
}

.abis-header-categories {
	position: relative;
	flex: 0 0 230px;
}

.abis-header-categories__button {
	display: flex;
	width: 100%;
	height: 100%;
	min-height: 58px;
	padding: 10px 20px;
	align-items: center;
	justify-content: center;
	gap: 12px;
	border: 0;
	border-radius: 10px 10px 0 0;
	background: var(--abis-header-blue);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .18s ease;
}

.abis-header-categories__button:hover,
.abis-header-categories.is-open .abis-header-categories__button {
	background: var(--abis-header-blue-dark);
}

.abis-header-categories__button .abis-icon {
	width: 23px;
	height: 23px;
}

.abis-header-primary-nav {
	display: flex;
	min-width: 0;
	flex: 1 1 auto;
	align-items: center;
	gap: clamp(18px, 2.4vw, 40px);
	overflow-x: auto;
	scrollbar-width: none;
}

.abis-header-primary-nav::-webkit-scrollbar {
	display: none;
}

.abis-header-primary-nav a {
	position: relative;
	display: inline-flex;
	height: 58px;
	flex: 0 0 auto;
	align-items: center;
	color: #294b77;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
}

.abis-header-primary-nav a::after {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	height: 2px;
	background: var(--abis-header-blue);
	content: "";
	opacity: 0;
	transform: scaleX(.4);
	transition:
		opacity .18s ease,
		transform .18s ease;
}

.abis-header-primary-nav a:hover {
	color: var(--abis-header-blue);
}

.abis-header-primary-nav a:hover::after {
	opacity: 1;
	transform: scaleX(1);
}

/* Desktop mega menu */
.abis-mega-menu {
	position: absolute;
	top: calc(100% + 1px);
	right: 0;
	width: min(1180px, calc(100vw - 38px));
	max-height: min(580px, calc(100vh - 150px));
	overflow: auto;
	border: 1px solid var(--abis-header-border);
	border-radius: 0 0 14px 14px;
	background: #fff;
	box-shadow: var(--abis-header-shadow);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition:
		opacity .18s ease,
		transform .18s ease,
		visibility .18s ease;
	z-index: 9995;
}

.abis-header-categories:hover .abis-mega-menu,
.abis-header-categories:focus-within .abis-mega-menu,
.abis-header-categories.is-open .abis-mega-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.abis-mega-menu__head {
	display: flex;
	min-height: 54px;
	padding: 12px 18px;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	border-bottom: 1px solid var(--abis-header-border);
}

.abis-mega-menu__head strong {
	font-size: 14px;
	font-weight: 600;
}

.abis-mega-menu__head a {
	color: var(--abis-header-blue);
	font-size: 11px;
	font-weight: 500;
}

.abis-mega-menu__body {
	padding: 18px;
}

.abis-mega-menu__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.abis-mega-menu__list > li {
	min-width: 0;
	padding: 10px 12px;
	border-radius: 9px;
	background: #fbfcfe;
}

.abis-mega-menu__list > li > a {
	display: flex;
	min-height: 32px;
	align-items: center;
	color: var(--abis-header-text);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.8;
}

.abis-mega-menu__list > li > a:hover {
	color: var(--abis-header-blue);
}

.abis-mega-menu__list .sub-menu {
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.abis-mega-menu__list .sub-menu li {
	margin: 0;
	padding: 0;
}

.abis-mega-menu__list .sub-menu a {
	display: block;
	padding: 5px 0;
	color: #61748d;
	font-size: 10px;
	font-weight: 400;
	line-height: 1.8;
}

.abis-mega-menu__list .sub-menu a:hover {
	color: var(--abis-header-blue);
}

/* Mobile drawer */
.abis-mobile-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(7, 28, 54, .48);
	opacity: 0;
	transition: opacity .22s ease;
	z-index: 9997;
}

.abis-mobile-drawer-overlay.is-visible {
	opacity: 1;
}

.abis-mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(88vw, 370px);
	padding: 0 14px 22px;
	overflow-y: auto;
	background: #fff;
	box-shadow: -20px 0 60px rgba(6, 28, 57, .24);
	direction: rtl;
	font-family: var(--abis-font-family, "IranYekan", Tahoma, Arial, sans-serif);
	transform: translateX(105%);
	transition: transform .24s ease;
	z-index: 9998;
}

.abis-mobile-drawer.is-open {
	transform: translateX(0);
}

.abis-mobile-drawer__head {
	position: sticky;
	top: 0;
	display: flex;
	min-height: 58px;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--abis-header-border);
	background: #fff;
	z-index: 2;
}

.abis-mobile-drawer__head strong {
	color: var(--abis-header-text);
	font-size: 14px;
	font-weight: 600;
}

.abis-mobile-drawer-close {
	display: grid;
	width: 34px;
	height: 34px;
	padding: 0;
	place-items: center;
	border: 1px solid var(--abis-header-border);
	border-radius: 8px;
	background: #fff;
	color: var(--abis-header-text);
	font-size: 25px;
	line-height: 1;
	cursor: pointer;
}

.abis-mobile-drawer__account {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding: 12px 0;
	border-bottom: 1px solid var(--abis-header-border);
}

.abis-mobile-drawer__account a {
	display: flex;
	min-height: 43px;
	padding: 7px;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid var(--abis-header-border);
	border-radius: 8px;
	color: var(--abis-header-text);
	font-size: 10px;
	font-weight: 500;
	text-decoration: none;
}

.abis-mobile-drawer__account .abis-icon {
	width: 19px;
	height: 19px;
}

.abis-mobile-utility-menu {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 6px;
	padding: 12px 0;
	border-bottom: 1px solid var(--abis-header-border);
}

.abis-mobile-utility-menu a {
	display: flex;
	min-height: 37px;
	align-items: center;
	justify-content: center;
	border-radius: 7px;
	background: var(--abis-header-soft);
	color: #415a79;
	font-size: 9px;
	font-weight: 500;
	text-align: center;
	text-decoration: none;
}

.abis-mobile-drawer__categories {
	padding-top: 14px;
}

.abis-mobile-drawer__categories h2 {
	margin: 0 0 9px;
	color: var(--abis-header-text);
	font-size: 13px;
	font-weight: 600;
}

.abis-mobile-mega-menu,
.abis-mobile-mega-menu .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.abis-mobile-mega-menu > li {
	position: relative;
	border-bottom: 1px solid var(--abis-header-border);
}

.abis-mobile-mega-menu > li > a {
	display: flex;
	min-height: 44px;
	padding: 9px 2px;
	align-items: center;
	color: #294b77;
	font-size: 11px;
	font-weight: 500;
	text-decoration: none;
}

.abis-mobile-mega-menu .sub-menu {
	display: none;
	padding: 0 12px 8px 0;
}

.abis-mobile-mega-menu li.is-submenu-open > .sub-menu {
	display: block;
}

.abis-mobile-mega-menu .sub-menu a {
	display: block;
	padding: 7px 0;
	color: #687a91;
	font-size: 9px;
	font-weight: 400;
	text-decoration: none;
}

.abis-mobile-submenu-toggle {
	position: absolute;
	top: 6px;
	left: 0;
	display: grid;
	width: 33px;
	height: 33px;
	padding: 0;
	place-items: center;
	border: 0;
	background: transparent;
	color: var(--abis-header-blue);
	font-size: 19px;
	cursor: pointer;
}

.abis-mobile-submenu-toggle::before {
	content: "+";
}

.abis-mobile-submenu-toggle[aria-expanded="true"]::before {
	content: "−";
}

body.abis-header-drawer-open {
	overflow: hidden;
}

/* WordPress admin-bar offset */
.admin-bar .abis-mobile-drawer {
	top: 32px;
}

@media (max-width: 1180px) {
	.abis-header-main__inner {
		grid-template-columns: 180px minmax(280px, 1fr) 245px;
		gap: 20px;
	}

	.abis-header-actions {
		gap: 12px;
	}

	.abis-header-action {
		font-size: 10px;
	}

	.abis-header-primary-nav {
		gap: 20px;
	}

	.abis-mega-menu__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 1024px) {
	.abis-header-container {
		width: calc(100% - 20px);
	}

	.abis-header-topbar,
	.abis-header-navigation {
		display: none;
	}

	.abis-header-main__inner {
		display: grid;
		min-height: auto;
		grid-template-columns: 42px minmax(0, 1fr) auto;
		grid-template-areas:
			"menu logo actions"
			"search search search";
		gap: 9px 12px;
		padding-block: 9px 10px;
	}

	.abis-mobile-menu-button {
		grid-area: menu;
		display: grid;
		width: 40px;
		height: 40px;
		padding: 0;
		place-items: center;
		border: 1px solid var(--abis-header-border);
		border-radius: 9px;
		background: #fff;
		color: var(--abis-header-blue);
		cursor: pointer;
	}

	.abis-mobile-menu-button .abis-icon {
		width: 22px;
		height: 22px;
	}

	.abis-header-logo {
		grid-area: logo;
	}

	.abis-header-logo a {
		justify-content: center;
	}

	.abis-header-logo img,
	.abis-header-logo .custom-logo {
		max-width: 132px;
		height: 52px;
	}

	.abis-header-search {
		grid-area: search;
		max-width: none;
	}

	.abis-header-search input[type="search"] {
		height: 42px;
		font-size: 10px;
	}

	.abis-header-actions {
		grid-area: actions;
		justify-content: flex-start;
		gap: 8px;
	}

	.abis-header-action {
		display: grid;
		width: 39px;
		height: 39px;
		min-height: 39px;
		place-items: center;
		border: 1px solid var(--abis-header-border);
		border-radius: 9px;
	}

	.abis-header-action > span:last-child {
		display: none;
	}

	.abis-header-action > .abis-icon,
	.abis-header-cart-icon {
		width: 21px;
		height: 21px;
	}

	.abis-header-cart-icon > .abis-icon {
		width: 21px;
		height: 21px;
	}

	.abis-header-cart-count {
		top: -9px;
		right: -9px;
	}
}

@media (max-width: 782px) {
	.admin-bar .abis-mobile-drawer {
		top: 46px;
	}
}

@media (max-width: 480px) {
	.abis-header-main__inner {
		grid-template-columns: 40px minmax(0, 1fr) auto;
		gap: 7px;
	}

	.abis-header-logo img,
	.abis-header-logo .custom-logo {
		max-width: 112px;
		height: 47px;
	}

	.abis-header-search input[type="search"] {
		padding-right: 43px;
		font-size: 9px;
	}

	.abis-header-actions {
		gap: 5px;
	}

	.abis-header-action,
	.abis-mobile-menu-button {
		width: 37px;
		height: 37px;
		min-height: 37px;
	}
}


/* =========================================================
 * Header v1.2 — desktop mega-menu and icon refinements
 * ========================================================= */

/* Desktop logo: 30% larger without materially increasing header height. */
@media (min-width: 1025px) {
	.abis-header-main__inner {
		min-height: 90px;
		grid-template-columns: 250px minmax(320px, 1fr) 285px;
	}

	.abis-header-logo img,
	.abis-header-logo .custom-logo {
		max-width: 244px;
		height: 74px;
	}
}

/* The new line-burger icon is used in both desktop and mobile triggers. */
.abis-header-categories__button .abis-icon,
.abis-mobile-menu-button .abis-icon {
	width: 25px;
	height: 25px;
}

/*
 * Desktop mega menu:
 * top-level WordPress menu items are tabs;
 * second-level items become columns;
 * third-level items become the links inside each column.
 */
.abis-mega-menu {
	width: min(1440px, calc(100vw - 38px));
	max-height: min(470px, calc(100vh - 155px));
	overflow: hidden;
	border-radius: 0 0 14px 14px;
}

.abis-mega-menu__head {
	display: none;
}

.abis-mega-menu__body {
	padding: 0;
}

.abis-desktop-mega {
	display: grid;
	grid-template-rows: auto minmax(250px, auto);
	background: #fff;
}

.abis-desktop-mega__tabs {
	display: flex;
	min-width: 0;
	align-items: stretch;
	border-bottom: 1px solid var(--abis-header-border);
	overflow-x: auto;
	scrollbar-width: thin;
}

.abis-desktop-mega__tab {
	position: relative;
	display: flex;
	min-width: 150px;
	min-height: 64px;
	padding: 10px 14px;
	flex: 1 0 auto;
	align-items: center;
	justify-content: center;
	gap: 9px;
	border: 0;
	border-left: 1px solid #edf1f6;
	background: #fff;
	color: #7c8796;
	font-family: inherit;
	font-size: 12px;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition:
		color .18s ease,
		background .18s ease;
}

.abis-desktop-mega__tab:first-child {
	border-left: 0;
}

.abis-desktop-mega__tab .abis-icon {
	width: 25px;
	height: 25px;
	color: #8d98a8;
}

.abis-desktop-mega__tab::after {
	position: absolute;
	right: 14px;
	bottom: 0;
	left: 14px;
	height: 2px;
	background: var(--abis-header-blue);
	content: "";
	opacity: 0;
	transform: scaleX(.45);
	transition:
		opacity .18s ease,
		transform .18s ease;
}

.abis-desktop-mega__tab:hover,
.abis-desktop-mega__tab.is-active {
	background: #fbfdff;
	color: var(--abis-header-blue);
}

.abis-desktop-mega__tab.is-active::after {
	opacity: 1;
	transform: scaleX(1);
}

.abis-desktop-mega__tab.is-active .abis-icon {
	color: var(--abis-header-blue);
}

.abis-desktop-mega__panels {
	min-height: 300px;
	max-height: 390px;
	overflow-y: auto;
}

.abis-desktop-mega__panel {
	display: none;
	padding: 14px 18px 24px;
}

.abis-desktop-mega__panel.is-active {
	display: block;
}

.abis-desktop-mega__panel-head {
	display: flex;
	min-height: 30px;
	align-items: center;
	justify-content: flex-end;
	margin-bottom: 5px;
}

.abis-desktop-mega__panel-head a {
	color: var(--abis-header-blue);
	font-size: 10px;
	font-weight: 500;
}

.abis-desktop-mega__columns {
	display: grid;
	grid-template-columns: repeat(6, minmax(150px, 1fr));
	gap: 24px 28px;
	align-items: start;
}

.abis-desktop-mega__column {
	min-width: 0;
}

.abis-desktop-mega__column-title {
	position: relative;
	display: inline-flex;
	min-height: 28px;
	padding-right: 10px;
	align-items: center;
	color: #111;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.7;
}

.abis-desktop-mega__column-title::before {
	position: absolute;
	top: 5px;
	right: 0;
	width: 3px;
	height: 19px;
	border-radius: 99px;
	background: var(--abis-header-blue);
	content: "";
}

.abis-desktop-mega__column-title:hover {
	color: var(--abis-header-blue);
}

.abis-desktop-mega__column ul {
	margin: 4px 0 0;
	padding: 0 10px 0 0;
	list-style: none;
}

.abis-desktop-mega__column li {
	margin: 0;
}

.abis-desktop-mega__column li a {
	display: block;
	padding: 4px 0;
	color: #9a9a9a;
	font-size: 11px;
	font-weight: 400;
	line-height: 1.75;
}

.abis-desktop-mega__column li a:hover {
	color: var(--abis-header-blue);
}

.abis-desktop-mega__empty {
	display: flex;
	min-height: 180px;
	grid-column: 1 / -1;
	align-items: center;
	justify-content: center;
}

.abis-desktop-mega__empty a {
	padding: 10px 18px;
	border: 1px solid var(--abis-header-border);
	border-radius: 8px;
	color: var(--abis-header-blue);
	font-size: 12px;
	font-weight: 500;
}

/* Mobile header icons must not have framed boxes around them. */
@media (max-width: 1024px) {
	.abis-mobile-menu-button,
	.abis-header-action {
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	.abis-mobile-menu-button:hover,
	.abis-header-action:hover {
		background: transparent;
	}

	.abis-header-action,
	.abis-mobile-menu-button {
		color: var(--abis-header-text);
	}
}

@media (max-width: 1320px) and (min-width: 1025px) {
	.abis-desktop-mega__columns {
		grid-template-columns: repeat(5, minmax(145px, 1fr));
	}

	.abis-desktop-mega__tab {
		min-width: 135px;
	}
}

@media (max-width: 1120px) and (min-width: 1025px) {
	.abis-desktop-mega__columns {
		grid-template-columns: repeat(4, minmax(145px, 1fr));
	}
}


/* =========================================================
 * Header v1.3 — compact mega tabs, centered mobile logo
 * ========================================================= */

/* Narrower and more balanced desktop category trigger. */
@media (min-width: 1025px) {
	.abis-header-categories {
		flex-basis: 188px;
	}

	.abis-header-categories__button {
		padding-inline: 14px;
		gap: 9px;
		font-size: 13px;
	}

	.abis-header-categories__button .abis-icon {
		width: 22px;
		height: 22px;
	}
}

/* Reduce the excessive space allocated to main mega-menu categories. */
.abis-desktop-mega__tab {
	min-width: 128px;
	min-height: 46px;
	padding: 6px 10px;
	gap: 7px;
	font-size: 11px;
}

.abis-desktop-mega__tab .abis-icon {
	width: 20px;
	height: 20px;
}

.abis-desktop-mega__tabs {
	min-height: 46px;
}

.abis-desktop-mega {
	grid-template-rows: 46px minmax(230px, auto);
}

.abis-desktop-mega__panels {
	min-height: 270px;
	max-height: 370px;
}

.abis-desktop-mega__panel {
	padding-top: 10px;
}

/*
 * Keep the mobile logo exactly in the visual center of the header,
 * independent of the different widths of menu and account/cart controls.
 */
@media (max-width: 1024px) {
	.abis-header-main__inner {
		position: relative;
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-areas:
			"menu spacer actions"
			"search search search";
	}

	.abis-header-logo {
		position: absolute;
		top: 8px;
		left: 50%;
		width: max-content;
		max-width: calc(100% - 190px);
		transform: translateX(-50%);
		z-index: 3;
	}

	.abis-header-logo a {
		justify-content: center;
	}

	.abis-header-logo img,
	.abis-header-logo .custom-logo {
		width: auto;
		max-width: 138px;
		height: 52px;
	}

	.abis-header-search {
		margin-top: 2px;
	}
}

@media (max-width: 480px) {
	.abis-header-logo {
		top: 7px;
		max-width: calc(100% - 166px);
	}

	.abis-header-logo img,
	.abis-header-logo .custom-logo {
		max-width: 116px;
		height: 46px;
	}
}


/* =========================================================
 * Header v3.1 — vertical blue mega menu + account shortcuts
 * ========================================================= */
@media (min-width:1025px){
	/* The account trigger owns the flyout so hover and keyboard focus stay stable. */
	.abis-header-account-menu{
		position:relative;
		display:flex;
		min-height:52px;
		align-items:center;
		z-index:10010;
	}
	.abis-header-account-menu>.abis-header-account{
		min-height:42px;
		padding:8px 10px;
		border-radius:10px;
		transition:background .18s ease,color .18s ease,box-shadow .18s ease;
	}
	.abis-header-account-menu:hover>.abis-header-account,
	.abis-header-account-menu:focus-within>.abis-header-account{
		background:#eef6ff;
		color:var(--abis-header-blue);
		box-shadow:0 0 0 1px rgba(7,92,218,.07);
	}
	.abis-header-account-chevron{
		display:inline-grid;
		width:16px;
		height:16px;
		place-items:center;
		font-size:15px;
		line-height:1;
		transition:transform .2s ease;
	}
	.abis-header-account-menu:hover .abis-header-account-chevron,
	.abis-header-account-menu:focus-within .abis-header-account-chevron{
		transform:rotate(180deg);
	}
	.abis-account-dropdown{
		position:absolute;
		top:calc(100% + 7px);
		right:0;
		width:310px;
		padding:10px 18px 14px;
		border:1px solid #e1e8f2;
		border-radius:14px;
		background:#fff;
		box-shadow:0 18px 45px rgba(18,58,105,.16);
		opacity:0;
		visibility:hidden;
		transform:translateY(8px);
		pointer-events:none;
		transition:opacity .2s ease,transform .24s cubic-bezier(.16,1,.3,1),visibility .2s ease;
		z-index:10020;
	}
	.abis-account-dropdown::before{
		position:absolute;
		top:-12px;
		right:0;
		left:0;
		height:12px;
		content:"";
	}
	.abis-header-account-menu:hover .abis-account-dropdown,
	.abis-header-account-menu:focus-within .abis-account-dropdown{
		opacity:1;
		visibility:visible;
		transform:translateY(0);
		pointer-events:auto;
	}
	.abis-account-dropdown__user{
		display:flex;
		min-height:58px;
		align-items:center;
		justify-content:space-between;
		gap:14px;
		border-bottom:1px solid #edf1f6;
		color:#173b67!important;
		font-size:14px;
		font-weight:750;
	}
	.abis-account-dropdown__user:hover{
		color:var(--abis-header-blue)!important;
	}
	.abis-account-dropdown__user>span{
		font-size:28px;
		font-weight:300;
		line-height:1;
	}
	.abis-account-dropdown__links{
		display:grid;
	}
	.abis-account-dropdown__link{
		display:flex;
		min-height:58px;
		align-items:center;
		gap:14px;
		border-bottom:1px solid #edf1f6;
		color:#314b72!important;
		font-size:13px;
		font-weight:650;
		transition:color .18s ease,transform .18s ease;
	}
	.abis-account-dropdown__link:last-child{
		border-bottom:0;
	}
	.abis-account-dropdown__link .abis-icon{
		width:24px;
		height:24px;
		color:#4d5a6b;
		transition:color .18s ease;
	}
	.abis-account-dropdown__link:hover,
	.abis-account-dropdown__link:focus-visible{
		color:var(--abis-header-blue)!important;
		transform:translateX(-3px);
	}
	.abis-account-dropdown__link:hover .abis-icon,
	.abis-account-dropdown__link:focus-visible .abis-icon{
		color:var(--abis-header-blue);
	}
	.abis-account-dropdown__link.is-logout{
		color:#314b72!important;
	}
	.abis-account-dropdown__link.is-logout:hover{
		color:var(--abis-header-blue)!important;
	}

	/* Full-width mega menu with a fixed right-side category rail. */
	.abis-mega-menu{
		width:min(1440px,calc(100vw - 38px));
		height:min(610px,calc(100vh - 155px));
		max-height:min(610px,calc(100vh - 155px));
		overflow:hidden;
		border-radius:0 0 14px 14px;
	}
	.abis-desktop-mega{
		display:grid;
		height:100%;
		min-height:430px;
		grid-template-columns:minmax(0,1fr) 238px;
		grid-template-rows:minmax(0,1fr);
		background:#fff;
		direction:ltr;
	}
	.abis-desktop-mega__tabs{
		grid-column:2;
		grid-row:1;
		display:flex;
		min-width:0;
		min-height:0;
		flex-direction:column;
		align-items:stretch;
		border:0;
		border-left:1px solid #e6ebf2;
		background:#f8fafc;
		overflow-x:hidden;
		overflow-y:auto;
		direction:rtl;
		scrollbar-width:thin;
	}
	.abis-desktop-mega__tab{
		position:relative;
		display:flex;
		width:100%;
		min-width:0;
		min-height:64px;
		padding:10px 20px;
		flex:0 0 auto;
		align-items:center;
		justify-content:flex-start;
		gap:12px;
		border:0;
		border-bottom:1px solid #e9edf3;
		background:transparent;
		color:#263e63;
		font-size:12px;
		font-weight:650;
		text-align:right;
		transition:background .18s ease,color .18s ease;
	}
	.abis-desktop-mega__tab::after{
		top:0;
		right:0;
		bottom:0;
		left:auto;
		width:3px;
		height:auto;
		background:var(--abis-header-blue);
		opacity:0;
		transform:scaleY(.45);
		transform-origin:center;
	}
	.abis-desktop-mega__tab .abis-icon{
		width:23px;
		height:23px;
		color:#57677c;
	}
	.abis-desktop-mega__tab:hover,
	.abis-desktop-mega__tab.is-active{
		background:#edf5ff;
		color:var(--abis-header-blue);
	}
	.abis-desktop-mega__tab.is-active::after{
		opacity:1;
		transform:scaleY(1);
	}
	.abis-desktop-mega__tab:hover .abis-icon,
	.abis-desktop-mega__tab.is-active .abis-icon{
		color:var(--abis-header-blue);
	}
	.abis-desktop-mega__panels{
		grid-column:1;
		grid-row:1;
		min-width:0;
		min-height:0;
		max-height:none;
		overflow-y:auto;
		background:#fff;
		direction:rtl;
		scrollbar-width:thin;
	}
	.abis-desktop-mega__panel{
		display:none;
		min-height:100%;
		padding:20px 30px 30px;
	}
	.abis-desktop-mega__panel.is-active{
		display:block;
	}
	.abis-desktop-mega__panel-head{
		display:flex;
		min-height:38px;
		align-items:center;
		justify-content:flex-start;
		margin:0 0 14px;
	}
	.abis-desktop-mega__panel-head a{
		position:relative;
		display:inline-flex;
		align-items:center;
		gap:7px;
		color:var(--abis-header-blue);
		font-size:12px;
		font-weight:700;
	}
	.abis-desktop-mega__columns{
		display:grid;
		grid-template-columns:repeat(4,minmax(150px,1fr));
		gap:28px 42px;
		align-items:start;
	}
	.abis-desktop-mega__column-title{
		position:relative;
		display:inline-flex;
		min-height:32px;
		padding-right:11px;
		align-items:center;
		color:#17263b;
		font-size:13px;
		font-weight:800;
		line-height:1.8;
	}
	.abis-desktop-mega__column-title::before{
		top:6px;
		right:0;
		width:3px;
		height:20px;
		background:var(--abis-header-blue);
	}
	.abis-desktop-mega__column ul{
		margin:6px 0 0;
		padding:0 11px 0 0;
	}
	.abis-desktop-mega__column li a{
		padding:6px 0;
		color:#7d8796;
		font-size:11px;
		font-weight:450;
		line-height:1.75;
		transition:color .16s ease,transform .16s ease;
	}
	.abis-desktop-mega__column li a:hover{
		color:var(--abis-header-blue);
		transform:translateX(-2px);
	}
}

@media (min-width:1025px) and (max-width:1240px){
	.abis-desktop-mega{
		grid-template-columns:minmax(0,1fr) 210px;
	}
	.abis-desktop-mega__columns{
		grid-template-columns:repeat(3,minmax(145px,1fr));
		gap:24px 30px;
	}
}

@media (max-width:1024px){
	.abis-header-account-menu{
		display:block;
		width:39px;
		height:39px;
	}
	.abis-header-account-menu .abis-header-account>span,
	.abis-account-dropdown{
		display:none!important;
	}
}

@media (max-width:480px){
	.abis-header-account-menu{
		width:37px;
		height:37px;
	}
}

/* =========================================================
 * Header v3.1.1 — account flyout alignment + real mega scroll
 * ========================================================= */
@media (min-width:1025px){
	/* Clean CSS chevron: vertically aligned with the account label. */
	.abis-header-account-chevron{
		display:inline-flex!important;
		width:16px!important;
		height:16px!important;
		flex:0 0 16px!important;
		align-self:center!important;
		align-items:center!important;
		justify-content:center!important;
		margin:0 1px 0 0!important;
		font-size:0!important;
		line-height:0!important;
		transform:none!important;
		transform-origin:center!important;
		transition:transform .2s ease!important;
	}
	.abis-header-account-chevron::before{
		display:block;
		width:7px;
		height:7px;
		border-right:1.7px solid currentColor;
		border-bottom:1.7px solid currentColor;
		content:"";
		transform:rotate(45deg) translate(-1px,-1px);
	}
	.abis-header-account-menu:hover .abis-header-account-chevron,
	.abis-header-account-menu:focus-within .abis-header-account-chevron{
		transform:rotate(180deg)!important;
	}

	/* Open toward the page interior instead of falling outside the viewport. */
	.abis-account-dropdown{
		right:auto!important;
		left:0!important;
		width:min(310px,calc(100vw - 24px))!important;
		max-width:calc(100vw - 24px)!important;
	}
	.abis-account-dropdown::before{
		right:0!important;
		left:0!important;
	}

	/* Give the menu body a definite height so the two inner columns can scroll. */
	.abis-mega-menu__body{
		height:100%!important;
		min-height:0!important;
		overflow:hidden!important;
	}
	.abis-desktop-mega{
		height:100%!important;
		min-height:0!important;
		max-height:100%!important;
		overflow:hidden!important;
	}
	.abis-desktop-mega__tabs,
	.abis-desktop-mega__panels{
		min-height:0!important;
		max-height:100%!important;
		overflow-x:hidden!important;
		overflow-y:auto!important;
		overscroll-behavior:contain;
		scrollbar-width:thin;
		scrollbar-color:#a9bfdc #f1f5fa;
	}
	.abis-desktop-mega__tabs::-webkit-scrollbar,
	.abis-desktop-mega__panels::-webkit-scrollbar{
		width:8px;
	}
	.abis-desktop-mega__tabs::-webkit-scrollbar-track,
	.abis-desktop-mega__panels::-webkit-scrollbar-track{
		background:#f1f5fa;
		border-radius:999px;
	}
	.abis-desktop-mega__tabs::-webkit-scrollbar-thumb,
	.abis-desktop-mega__panels::-webkit-scrollbar-thumb{
		border:2px solid #f1f5fa;
		border-radius:999px;
		background:#a9bfdc;
	}
	.abis-desktop-mega__tabs::-webkit-scrollbar-thumb:hover,
	.abis-desktop-mega__panels::-webkit-scrollbar-thumb:hover{
		background:#7f9fc8;
	}
}


/* =========================================================
 * Header v3.1.2 — manual mega icons + arrow cleanup
 * ========================================================= */
@media (min-width:1025px){
	/* Custom media icons use the same dimensions as the built-in SVG pack. */
	.abis-desktop-mega__tab .abis-icon--custom{
		display:inline-flex;
		width:23px;
		height:23px;
		flex:0 0 23px;
		align-items:center;
		justify-content:center;
	}
	.abis-desktop-mega__tab .abis-icon--custom img{
		display:block;
		width:100%;
		height:100%;
		object-fit:contain;
	}

	/* Remove the decorative ‹ signs from "view all" and child headings. */
	.abis-desktop-mega__panel-head a::before,
	.abis-desktop-mega__column-title::after{
		display:none!important;
		content:none!important;
	}
}


/* =========================================================
 * Header v3.1.3 — mega menu 20% shorter
 * ========================================================= */
@media (min-width:1025px){
	/* 610px × 80% = 488px. The viewport-based fallback is also reduced by 20%. */
	.abis-mega-menu{
		height:min(488px,calc(80vh - 124px))!important;
		max-height:min(488px,calc(80vh - 124px))!important;
	}
}
