/**
 * Header Sticky — Desktop menu visible, mobile drawer.
 * Structure: [Logo] [Search 300px] [Nav Menu] [Icons]
 *
 * @package NewTechPrice
 */

.js-ntp-header .ntp-header-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-start;
	padding-top: 0.75rem;
	padding-bottom: 0.75rem;
	gap: 0.5rem;
}
.ntp-header-logo,
.ntp-header-search,
.ntp-header-nav,
.ntp-header-icons {
	display: flex;
	align-items: center;
}

.ntp-header-search {
	flex-shrink: 0;
}

.ntp-header-nav {
	flex: 1 1 0%;
	min-width: 0;
	justify-content: center;
}

.ntp-header-icons {
	flex-shrink: 0;
	margin-left: auto;
}

/* Desktop: show Logo, Search, Nav, Icons. Hide hamburger, mobile search icon. */
@media (min-width: 768px) {
	.ntp-desktop-only {
		display: flex !important;
	}
	.ntp-mobile-only {
		display: none !important;
	}
	.ntp-header-nav .ntp-nav-list {
		display: flex !important;
		flex-direction: row;
		flex-wrap: nowrap !important;
		align-items: center;
		justify-content: center;
		gap: 0.35rem;
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.ntp-nav-list li {
		display: inline-block;
	}
	.ntp-header-nav .ntp-nav-link {
		position: relative;
		color: #1e293b;
		font-size: 0.9375rem;
		font-weight: 700;
		letter-spacing: 0.02em;
		text-decoration: none;
		padding: 0.35rem 0.3rem;
		white-space: nowrap;
		border-radius: 0.5rem;
		transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	}
	.ntp-header-nav .ntp-nav-link::after {
		content: '';
		position: absolute;
		bottom: 0;
		left: 0.3rem;
		right: 0.3rem;
		height: 2px;
		background: #dc2626;
		border-radius: 1px;
		opacity: 0;
		transition: opacity 0.2s ease;
	}
	.ntp-header-nav .ntp-nav-link:hover {
		color: #dc2626;
		background: rgba(220, 38, 38, 0.06);
	}
	.ntp-header-nav .ntp-nav-link:hover::after {
		opacity: 1;
	}
	.ntp-header-nav .ntp-nav-item--active .ntp-nav-link,
	.ntp-header-nav .ntp-nav-link[aria-current="page"] {
		color: #dc2626;
	}
	.ntp-header-nav .ntp-nav-item--active .ntp-nav-link::after,
	.ntp-header-nav .ntp-nav-link[aria-current="page"]::after {
		opacity: 1;
	}
	[data-theme="dark"] .ntp-header-nav .ntp-nav-link {
		color: #f1f5f9;
	}
	[data-theme="dark"] .ntp-header-nav .ntp-nav-link:hover {
		color: #f87171;
		background: rgba(248, 113, 113, 0.1);
	}
	[data-theme="dark"] .ntp-header-nav .ntp-nav-item--active .ntp-nav-link,
	[data-theme="dark"] .ntp-header-nav .ntp-nav-link[aria-current="page"] {
		color: #f87171;
	}
}

/* Larger desktop: slightly more breathing room while staying single-line */
@media (min-width: 1100px) {
	.ntp-header-nav .ntp-nav-list {
		gap: 0.55rem;
	}
	.ntp-header-nav .ntp-nav-link {
		font-size: 1rem;
		padding: 0.4rem 0.4rem;
	}
	.ntp-header-nav .ntp-nav-link::after {
		left: 0.4rem;
		right: 0.4rem;
	}
}

/* Mobile: hide Search bar, Nav, Compare. Show hamburger, search icon, dark mode. */
@media (max-width: 767px) {
	.ntp-desktop-only {
		display: none !important;
	}
	.ntp-mobile-only {
		display: flex !important;
	}
}

.ntp-search-form {
	min-height: 3rem;
	display: flex;
	align-items: center;
}

.ntp-header-logo {
	min-width: 100px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.ntp-header-search form {
	align-items: center;
}

/* Portal-style search bar: pill shape, 3D shadow, taller */
.ntp-header-search .ntp-search-form {
	border-radius: 50px;
	border: 1px solid #e2e8f0;
	background: #fff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.ntp-header-search .ntp-search-form:focus-within {
	box-shadow: 0 0 0 3px rgba(10, 88, 202, 0.15);
	border-color: var(--ntp-primary-color);
}
[data-theme="dark"] .ntp-header-search .ntp-search-form {
	border-color: #475569;
	background: #1e293b;
}
[data-theme="dark"] .ntp-header-search .ntp-search-form:focus-within {
	border-color: var(--ntp-primary-color);
}

.ntp-header-icons {
	display: flex;
	align-items: center;
}
.ntp-compare-link {
	position: relative;
}
.ntp-compare-badge {
	position: absolute;
	top: 4px;
	right: 4px;
	min-width: 1.125rem;
	height: 1.125rem;
	padding: 0 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: #ef4444;
	border-radius: 9999px;
	border: 2px solid var(--ntp-surface, #fff);
}
[data-theme="dark"] .ntp-compare-badge {
	border-color: #0f172a;
}
.ntp-header-icons .ntp-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

/* Glowing gradient hover — desktop nav & header icons only */
.ntp-icon-btn {
	position: relative;
	transition: color 0.3s ease-in-out, background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.ntp-icon-btn::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60%;
	height: 2px;
	background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
	border-radius: 1px;
	opacity: 0;
	box-shadow: 0 0 10px rgba(96, 165, 250, 0.5), 0 0 20px rgba(167, 139, 250, 0.3);
	transition: opacity 0.3s ease-in-out;
}
.ntp-icon-btn:hover {
	background: rgba(96, 165, 250, 0.08);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 0 16px rgba(96, 165, 250, 0.2), 0 0 32px rgba(167, 139, 250, 0.1);
}
.ntp-icon-btn:hover::after {
	opacity: 1;
}
[data-theme="dark"] .ntp-icon-btn:hover {
	background: rgba(96, 165, 250, 0.12);
}

/* Mobile drawer: slide in from right */
.ntp-mobile-drawer {
	transform: translateX(100%);
	transition: transform 0.3s ease;
}
body.is-sidebar-open .ntp-mobile-drawer {
	transform: translateX(0);
}

/* Mobile sidebar — same glow hover as desktop, display block, border-bottom */
@media (max-width: 767px) {
	.ntp-nav-list-mobile {
		display: block;
		list-style: none;
		margin: 0;
		padding: 0;
	}
	.ntp-nav-list-mobile li {
		border-bottom: 1px solid #e2e8f0;
	}
	.ntp-nav-list-mobile li:last-child {
		border-bottom: none;
	}
	.ntp-nav-list-mobile .ntp-nav-link {
		position: relative;
		display: block;
		color: #1e293b;
		font-size: 1.05rem;
		font-weight: 700;
		text-decoration: none;
		padding: 1rem 0;
		border-radius: 0.5rem;
		transition: color 0.2s ease, background 0.2s ease;
	}
	.ntp-nav-list-mobile .ntp-nav-link::after {
		content: '';
		position: absolute;
		bottom: 0.5rem;
		left: 0;
		right: 0;
		height: 2px;
		background: #dc2626;
		border-radius: 1px;
		opacity: 0;
		transition: opacity 0.2s ease;
	}
	.ntp-nav-list-mobile .ntp-nav-link:hover {
		color: #dc2626;
		background: rgba(220, 38, 38, 0.06);
	}
	.ntp-nav-list-mobile .ntp-nav-link:hover::after {
		opacity: 1;
	}
	.ntp-nav-list-mobile .ntp-nav-item--active .ntp-nav-link,
	.ntp-nav-list-mobile .ntp-nav-link[aria-current="page"] {
		color: #dc2626;
	}
	.ntp-nav-list-mobile .ntp-nav-item--active .ntp-nav-link::after,
	.ntp-nav-list-mobile .ntp-nav-link[aria-current="page"]::after {
		opacity: 1;
	}
	[data-theme="dark"] #ntp-mobile-sidebar {
		background: #0f172a;
	}
	[data-theme="dark"] .ntp-nav-list-mobile li {
		border-bottom-color: #334155;
	}
	[data-theme="dark"] .ntp-nav-list-mobile .ntp-nav-link {
		color: #f1f5f9;
	}
	[data-theme="dark"] .ntp-nav-list-mobile .ntp-nav-link:hover {
		color: #f87171;
		background: rgba(248, 113, 113, 0.1);
	}
	[data-theme="dark"] .ntp-nav-list-mobile .ntp-nav-item--active .ntp-nav-link,
	[data-theme="dark"] .ntp-nav-list-mobile .ntp-nav-link[aria-current="page"] {
		color: #f87171;
	}
	#ntp-mobile-sidebar .ntp-icon-btn::after {
		display: none;
	}
	#ntp-mobile-sidebar .ntp-icon-btn:hover {
		background: rgba(0, 0, 0, 0.06);
		backdrop-filter: none;
		box-shadow: none;
	}
	[data-theme="dark"] #ntp-mobile-sidebar .ntp-icon-btn:hover {
		background: rgba(255, 255, 255, 0.08);
	}
}

#ntp-master-header .js-ntp-header {
	transition: height 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

#ntp-master-header.header--sticky .js-ntp-header {
	height: 3rem;
	box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.12), 0 2px 6px -2px rgba(0, 0, 0, 0.08);
	-webkit-backdrop-filter: blur(15px) saturate(1.2);
	backdrop-filter: blur(15px) saturate(1.2);
	background-color: rgba(255, 255, 255, 0.9);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] #ntp-master-header.header--sticky .js-ntp-header {
	background-color: rgba(15, 23, 42, 0.9);
	border-bottom-color: rgba(255, 255, 255, 0.08);
}

#ntp-master-header.header--sticky .js-ntp-header > div {
	height: 3rem;
	min-height: 3rem;
}

#ntp-master-header.header--sticky .js-ntp-header .js-search-input {
	height: 2.5rem;
	min-height: 2.5rem;
}
