.onis-navbar {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 40;
	width: 100%;
	background-color: var(--off-white);
	border-bottom: 1px solid var(--black);
	transform: translateY(0);
	transition: transform 0.3s ease;
}

.onis-navbar.is-hidden {
	transform: translateY(-100%);
}

.onis-navbar-inner {
	width: var(--content-width);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding-top: var(--spacing-md);
	padding-bottom: var(--spacing-md);
	position: relative;
}

.onis-navbar-logo {
	display: flex;
	align-items: center;
}

.onis-navbar-logo-image {
	height: var(--spacing-2xl);
	width: auto;
	display: block;
}

.onis-navbar-links {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: var(--spacing-2xl);
	margin: 0;
	padding: 0;
	width: 100%;
}

.onis-navbar-links li.onis-navbar-end-item {
	margin-left: auto;
}

.onis-navbar-links a {
	text-decoration: none;
}

.onis-navbar-end-item a {
	background: var(--black);
	border: 1px solid currentColor;
	padding: 0.6rem 1.2rem;
	cursor: pointer;
	color: var(--off-white);
	font: inherit;
	font-weight: 500;
	position: relative;
}

.onis-navbar-end-item a::before {
	pointer-events: none;
	position: absolute;
	content: '';
	height: 0;
	width: 0;
	bottom: 0;
	right: 0;
	background: var(--off-white);
	background: linear-gradient(
		315deg,
		var(--off-white) 45%,
		#aaa 50%,
		#ccc 56%,
		var(--off-white) 80%
	);
	box-shadow: -1px -1px 1px rgba(0, 0, 0, 0.4);
	transition: width 0.3s ease, height 0.3s ease;
}

.onis-navbar-end-item a:hover::before,
.onis-navbar-end-item a:focus::before,
.onis-navbar-end-item a:active::before {
	width: 18px;
	height: 18px;
}

.onis-navbar-links svg {
	width: 22px;
	height: 22px;
	display: block;
}

.onis-navbar-search-toggle {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease;
}

.onis-navbar-search-toggle:hover {
	opacity: 0.7;
}

.onis-navbar-search-bar {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: var(--off-white);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 20;
	display: flex;
	align-items: center;
	padding-left: calc((100% - var(--content-width)) / 2);
	padding-right: calc((100% - var(--content-width)) / 2);
}

.onis-navbar-search-bar.is-open {
	opacity: 1;
	visibility: visible;
}

.onis-navbar-search-bar-inner {
	margin: 0 0 0 auto;
	width: 100%;
	max-width: 500px;
	padding-top: 25px;
	padding-bottom: 25px;
	display: flex;
	align-items: center;
	gap: 0;
	position: relative;
}

.onis-navbar-search-bar-inner form {
	flex-grow: 1;
}

.onis-navbar-search-bar form,
.onis-navbar-mobile-search form {
	display: flex;
	align-items: center;
	width: 100%;
	border: none;
	border-bottom: 1px solid var(--black);
	overflow: hidden;
}

.onis-navbar-search-bar input,
.onis-navbar-mobile-search input {
	flex-grow: 1;
	border: none;
	padding: 10px 15px;
	outline: none;
	background: transparent;
}

.onis-navbar-search-bar button,
.onis-navbar-mobile-search button {
	background: none;
	border: none;
	padding: 10px 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--grey);
	transition: color 0.2s ease;
}

.onis-navbar-search-bar button:hover {
	color: var(--black);
}

.onis-navbar-search-bar button svg,
.onis-navbar-mobile-search button svg {
	width: 22px;
	height: 22px;
}

.onis-navbar-search-close {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	left: calc(100% + 12px);
	background: none;
	border: none;
	padding: 10px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--grey);
	flex-shrink: 0;
	transition: color 0.2s ease;
}

.onis-navbar-search-close:hover {
	color: var(--black);
}

.onis-navbar-search-close svg {
	width: 24px;
	height: 24px;
}

.onis-navbar-menu-button {
	display: none;
	border: 0;
	background: transparent;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	position: absolute;
	right: 16px;
}

.onis-navbar-menu-button span {
	width: 20px;
	height: 2px;
	transition: transform 0.25s ease, opacity 0.25s ease;
    background-color: var(--black);
}

.onis-navbar-menu-button.is-open span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.onis-navbar-menu-button.is-open span:nth-child(2) {
	opacity: 0;
}

.onis-navbar-menu-button.is-open span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.onis-navbar-mobile {
	display: none;
}

/* Underline From Left */
.hvr-underline-from-left {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  overflow: hidden;
}

.hvr-underline-from-left:before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  -webkit-transition-property: right;
  transition-property: right;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.hvr-underline-from-left:hover:before, .hvr-underline-from-left:focus:before, .hvr-underline-from-left:active:before {
  right: 0;
}

.onis-navbar-links li .hvr-underline-from-left:before {
  background: var(--black);
}

/* ===== Search Suggestions Dropdown ===== */
.onis-search-wrap {
	position: relative;
	width: 100%;
}

.onis-search-wrap form {
	display: flex;
	align-items: center;
	width: 100%;
	border: none;
	border-bottom: 1px solid var(--black);
	overflow: hidden;
	transition: border-color 0.2s;
	background-color: var(--off-white);
}

.onis-search-wrap form:focus-within {
	border-color: var(--black);
}

.onis-search-wrap input {
	flex-grow: 1;
	border: none;
	padding: 10px 15px;
	outline: none;
	background: transparent;
}

