/* ========================================
   NAVIGATION COMPONENT - STYLES
   ======================================== */

/* ========================================
   NAVIGATION CONTAINER
   ======================================== */

.navigation {
	position: absolute;
	width: 100%;
	top: 0;
	left: 0;
	z-index: 10;
	padding-top: 37px;
}

.navigation__container {
	display: flex;
	flex-direction: column;
	width: 100%;
	align-items: flex-end;
	justify-content: flex-end;
	position: relative;
	padding: 0 84px;
}

/* ========================================
   SUB MENU
   ======================================== */

.navigation__submenu {
	position: relative;
	gap: 30px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.navigation__submenu-links {
	display: inline-flex;
	align-items: center;
	gap: 30px;
}

.navigation__submenu-link {
	font-family: 'Trim-Regular', Helvetica;
	font-weight: 400;
	color: #000000;
	font-size: 16px;
	letter-spacing: 0.5px;
	line-height: 24px;
	text-decoration: underline;
	white-space: nowrap;
	transition: opacity 0.2s ease;
}

.navigation__submenu-link:hover {
	opacity: 0.8;
}

/* Language Selector */
.navigation__language {
	display: flex;
	align-items: center;
	gap: 3px;
	cursor: pointer;
}

.navigation__language-link {
	display: flex;
	align-items: center;
	gap: 3px;
	text-decoration: none;
	color: inherit;
}

.navigation__language-link:hover,
.navigation__language-link:focus {
	text-decoration: none;
	color: inherit;
}

.navigation__language-icon {
	width: 24px;
	height: 24px;
}

.navigation__language-text {
	font-family: 'Trim-Regular', Helvetica;
	font-weight: 400;
	color: #000000;
	font-size: 16px;
	letter-spacing: 0.5px;
	line-height: 24px;
	white-space: nowrap;
}

/* ========================================
   MAIN MENU
   ======================================== */

.navigation__main {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.navigation__left {
	display: flex;
	align-items: center;
	gap: 60px;
	flex: 1;
}

.navigation__logo {
	display: flex;
	flex-direction: column;
	width: 129px;
	align-items: flex-start;
	gap: 5px;
	text-decoration: none;
}

.navigation__logo-img {
	width: 100%;
	height: auto;
}

/* Primary Navigation */
.navigation__nav {
	display: flex;
	align-items: center;
	gap: 28px;
	height: 24px;
	flex: 1;
}

.navigation__link {
	font-family: 'Trim-Medium', Helvetica;
	font-weight: 500;
	color: #000000;
	font-size: 24px;
	letter-spacing: 0.5px;
	line-height: 24px;
	white-space: nowrap;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.navigation__link:hover {
	opacity: 0.8;
}

.navigation__link--active {
	position: relative;
}

.navigation__link--active::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: currentColor;
}

/* Right Menu */
.navigation__right {
	display: inline-flex;
	align-items: center;
	gap: 13px;
}

/* Search */
.navigation__search {
	position: relative;
	width: 216px;
	min-height: 51px;
	background-color: #e6e6e640;
	border-radius: 8px;
	transition: background-color 0.2s ease, border-radius 0.2s ease;
}

.navigation__search:hover {
	background-color: #e6e6e680;
}

.navigation__search:focus-within {
	background-color: #e6e6e680;
	outline: 2px solid #939040;
	outline-offset: -2px;
}

.navigation__search-form {
	display: flex;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 10px;
	gap: 10px;
}

.navigation__search-icon {
	width: 28px;
	height: 28px;
	flex-shrink: 0;
}

.navigation__search-input {
	flex: 1;
	border: none;
	background: transparent;
	font-family: 'Trim-Regular', Helvetica;
	font-weight: 400;
	color: #000000;
	font-size: 16px;
	letter-spacing: 0.5px;
	line-height: 24px;
	outline: none;
	padding: 0;
	width: 100%;
}

.navigation__search-input::placeholder {
	color: #000000;
	opacity: 0.8;
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */

.navigation__mobile {
	display: none;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0;
}

.navigation__mobile-logo {
	display: block;
	height: 60px;
}

.navigation__mobile-logo-img {
	height: 100%;
	width: auto;
}

/* Hamburger Menu */
.navigation__hamburger {
	all: unset;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	width: 40px;
	height: 40px;
	cursor: pointer;
	gap: 4px;
}

.navigation__hamburger-line {
	width: 24px;
	height: 3px;
	background-color: #ffffff;
	transition: all 0.3s ease, background-color 0.2s ease;
	transform-origin: center;
}

.navigation--dark .navigation__hamburger-line {
	background-color: #000000;
}

/* Hamburger Animation */
.navigation__hamburger--active .navigation__hamburger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.navigation__hamburger--active .navigation__hamburger-line:nth-child(2) {
	opacity: 0;
}

.navigation__hamburger--active .navigation__hamburger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* When menu is open, hamburger lines should always be dark - higher specificity */
.navigation--menu-open .navigation__hamburger-line,
.navigation--light.navigation--menu-open .navigation__hamburger-line {
	background-color: #000000 !important;
}

/* Mobile Menu */
.navigation__mobile-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background-color: #ffffff;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.navigation__mobile-menu--active {
	max-height: 600px;
}

.navigation__mobile-nav {
	display: flex;
	flex-direction: column;
	padding: 20px;
	gap: 20px;
	border-bottom: 1px solid #e6e6e6;
}

.navigation__mobile-link {
	font-family: 'Trim-Medium', Helvetica;
	font-weight: 500;
	color: #000000;
	font-size: 20px;
	text-decoration: none;
	padding: 8px 0;
	transition: opacity 0.2s ease;
}

.navigation__mobile-link:hover {
	opacity: 0.8;
}

.navigation__mobile-link--active {
	position: relative;
	color: #939040;
}

.navigation__mobile-actions {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	border-bottom: 1px solid #e6e6e6;
}

.navigation__mobile-search {
	display: flex;
	align-items: center;
	padding: 10px 16px;
	background-color: #e6e6e640;
	border-radius: 8px;
	gap: 10px;
	transition: background-color 0.2s ease, border-radius 0.2s ease;
}

.navigation__mobile-search:focus-within {
	background-color: #e6e6e680;
	outline: 2px solid #939040;
	outline-offset: -2px;
}

.navigation__mobile-search-form {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 10px;
}

.navigation__mobile-search-input {
	flex: 1;
	border: none;
	background: transparent;
	font-family: 'Trim-Regular', Helvetica;
	font-weight: 400;
	color: #000000;
	font-size: 16px;
	outline: none;
	padding: 0;
	width: 100%;
}

.navigation__mobile-search-input::placeholder {
	color: #000000;
	opacity: 0.8;
}

.navigation__mobile-submenu {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px;
	border-bottom: 1px solid #e6e6e6;
}

.navigation__mobile-submenu-link {
	font-family: 'Trim-Regular', Helvetica;
	font-weight: 400;
	color: #000000;
	font-size: 16px;
	text-decoration: underline;
	transition: opacity 0.2s ease;
}

.navigation__mobile-language {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 20px;
	cursor: pointer;
	border-bottom: 1px solid #e6e6e6;
}

.navigation__mobile-language .navigation__language-link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: inherit;
}

.navigation__mobile-language .navigation__language-link:hover,
.navigation__mobile-language .navigation__language-link:focus {
	text-decoration: none;
	color: inherit;
}

/* ========================================
   THEME VARIATIONS
   ======================================== */

/* Light Theme (White Text) */
.navigation--light .navigation__submenu-link,
.navigation--light .navigation__language-text,
.navigation--light .navigation__link,
.navigation--light .navigation__search-input,
.navigation--light .navigation__search-input::placeholder {
	color: #ffffff;
}

.navigation--light .navigation__link {
	text-shadow: 0px 4px 4px #00000040;
}

.navigation--light .navigation__search {
	background-color: rgba(255, 255, 255, 0.25);
}

.navigation--light .navigation__search:hover {
	background-color: rgba(255, 255, 255, 0.35);
}

.navigation--light .navigation__search:focus-within {
	background-color: rgba(255, 255, 255, 0.35);
	outline-color: #ffffff;
}

.navigation--light .navigation__hamburger-line {
	background-color: #ffffff;
}

/* Dark Theme (Black Text) - Default */
.navigation--dark .navigation__submenu-link,
.navigation--dark .navigation__language-text,
.navigation--dark .navigation__link,
.navigation--dark .navigation__search-input,
.navigation--dark .navigation__search-input::placeholder {
	color: #000000;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1080px) {
	.navigation__container {
		padding: 0 40px;
	}

	.navigation__nav {
		gap: 20px;
	}

	.navigation__link {
		font-size: 20px;
	}

	.navigation__left {
		gap: 40px;
	}
}

/* Mobile */
@media (max-width: 900px) {
	.navigation {
		padding-top: 20px;
	}

	.navigation--light {
	}

	.navigation--menu-open {
		background-color: #ffffff !important;
	}

	.navigation__container {
		padding: 0 20px;
	}

	/* Hide desktop elements */
	.navigation__submenu,
	.navigation__main {
		display: none;
	}

	/* Show mobile elements */
	.navigation__mobile {
		display: flex;
	}

	.navigation__mobile-menu {
		display: block;
	}

	/* Adjust button styles for mobile */
	.navigation__mobile-actions .btn {
		width: 100%;
	}

	/* Fix mobile language visibility - ensure dark text in mobile menu */
	.navigation__mobile-language .navigation__language-text {
		color: #000000 !important;
	}

	/* Fix mobile language icon visibility - add dark background or filter for white icons */
	.navigation__mobile-language .navigation__language-icon {
		filter: brightness(0) saturate(100%) !important;
	}
}

/* ========================================
   SEARCH DROPDOWN STYLES
   ======================================== */

/* Base dropdown styles */
.navigation__search-dropdown,
.navigation__mobile-search-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #ffffff;
	border-radius: 0 0 12px 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: all 0.2s ease;
	z-index: 1000;
	overflow: hidden;
	will-change: opacity, visibility, transform;
	backface-visibility: hidden;
}

