/**
 * Site header + homepage hero slider (from header.html mockup).
 */

.canifex-site-header-wrap {
	--canifex-header-blue: #002266;
	--canifex-header-blue-dark: #001133;
	--canifex-header-orange: #f36c21;
}

.canifex-site-header-sticky {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 1000;
}

.canifex-site-header-spacer {
	height: var(--canifex-sticky-header-height, 110px);
}

body.admin-bar .canifex-site-header-sticky {
	top: 32px;
}

@media screen and (max-width: 782px) {
	body.admin-bar .canifex-site-header-sticky {
		top: 46px;
	}
}

/* Announcement bar */
.canifex-announcement-bar {
	background-color: var(--canifex-header-blue-dark);
	color: #fff;
	text-align: center;
	padding: 10px 15px;
	font-size: 13px;
	letter-spacing: 0.5px;
	font-weight: 500;
}

.canifex-announcement-bar__light {
	opacity: 0.8;
	font-weight: 400;
}

@media (max-width: 781px) {
	.canifex-announcement-bar {
		font-size: 11px;
		letter-spacing: 0.2px;
		padding: 8px 10px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		line-height: 1.3;
	}
}

@media (max-width: 480px) {
	.canifex-announcement-bar {
		font-size: 10px;
		letter-spacing: 0;
		padding: 7px 8px;
	}
}

/* Main header */
.canifex-site-header {
	background-color: var(--canifex-header-blue);
	color: #fff;
	padding: 15px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.canifex-site-header__container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
}

.canifex-header-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
	text-decoration: none;
	color: #fff;
}

.canifex-header-logo-text {
	font-size: 35px;
	font-weight: 700;
	letter-spacing: -0.5px;
	line-height: 1.2;
}

.canifex-header-logo-image {
	display: block;
	max-height: 48px;
	width: auto;
	flex-shrink: 0;
}

/* Category links */
.canifex-header-nav-links {
	flex-shrink: 0;
}

.canifex-header-nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.canifex-header-nav-list a {
	color: #fff;
	text-decoration: none;
	font-size: 18px;
	font-weight: 500;
	opacity: 0.9;
	transition: opacity 0.2s ease;
}

.canifex-header-nav-list a:hover,
.canifex-header-nav-list a:focus {
	opacity: 1;
	text-shadow: 0 0 1px #fff;
}

.canifex-header-nav-list > li {
	position: relative;
}

.canifex-header-nav-list > .menu-item-has-children::before {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin-top: 0.2rem;
	transform: translateX(-50%) translateY(4px);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23f36c21'%3E%3Ccircle cx='7.5' cy='7' r='2.5'/%3E%3Ccircle cx='16.5' cy='7' r='2.5'/%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3Cellipse cx='12' cy='17' rx='5.5' ry='4.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 1011;
}

.canifex-header-nav-list > .menu-item-has-children:hover::before,
.canifex-header-nav-list > .menu-item-has-children:focus-within::before {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.canifex-header-nav-list .sub-menu {
	position: absolute;
	top: calc(100% + 1.35rem);
	left: 0;
	min-width: 12rem;
	margin: 0;
	padding: 0.5rem 0;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 34, 102, 0.12);
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 34, 102, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	z-index: 1010;
}

.canifex-header-nav-list li:hover > .sub-menu,
.canifex-header-nav-list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.canifex-header-nav-list .sub-menu li {
	margin: 0;
}

.canifex-header-nav-list .sub-menu a {
	display: block;
	padding: 0.625rem 1rem;
	white-space: nowrap;
	color: var(--canifex-header-blue);
	opacity: 1;
	text-shadow: none;
	font-weight: 500;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.canifex-header-nav-list .sub-menu a:hover,
.canifex-header-nav-list .sub-menu a:focus {
	background-color: #f0f4fa;
	color: var(--canifex-header-blue);
	opacity: 1;
	text-shadow: none;
}

.canifex-header-nav-list .menu-item-has-children > a::after {
	content: "▾";
	margin-left: 0.35rem;
	font-size: 18px;
	opacity: 0.85;
}

/* Search */
.canifex-header-search-wrap {
	position: relative;
	flex: 1 1 auto;
	max-width: 320px;
	min-width: 0;
}

.canifex-header-search-form {
	position: relative;
	width: 100%;
}

.canifex-search-input {
	width: 100%;
	padding: 10px 45px 10px 18px;
	border-radius: 25px;
	border: none;
	background-color: rgba(255, 255, 255, 0.95);
	font-size: 13px;
	color: #333;
	outline: none;
}

.canifex-search-btn {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--canifex-header-blue);
	cursor: pointer;
	display: flex;
	align-items: center;
	padding: 0;
}

