/* Header & mobile navigation */

.main-header,
.mobile-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.main-header.is-scrolled,
.mobile-header.is-scrolled {
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
	background: rgba(255, 255, 255, 0.98);
}

.main-header.is-hidden,
.mobile-header.is-hidden {
	transform: translateY(-100%);
}

body.kr-nav-open {
	overflow: hidden;
}

.kr-header-icon {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-decoration: none;
	color: var(--kr-text, #1a1a1a);
	position: relative;
	transition: color 0.2s, transform 0.15s;
}

.kr-header-icon:hover {
	color: var(--kr-saffron, #ff7722);
	transform: translateY(-1px);
}

.kr-header-icon__glyph {
	width: 25px;
	height: 25px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background 0.2s, box-shadow 0.2s;
}

.kr-header-icon__glyph svg {
	display: block;
	flex-shrink: 0;
	width:18px!important;
	height:18px!important;
}
.kr-header-icon__label {
	font-size: 13px;
}

.kr-header-icon--cart .cart-count,
.cart-badge {
	display: none;
}

.kr-header-icon--cart .cart-count:not(:empty),
.cart-badge:not(:empty) {
	display: inline-flex;
}

.header-icons span {
	display: block;
}

.header-navigation-outer {
	padding: 15px 0;
	margin-top: 12px;
	background: #fff;
	border-top: 1px solid #f0e8df;
}

.header-navigation-outer .header-navigation {
	max-width: 1200px;
	margin: auto;
}

.header-navigation .menu {
	display: flex;
	column-gap: 25px;
	padding: 0;
	align-items: center;
	margin: 0;
}

.header-navigation .menu > li {
	position: relative;
	list-style: none;
}

.header-navigation .menu > li > a {
	font-weight: 500;
	font-size: 16px;
	color: #1a1a1a !important;
	padding: 8px 14px;
	border-radius: 999px;
	transition: color 0.2s, background 0.2s;
}

.header-navigation .menu > li > a:hover,
.header-navigation .menu > li.current-menu-item > a,
.header-navigation .menu > li.current-menu-ancestor > a,
.header-navigation .menu > li.current_page_parent > a {
	color: #ff7722 !important;
	background: #fdf5f0;
}

.header-navigation .menu > li.current-menu-item > a {
	box-shadow: inset 0 0 0 1px rgba(255, 119, 34, 0.25);
}

.header-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 250px;
	max-width: 300px;
	width: 260px;
	background: #fff;
	padding: 8px 0;
	margin: 0;
	list-style: none;
	border-radius: var(--kr-btn-radius, 6px);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.3s ease;
	z-index: 999;
	border: 1px solid #f0e8df;
}

.header-navigation .menu li:hover > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.header-navigation .sub-menu li {
	position: relative;
}

.header-navigation .sub-menu li a {
	display: block;
	padding: 10px 16px;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.4;
	font-weight: 400;
	transition: all 0.2s ease;
	border-bottom: 1px solid #f5f5f5;
}

.header-navigation .sub-menu li:last-child a {
	border-bottom: none;
}

.header-navigation .sub-menu li a:hover {
	background: #fdf6f0;
	color: #ff7722;
	padding-left: 22px;
}

.header-navigation .sub-menu .sub-menu {
	top: 0;
	left: 100%;
	margin-left: 5px;
	max-width: 300px;
	width: 300px;
}

.header-navigation .menu > li.contact-btn {
	margin-left: 8px;
}

.header-navigation .menu > li.contact-btn > a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 10px 18px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	height: auto !important;
	background: linear-gradient(135deg, #ff7722 0%, #e8651a 52%, #d45a10 100%)
 !important;
	color: #fff !important;
	border-radius: var(--kr-btn-radius, 6px);
	font-size: 16px !important;
	font-weight: 500 !important;
	line-height: 1.3;
	white-space: nowrap;
	transition: background 0.2s, transform 0.15s;
}

.header-navigation .menu > li.contact-btn > a:hover {
	background: var(--kr-saffron-dark, #e8651a) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

/* ── Desktop top bar (logo | search | icons) ── */
@media (min-width: 768px) {
	.main-header .header-wrap {
		display: flex;
		align-items: center;
		gap: 20px;
		padding: 12px 0;
		min-height: 68px;
	}

	.main-header .site-logo {
		flex: 0 0 150px;
		max-width: 150px;
		line-height: 0;
	}

	.main-header .site-logo img,
	.main-header .site-logo .custom-logo-link {
		display: block;
		line-height: 0;
	}

	.main-header .site-logo img,
	.main-header .site-logo .custom-logo-link img {
		max-height: 70px;
		width: auto;
		height: auto;
		object-fit: contain;
	}

	.main-header .kr-header-search-box {
		flex: 1 1 auto;
		min-width: 0;
		max-width: 680px;
		margin: 0 auto;
	}

	.main-header .header-search {
		flex: unset;
		min-width: 0;
		max-width: none;
		margin: 0;
	}

	.main-header .header-icons {
		display: flex;
		align-items: flex-end;
		
		flex: 0 0 auto;
		flex-shrink: 0;
	}

	.main-header .header-icons > a:not(.kr-header-icon) {
		display: none;
	}

	.main-header .kr-header-icon--phone .kr-header-icon__glyph svg {
		width: 22px;
		height: 22px;		
	}

	.main-header .kr-header-icon--cart .cart-count,
	.main-header .kr-header-icon--cart .shop-cart-count {
		position: absolute;
		top: -3px;
		right: 18px;
		min-width: 18px;
		height: 18px;
		padding: 0 5px;
		background: var(--kr-saffron, #ff7722);
		color: #fff;
		font-size: 10px;
		font-weight: 700;
		border-radius: 50%;
		line-height: 1;
	}

	.main-header .header-navigation-outer {
		
		margin-top: 0;
	}

	.main-header .header-navigation-outer .header-navigation {
		display: flex;
		justify-content: center;
		padding: 0 15px;
	}
}

.mobile-header {
	display: none;
}

@media (max-width: 767px) {
	.main-header {
		display: none;
	}

	.mobile-header {
		background: var(--kr-white, #fff);
		box-shadow: var(--kr-shadow, 0 2px 20px rgba(0, 0, 0, 0.12));
		position: sticky;
		top: 0;
		display: block;
		z-index: 1000;
	}

	.header-row1 {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10px 14px;
		gap: 10px;
		border-bottom:1px solid #eee;
	}

	.hamburger {
		background: none;
		border: none;
		cursor: pointer;
		padding: 6px;
		display: flex;
		flex-direction: column;
		gap: 5px;
		flex-shrink: 0;
	}

	.hamburger span {
		display: block;
		width: 22px;
		height: 2px;
		background: var(--kr-saffron, #ff7722);
		border-radius: 2px;
		transition: all 0.35s cubic-bezier(0.68, -0.55, 0.27, 1.55);
		transform-origin: center;
	}

	.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
	.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	.logo-wrap {
		flex: 1;
		display: flex;
		justify-content: center;
	}

	.logo-wrap img {
		height: 56px;
		width: auto;
		object-fit: contain;
	}

	.mobile-header .header-icons {
		display: flex;
		align-items: center;
		gap: 4px;
		width: 40%;
		justify-content: end;
		flex-shrink: 0;
	}

	.icon-btn {
		background: none;
		border: none;
		cursor: pointer;
		padding: 6px;
		position: relative;
		display: flex;
		align-items: center;
		justify-content: center;
		color: var(--kr-text, #1a1a1a);
		text-decoration: none;
		border-radius: var(--kr-btn-radius, 6px);
		transition: background 0.2s;
	}

	.icon-btn:active {
		background: #f5ece4;
	}

	.icon-btn svg {
		width: 22px;
		height: 22px;
		stroke: var(--kr-text, #1a1a1a);
		fill: none;
		stroke-width: 1.8;
	}

	.cart-badge {
		position: absolute;
		top: 1px;
		right: 1px;
		background: var(--kr-saffron, #ff7722);
		color: #fff;
		font-size: 9px;
		font-weight: 700;
		border-radius: 50%;
		width: 16px;
		height: 16px;
		display: flex;
		align-items: center;
		justify-content: center;
		line-height: 1;
	}

	.search-bar {
		padding: 8px 14px 10px;
		background: var(--kr-white, #fff);
	}

	.nav-overlay {
		position: fixed;
		inset: 0;
		background: rgba(0, 0, 0, 0);
		z-index: 999;
		pointer-events: none;
		transition: background 0.3s;
	}

	.nav-overlay.open {
		background: rgba(0, 0, 0, 0.45);
		pointer-events: auto;
	}

	.side-nav {
		position: fixed;
		top: 0;
		left: 0;
		width: min(82vw, 300px);
	
		background: var(--kr-white, #fff);
		z-index: 1001;
		transform: translateX(-100%);
		transition: transform 0.38s cubic-bezier(0.77, 0, 0.18, 1);
		display: flex;
		flex-direction: column;
		overflow: hidden;
	}

	.side-nav.open {
		transform: translateX(0);
	}

	.nav-header {
		background: linear-gradient(135deg, #ff7722 0%, #e8651a 100%);
		padding: 20px 18px 18px;
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-shrink: 0;
	}

	.nav-header img {
		height: 38px;
		filter: brightness(0) invert(1);
	}

	.nav-close {
		background: rgba(255, 255, 255, 0.15);
		border: none;
		color: #fff;
		cursor: pointer;
		width: 32px;
		height: 32px;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 18px;
		line-height: 1;
	}

	.nav-body {
		flex: 1;
		overflow-y: auto;
		padding-bottom: 20px;
	}

	.nav-body::-webkit-scrollbar {
		width: 3px;
	}

	.nav-body::-webkit-scrollbar-thumb {
		background: #ddd;
		border-radius: 4px;
	}

	.nav-item {
		border-bottom: 1px solid #f0ece4;
	}

	.nav-link {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 14px 18px;
		text-decoration: none;
		color: var(--kr-text, #1a1a1a);
		font-size: 14px;
		font-weight: 500;
		cursor: pointer;
		background: none;
		border: none;
		width: 100%;
		text-align: left;
		font-family: var(--kr-font);
		transition: background 0.15s;
	}

	.nav-link:active,
	.nav-link.active-parent {
		background: #fdf3e8;
		color: var(--kr-saffron, #ff7722);
	}

	.nav-link .label {
		flex: 1;
	}

	.chevron {
		width: 16px;
		height: 16px;
		stroke: #bbb;
		fill: none;
		stroke-width: 2;
		transition: transform 0.3s;
		flex-shrink: 0;
	}

	.nav-link.open .chevron {
		transform: rotate(90deg);
		stroke: var(--kr-saffron, #ff7722);
	}

	.side-nav .sub-menu {
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
		background: #faf8f5;
	}

	.side-nav .sub-menu.open {
		max-height: 500px;
	}

	.sub-label {
		font-size: 11px;
		font-weight: 600;
		color: var(--kr-saffron, #ff7722);
		padding: 10px 18px 4px 20px;
		text-transform: uppercase;
		letter-spacing: 1px;
	}

	.sub-item {
		display: block;
		padding: 10px 18px 10px 20px;
		text-decoration: none;
		color: #4a4a4a;
		font-size: 13px;
		border-left: 3px solid transparent;
		transition: all 0.15s;
	}

	.sub-item:active {
		border-left-color: var(--kr-saffron, #ff7722);
		color: var(--kr-saffron, #ff7722);
		background: #fdf3e8;
	}

	.contact-nav-btn {
		margin: 14px 18px 0;
		display: block;
		text-align: center;
		padding: 12px;
		background: #ff7722;
		color: #fff !important;
		border-radius: var(--kr-btn-radius, 6px);
		text-decoration: none;
		font-size: 14px;
		font-weight: 600;
		letter-spacing: 0.3px;
		box-shadow: 0 4px 14px rgba(232, 101, 26, 0.35);
	}

	.kr-mobile-nav-list {
		list-style: none;
		margin: 0;
		padding: 0;
	}

	.kr-mobile-bar {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 999;
		display: flex;
		background: rgba(255, 255, 255, 0.96);
		backdrop-filter: blur(10px);
		border-top: 1px solid var(--kr-border-light, #f0ece4);
		box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
		padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
	}

	.kr-mobile-bar__item {
		flex: 1;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 2px;
		text-decoration: none;
		color: var(--kr-text-muted, #6b7280);
		font-size: 10px;
		font-weight: 600;
		padding: 6px 4px;
		position: relative;
		transition: color 0.2s;
	}

	.kr-mobile-bar__item svg {
		width: 20px;
		height: 20px;
	}

	.kr-mobile-bar__item:active,
	.kr-mobile-bar__item:hover {
		color: var(--kr-saffron, #ff7722);
	}

	.kr-mobile-bar__item em.cart-badge {
		position: absolute;
		top: 2px;
		right: calc(50% - 22px);
		background: var(--kr-saffron, #ff7722);
		color: #fff;
		font-size: 9px;
		font-weight: 700;
		font-style: normal;
		border-radius: 50%;
		width: 16px;
		height: 16px;
		display: none;
		align-items: center;
		justify-content: center;
	}

	.kr-mobile-bar__item em.cart-badge:not(:empty) {
		display: inline-flex;
	}

	body.kedaranchal-theme {
		padding-bottom: 64px;
	}
}

@media (min-width: 768px) {
	.kr-mobile-bar {
		display: none;
	}

	body.kedaranchal-theme {
		padding-bottom: 0;
	}
}

/* ── Logged-in account avatar + dropdown ── */
.kr-account-menu {
	position: relative;
	display: flex;
	flex-direction: column;
	padding:0px 25px;
	border-right:1px solid #eee;
	align-items: center;
}
.kr-account-menu__nav a{
	display:block;
	padding:8px!important;
	border-radius:0px!important;
	border-right:0px!important;
	border-bottom:1px dashed #eee!important;
}
.kr-account-menu__nav a:last-of-type{
	border:0px!important;
}
.kr-header-icon__label{
	font-weight:400;
}
.kr-account-menu__toggle {
	cursor: pointer;
	border: none;
	background: transparent;
	padding: 0;
	margin: 0;
	color: inherit;
	font: inherit;
	text-align: center;
}

.kr-account-menu--mobile-bar .kr-account-menu__toggle {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	width: 100%;
	padding: 6px 4px;
	color: var(--kr-text-muted, #6b7280);
	font-size: 10px;
	font-weight: 600;
}

.kr-account-menu__avatar {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	min-width: 35px;
	min-height: 35px;
	border-radius: 50%;
	background: linear-gradient(145deg, var(--kr-saffron, #ff7722), #ff9a4d);
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	box-shadow: 0 2px 8px rgba(255, 119, 34, 0.35);
}

.kr-account-menu__avatar--mobile {
	width: 32px;
	height: 32px;
	min-width: 32px;
	min-height: 32px;
	font-size: 13px;
}

.kr-account-menu__avatar--bar {
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	font-size: 12px;
	box-shadow: none;
}

.kr-account-menu__toggle:hover .kr-account-menu__avatar,
.kr-account-menu__toggle:focus-visible .kr-account-menu__avatar {
	transform: scale(1.04);
}

.kr-account-menu__dropdown {
	position: absolute;
	right: 0;
	top: calc(100% + 10px);
	z-index: 1105;
	min-width: 240px;
	max-width: min(92vw, 280px);
	padding: 0;
	margin: 0;
	background: #fff;
	border: 1px solid var(--kr-border-light, #f0ece4);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.kr-account-menu--mobile .kr-account-menu__dropdown {
	right: 0;
	top: calc(100% + 8px);
}

.kr-account-menu--mobile-bar .kr-account-menu__dropdown {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: calc(64px + env(safe-area-inset-bottom, 0px));
	top: auto;
	margin: 0 auto;
	max-width: 320px;
}

.kr-account-menu.is-open .kr-account-menu__dropdown {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.kr-account-menu__profile {
	padding: 14px 16px 10px;
	border-bottom: 1px solid var(--kr-border-light, #f0ece4);
}

.kr-account-menu__name {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--kr-text, #1a1a1a);
	line-height: 1.35;
	word-break: break-word;
}

.kr-account-menu__email {
	margin: 4px 0 0;
	font-size: 0.8125rem;
	color: var(--kr-text-muted, #6b7280);
	line-height: 1.4;
	word-break: break-all;
}

.kr-account-menu__nav {
	display: flex;
	flex-direction: column;
	padding: 6px 8px;
	gap: 2px;
}

.kr-account-menu__link {
	display: block;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--kr-text-mid, #4a4a4a);
	text-decoration: none;
	line-height: 1.35;
	transition: background 0.15s ease, color 0.15s ease;
}

.kr-account-menu__link:hover,
.kr-account-menu__link:focus-visible {
	background: var(--kr-cream, #f5f0e8);
	color: var(--kr-text, #1a1a1a);
}

.kr-account-menu__link.is-current {
	background: var(--kr-saffron-light, #fdf5f0);
	color: var(--kr-saffron, #ff7722);
	font-weight: 600;
}

.kr-account-menu__actions {
	padding: 6px 8px 8px;
	border-top: 1px solid var(--kr-border-light, #f0ece4);
}

.kr-account-menu__logout {
	display: block;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--kr-saffron, #ff7722);
	text-decoration: none;
	text-align: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.kr-account-menu__logout:hover,
.kr-account-menu__logout:focus-visible {
	background: var(--kr-saffron-light, #fdf5f0);
	color: #e56510;
}

.kr-account-menu__toggle:focus-visible {
	outline: 2px solid var(--kr-saffron, #ff7722);
	outline-offset: 3px;
	border-radius: 8px;
}