.navigation__search-dropdown {
	max-height: 400px;
}

.navigation__mobile-search-dropdown {
	max-height: 300px;
}

/* Visible state */
.navigation__search-dropdown--visible,
.navigation__mobile-search-dropdown--visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Results container */
.navigation__search-results {
	overflow-y: auto;
	padding: 8px 0;
}

.navigation__search-results::-webkit-scrollbar {
	width: 4px;
}

.navigation__search-results::-webkit-scrollbar-track {
	background: transparent;
}

.navigation__search-results::-webkit-scrollbar-thumb {
	background: #e0e0e0;
	border-radius: 2px;
}

.navigation__search-results::-webkit-scrollbar-thumb:hover {
	background: #c0c0c0;
}

/* Result items */
.navigation__search-result-item {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	text-decoration: none;
	color: #000000;
	transition: background-color 0.2s ease;
	border-bottom: 1px solid #f5f5f5;
	will-change: background-color;
}

.navigation__search-result-item:hover {
	background-color: #f8f9fa;
	color: #000000;
	text-decoration: none;
}

.navigation__search-result-item:last-child {
	border-bottom: none;
}

/* Product images */
.navigation__search-result-image {
	width: 50px;
	height: 50px;
	border-radius: 6px;
	overflow: hidden;
	margin-right: 12px;
	flex-shrink: 0;
	background-color: #f8f9fa;
	display: flex;
	align-items: center;
	justify-content: center;
}