.onis-search-wrap input::placeholder {
	color: var(--black);
	opacity: 1;
	text-transform: uppercase;
	font-weight: 300;
}

.onis-search-wrap button {
	background: none;
	border: none;
	padding: 10px 0 10px 15px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--black);
	font-weight: 900;
}

.onis-search-wrap button svg {
	width: 20px;
	height: 20px;
}

.onis-search-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	z-index: 200;
	max-height: 65vh;
	overflow-y: auto;
}

.onis-search-result {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f2f2f2;
	transition: background-color 0.12s;
}

.onis-search-result:last-child {
	border-bottom: none;
}

.onis-search-result:hover {
	background-color: var(--off-white);
}

.onis-search-result-img {
	width: 44px;
	height: 44px;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	flex-shrink: 0;
	background: #fafafa;
}

.onis-search-result-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.onis-search-result-title {
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.3;
	color: #1a1a1a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.onis-search-result-title em {
	font-style: normal;
	background-color: #fff3cd;
}

.onis-search-result-sub {
	font-size: 0.7rem;
	color: #999;
	margin-top: 1px;
}

.onis-search-view-all {
	display: block;
	padding: 10px 14px;
	text-align: center;
	font-size: 0.8rem;
	color: #666;
	text-decoration: none;
	border-top: 1px solid #eee;
	font-weight: 500;
}

.onis-search-view-all:hover {
	background-color: var(--off-white);
	color: var(--black);
}

/* ===== Search Results Page ===== */
.search-results-page {
	/* Match the site grid (navbar, sections, footer) instead of a full-bleed
	   box: --content-width is already 90% on small screens, so the horizontal
	   padding would otherwise push this page past every other section. */
	width: var(--content-width);
	max-width: 760px;
	margin: 0 auto;
	padding: 60px 0;
}

.search-results-heading {
	font-weight: 800;
	margin-bottom: var(--spacing-md);
}

.search-results-form {
	display: flex;
	gap: 10px;
	margin-bottom: var(--spacing-lg);
}

.search-results-form input {
	flex: 1;
	/* `flex: 1` zeroes the basis but `min-width: auto` still floors the input at
	   its intrinsic (size="20") width, which is what pushed the button off the
	   right edge on phones. Re-allow shrinking. */
	min-width: 0;
	padding: 10px 15px;
	border: 1px solid #ccc;
	outline: none;
}

.search-results-form input:focus {
	border-color: #333;
}

.search-results-form button {
	padding: 11px 22px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	font-size: 0.95rem;
	cursor: pointer;
	flex-shrink: 0;
	white-space: nowrap;
}

.search-results-count {
	font-size: 0.85rem;
	color: #888;
	margin-bottom: 18px;
}

.search-results-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.search-results-item {
	display: flex;
	gap: 15px;
	padding: 15px;
	border: 1px solid #eee;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.search-results-item:hover {
	border-color: #ccc;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.search-results-item-img {
	width: 72px;
	height: 72px;
	aspect-ratio: 1 / 1;
	flex-shrink: 0;
}

.search-results-item-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.search-results-item-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.search-results-item-title {
	font-weight: 800;
	color: var(--black);
}

.search-results-item-title em {
	font-style: normal;
	background-color: #fff3cd;
}

.search-results-item-desc {
	font-size: 0.82rem;
	color: #666;
	line-height: 1.4;
}

.search-results-item-meta {
	font-size: 0.75rem;
	color: #aaa;
}

.search-results-empty,
.search-results-hint {
	font-size: 0.95rem;
	color: #999;
	padding: 40px 0;
	text-align: center;
}


@media (max-width: 1300px) {
	.onis-navbar-inner {
		padding: var(--spacing-sm);
		min-height: 64px;
		justify-content: flex-start;
	}

	.onis-navbar-links {
		display: flex;
		width: 100%;
		justify-content: flex-start;
	}

	.onis-navbar-links li:not(.onis-navbar-logo-item) {
		display: none;
	}

	.onis-navbar-logo-image {
		height: 3rem;
		width: auto;
		display: block;
	}

	.onis-navbar-menu-button {
		display: inline-flex;
		width: 36px;
		height: 36px;
		top: 50%;
		transform: translateY(-50%);
	}

	.onis-navbar-mobile {
		display: flex;
		flex-direction: column;
		gap: 12px;
		padding: 0 16px;
		border-top: 0px solid rgba(255, 255, 255, 0.1);
		backdrop-filter: blur(6px);
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		visibility: hidden;
		transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.4s ease, border-width 0.4s ease, visibility 0.4s ease;
	}

	.onis-navbar-mobile.is-open {
		max-height: 500px;
		opacity: 1;
		padding: 16px;
		border-top-width: 1px;
		overflow: visible;
		visibility: visible;
	}

	.onis-navbar-mobile a {
		text-decoration: none;
		padding: 8px 0;
	}

	.onis-navbar-mobile .onis-search-result,
	.onis-navbar-mobile .onis-search-view-all {
		padding: 10px 14px;
	}

	.onis-navbar-search-bar {
		display: none;
	}

	.onis-search-wrap input {
		padding-left: 0;
	}

	.onis-navbar-catalogue-button-mobile {
		background: var(--black);
		border: 1px solid currentColor;
		cursor: pointer;
		color: var(--off-white);
		font: inherit;
		display: inline-flex;
		align-items: center;
		text-decoration: none;
		align-self: flex-start;
		width: auto;
		padding: 0.6rem 1.2rem;
	}

	.onis-navbar-catalogue-button-mobile p {
		margin: 0;
	}
}