/* Account + cart */
.canifex-header-utilities {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-shrink: 0;
}

.canifex-site-header .canifex-account-nav__trigger,
.canifex-site-header .canifex-account-nav__toggle {
	color: #fff;
}

.canifex-site-header .canifex-account-nav__label,
.canifex-site-header .canifex-account-nav__text {
	color: #fff;
}

.canifex-site-header .canifex-account-nav__icon,
.canifex-site-header .canifex-account-nav__chevron {
	fill: currentColor;
	color: #fff;
}

.canifex-site-header .canifex-account-nav__trigger:hover,
.canifex-site-header .canifex-account-nav__trigger:focus,
.canifex-site-header .canifex-account-nav__toggle:hover,
.canifex-site-header .canifex-account-nav__toggle:focus {
	background: #fff;
	color: var(--canifex-header-blue);
}

.canifex-site-header .canifex-account-nav__trigger:hover .canifex-account-nav__label,
.canifex-site-header .canifex-account-nav__trigger:hover .canifex-account-nav__text,
.canifex-site-header .canifex-account-nav__trigger:focus .canifex-account-nav__label,
.canifex-site-header .canifex-account-nav__trigger:focus .canifex-account-nav__text,
.canifex-site-header .canifex-account-nav__trigger:hover .canifex-account-nav__icon,
.canifex-site-header .canifex-account-nav__trigger:focus .canifex-account-nav__icon,
.canifex-site-header .canifex-account-nav__toggle:hover .canifex-account-nav__chevron,
.canifex-site-header .canifex-account-nav__toggle:focus .canifex-account-nav__chevron {
	color: var(--canifex-header-blue);
}

.canifex-site-header .canifex-account-nav__flyout {
	color: var(--canifex-navy, #121a45);
}

.canifex-cart-link {
	color: #fff;
	position: relative;
	display: flex;
	align-items: center;
	text-decoration: none;
}

.canifex-cart-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	background-color: var(--canifex-header-orange);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	min-width: 18px;
	height: 18px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 4px;
}

.canifex-site-header .canifex-mobile-menu-toggle {
	display: none;
	color: #fff;
}

/* Hero slider */
.canifex-hero-slider {
	position: relative;
	width: 100%;
	height: 270px;
	background-color: var(--canifex-header-blue, #002266);
	overflow: hidden;
	margin: 2px 0 0 0;
}

.canifex-hero-slider__inner {
	width: 100%;
	height: 100%;
	position: relative;
}

.canifex-hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
	display: flex;
	align-items: center;
	background-color: var(--canifex-header-blue, #002266);
	background-repeat: no-repeat;
	background-position: center right;
	background-size: cover;
}

.canifex-hero-slide::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to right,
		rgba(0, 34, 102, 0.96) 0%,
		rgba(0, 34, 102, 0.9) 45%,
		rgba(0, 34, 102, 0.78) 100%
	);
}

.canifex-hero-slide.is-active {
	opacity: 1;
	visibility: visible;
}

.canifex-hero-slide__content {
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	padding: 0 40px;
	color: #fff;
	z-index: 2;
}

.canifex-hero-slide__title {
	font-size: 26px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 6px;
	letter-spacing: 0.5px;
}

.canifex-hero-slide__subtitle {
	font-size: 13px;
	opacity: 0.95;
	margin: 0 0 16px;
}

.canifex-hero-slide__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.canifex-hero-btn {
	display: inline-block;
	padding: 8px 24px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.canifex-hero-btn--primary {
	background-color: var(--canifex-header-orange);
	color: #fff;
}

.canifex-hero-btn--primary:hover {
	background-color: #d95610;
	color: #fff;
	transform: translateY(-1px);
}

.canifex-hero-btn--secondary {
	background-color: transparent;
	color: #fff;
	border: 2px solid #fff;
}

.canifex-hero-btn--secondary:hover {
	background-color: rgba(255, 255, 255, 0.15);
	color: #fff;
	transform: translateY(-1px);
}

.canifex-hero-slider__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.2);
	color: #fff;
	border: none;
	width: 36px;
	height: 36px;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 5;
	border-radius: 4px;
	transition: background 0.2s ease;
}