.navigation__search-result-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.navigation__search-result-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #939040 0%, #b8b656 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: 'Trim-Medium', Helvetica;
	font-weight: 500;
	font-size: 14px;
	color: #ffffff;
	letter-spacing: 1px;
}

/* Content area */
.navigation__search-result-content {
	flex: 1;
	min-width: 0;
	display: flex;
	align-items: center;
}

.navigation__search-result-name {
	font-family: 'Trim-Medium', Helvetica;
	font-weight: 500;
	font-size: 15px;
	color: #000000;
	margin: 0;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* No results */
.navigation__search-no-results {
	padding: 20px 16px;
	text-align: center;
}

.navigation__search-no-results p {
	font-family: 'Trim-Regular', Helvetica;
	font-weight: 400;
	font-size: 14px;
	color: #666666;
	margin: 0;
}

/* Mobile optimizations */
.navigation__mobile-search {
	position: relative;
}

.navigation__mobile-search .navigation__search-results {
	max-height: 300px;
}

.navigation__mobile-search .navigation__search-result-item {
	padding: 8px 10px;
}

.navigation__mobile-search .navigation__search-result-image {
	width: 45px;
	height: 45px;
	margin-right: 10px;
}

.navigation__mobile-search .navigation__search-result-placeholder {
	font-size: 12px;
}

.navigation__mobile-search .navigation__search-result-name {
	font-size: 14px;
}

/* Seamless connection */
.navigation__search {
	position: relative;
}

.navigation__search:has(.navigation__search-dropdown--visible) {
	border-radius: 8px 8px 0 0;
}

.navigation__mobile-search:has(.navigation__mobile-search-dropdown--visible) {
	border-radius: 8px 8px 0 0;
}

/* Light theme */
.navigation--light .navigation__search-dropdown,
.navigation--light .navigation__mobile-search-dropdown {
	border: 1px solid #e6e6e6;
	border-top: none;
	background-color: #fff;
}

.navigation--light .navigation__search-result-item:hover {
	background-color: #f0f0f0;
}

/* Ensure dropdown items use consistent font */
.dropdown-item {
	font-family: 'Inter', Helvetica;
}

/* ========================================
   TEMPORARY HIDING
   ======================================== */

/* Hide language selector (temporary) */
.navigation__language,
.navigation__mobile-language {
	display: none !important;
}

