/**
 * REVICE-style header.
 */

body.rocky-custom-header #masthead.site-header {
	background: var(--rocky-color-surface);
	border-bottom: 1px solid #e8e8e8;
	padding: 0;
	margin: 0 !important;
	color: var(--rocky-color-text-primary);
	overflow: visible;
}

body.rocky-custom-header.home #masthead.site-header {
	margin-bottom: 0 !important;
}

/* Neutralize Storefront header floats (breaks our flex layout). */
body.rocky-custom-header.woocommerce-active #masthead .main-navigation,
body.rocky-custom-header #masthead .main-navigation,
body.rocky-custom-header #masthead .site-branding,
body.rocky-custom-header #masthead .site-search,
body.rocky-custom-header #masthead .site-header-cart {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	clear: none !important;
}

body.rocky-custom-header #masthead .main-navigation .menu,
body.rocky-custom-header #masthead ul.rocky-menu {
	clear: none !important;
	float: none !important;
	width: auto !important;
}

body.rocky-custom-header #masthead .rocky-header-main__inner.col-full::before,
body.rocky-custom-header #masthead .rocky-header-main__inner.col-full::after {
	display: none !important;
	content: none !important;
}

.rocky-announcement {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	background: var(--rocky-color-text-primary);
	color: var(--rocky-color-text-on-dark);
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0.65rem 1rem;
	line-height: 1.3;
}

.rocky-announcement__text {
	margin: 0;
	text-align: center;
	flex: 1;
	max-width: 720px;
}

.rocky-announcement__nav {
	background: transparent;
	border: 0;
	color: var(--rocky-color-text-on-dark);
	cursor: pointer;
	padding: 0.25rem;
	display: flex;
	align-items: center;
	opacity: 0.85;
}

.rocky-announcement__nav:hover {
	opacity: 1;
}

.rocky-header-main {
	position: relative;
	z-index: 20;
	background: var(--rocky-color-surface);
}

.rocky-header-main__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.25rem;
	padding-top: 1.1rem;
	padding-bottom: 1.1rem;
	width: 100%;
	box-sizing: border-box;
}

.rocky-header__brand {
	flex: 0 0 auto;
	min-width: 0;
}

.rocky-header__brand .custom-logo-link img {
	max-height: 42px;
	width: auto;
}

.rocky-header__logo-text {
	font-size: 1.75rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-decoration: none;
	color: var(--rocky-color-text-primary);
	line-height: 1;
}

.rocky-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 0;
}

.rocky-header__tools {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 1.1rem;
}

.rocky-lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0;
	font-size: var(--rocky-font-size-xs);
	font-weight: var(--rocky-font-weight-medium);
	letter-spacing: 0.06em;
	line-height: var(--rocky-line-height-tight);
}

.rocky-lang-switcher__link {
	color: var(--rocky-color-text-muted);
	text-decoration: none;
}

.rocky-lang-switcher__link:hover,
.rocky-lang-switcher__link.is-active {
	color: var(--rocky-color-text-primary);
}

.rocky-lang-switcher__link.is-active {
	font-weight: var(--rocky-font-weight-semibold);
}

.rocky-lang-switcher__sep {
	color: var(--rocky-color-text-muted);
	opacity: 0.6;
}

.rocky-header__tool {
	background: none;
	border: 0;
	padding: 0;
	color: var(--rocky-color-text-primary);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	position: relative;
}

.rocky-header__cart-count {
	position: absolute;
	top: -6px;
	right: -8px;
	min-width: 16px;
	height: 16px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--rocky-color-text-primary);
	color: var(--rocky-color-text-on-dark);
	font-size: 10px;
	line-height: 16px;
	text-align: center;
}

ul.rocky-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 0 1rem;
}

ul.rocky-menu li {
	float: none !important;
	margin: 0;
	padding: 0;
}

ul.rocky-menu a {
	text-decoration: none;
	color: var(--rocky-color-text-primary);
	font-size: var(--rocky-font-size-xs);
	font-weight: var(--rocky-font-weight-medium);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.35rem 0;
}

ul.rocky-menu a:hover,
ul.rocky-menu .current-menu-item > a {
	opacity: 0.65;
}

body.rocky-custom-header #masthead .rocky-header__menu-toggle.menu-toggle {
	display: none;
	float: none !important;
}

@media (min-width: 901px) {
	body.rocky-custom-header #masthead .rocky-header__menu-toggle.menu-toggle {
		display: none !important;
	}
}

.rocky-search-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 21;
	overflow: hidden;
	background: var(--rocky-color-surface);
	border-top: 1px solid #e8e8e8;
	border-bottom: 1px solid #e8e8e8;
	padding: 0.85rem 0;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-10px);
	clip-path: inset(0 0 100% 0);
	transition:
		opacity 0.22s ease,
		transform 0.32s cubic-bezier(0.32, 0.72, 0, 1),
		clip-path 0.32s cubic-bezier(0.32, 0.72, 0, 1),
		visibility 0.32s;
}

.rocky-search-panel.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	clip-path: inset(0);
}

@media (prefers-reduced-motion: reduce) {
	.rocky-search-panel {
		transition: none;
		transform: none;
		clip-path: none;
	}
}

.rocky-search-form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
}

.rocky-search-form__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--rocky-color-text-muted);
	cursor: pointer;
}

.rocky-search-form__icon svg {
	width: 18px;
	height: 18px;
}

body.rocky-custom-header #masthead .rocky-search-form .search-field {
	flex: 1 1 auto;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 0.35rem 0;
	background: var(--rocky-color-surface);
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--rocky-color-text-primary);
	font-size: var(--rocky-font-size-body);
	line-height: var(--rocky-line-height-body);
	-webkit-appearance: none;
	appearance: none;
}

body.rocky-custom-header #masthead .rocky-search-form .search-field::placeholder {
	color: var(--rocky-color-text-muted);
	opacity: 1;
}

body.rocky-custom-header #masthead .rocky-search-form .search-field:focus {
	outline: none;
	box-shadow: none;
	background: var(--rocky-color-surface);
}

@media (max-width: 900px) {
	.rocky-header-main__inner {
		flex-wrap: wrap;
	}

	.rocky-header__brand {
		order: 1;
	}

	.rocky-header__tools {
		order: 2;
		margin-left: auto;
	}

	.rocky-header__nav {
		order: 3;
		flex: 1 1 100%;
		justify-content: flex-start;
		flex-direction: column;
		align-items: stretch;
	}

	body.rocky-custom-header #masthead .rocky-header__menu-toggle.menu-toggle {
		display: inline-flex !important;
		margin-bottom: 0.5rem;
	}

	ul.rocky-menu {
		display: none;
		flex-direction: column;
		align-items: flex-start;
		padding-bottom: 0.5rem;
	}

	.rocky-header__nav.is-open ul.rocky-menu {
		display: flex;
	}
}