.canifex-hero-slider__arrow:hover {
	background: rgba(0, 0, 0, 0.5);
}

.canifex-hero-slider__arrow--prev {
	left: 15px;
}

.canifex-hero-slider__arrow--next {
	right: 15px;
}

.canifex-hero-slider__controls {
	position: absolute;
	bottom: 15px;
	left: 40px;
	display: flex;
	align-items: center;
	gap: 10px;
	z-index: 10;
	background: rgba(0, 11, 51, 0.45);
	padding: 4px 10px;
	border-radius: 20px;
	backdrop-filter: blur(4px);
}

.canifex-hero-slider__pause {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2px;
	opacity: 0.85;
	transition: opacity 0.2s, transform 0.1s;
}

.canifex-hero-slider__pause:hover {
	opacity: 1;
	transform: scale(1.05);
}

.canifex-hero-slider__pause-icon {
	width: 14px;
	height: 14px;
}

.canifex-hero-slider__pagination {
	display: flex;
	align-items: center;
	gap: 6px;
}

.canifex-hero-slider__dot {
	background: rgba(255, 255, 255, 0.35);
	border: none;
	width: 20px;
	height: 3px;
	border-radius: 1.5px;
	cursor: pointer;
	transition: background-color 0.3s, width 0.3s;
	padding: 0;
}

.canifex-hero-slider__dot.is-complete {
	background: rgba(255, 255, 255, 0.8);
}

.canifex-hero-slider__dot.is-active {
	background: #d95610;
	width: 28px;
}

.canifex-hero-slider__dot:hover {
	background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 1024px) {
	.canifex-site-header__container {
		flex-wrap: wrap;
	}

	.canifex-header-nav-links {
		order: 3;
		width: 100%;
	}

	.canifex-header-nav-list {
		justify-content: center;
		margin-top: 5px;
	}

	.canifex-hero-slide__title {
		font-size: 22px;
	}

	.canifex-hero-slider__controls {
		left: 50%;
		transform: translateX(-50%);
		bottom: 12px;
	}
}

@media (max-width: 781px) {
	.canifex-site-header__container {
		justify-content: flex-start;
		align-items: center;
		gap: 8px;
		padding: 0 12px;
		flex-wrap: wrap;
	}

	.canifex-site-header .canifex-mobile-menu-toggle {
		display: inline-flex;
		order: 1;
		flex-shrink: 0;
		width: 40px;
		height: 40px;
		padding: 0;
	}

	.canifex-header-logo-link {
		order: 2;
		margin-right: 0;
		min-width: 0;
		flex: 0 1 auto;
		max-width: min(42vw, 9.5rem);
		gap: 6px;
	}

	.canifex-header-logo-text {
		font-size: 1.125rem;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.canifex-header-logo-image {
		max-height: 32px;
	}

	.canifex-header-nav-links {
		display: none;
	}

	.canifex-header-utilities {
		order: 3;
		display: flex;
		align-items: center;
		gap: 6px;
		margin-left: 0;
		margin-right: 0;
		flex: 0 0 auto;
		flex-shrink: 0;
	}

	.canifex-site-header .canifex-account-nav__label,
	.canifex-site-header .canifex-account-nav__label--mobile,
	.canifex-site-header .canifex-account-nav__toggle {
		display: none !important;
	}

	.canifex-site-header .canifex-account-nav__trigger {
		padding: 0.25rem;
	}

	.canifex-site-header .canifex-account-nav__icon {
		width: 1.5rem;
		height: 1.5rem;
	}

	.canifex-site-header .canifex-header-mini-cart .wc-block-mini-cart__button {
		padding: 0.25rem !important;
	}

	.canifex-header-search-wrap {
		order: 4;
		width: 100%;
		max-width: none;
		flex-basis: 100%;
		margin-top: 2px;
	}
}
