/**
 * ============================================================================
 * CUSTOM DESKTOP SEARCH BAR STYLES
 * ============================================================================
 */

/* Search Wrapper */
.rlg-custom-search-wrapper {
	position: relative;
	display: inline-block;
}

/* Hide mobile search icon on desktop */
.rlg-search-icon {
	display: none;
}

.rlg-search-icon .rlg-search-icon-svg {
	width: 20px;
	height: 20px;
	display: block;
	color: #333;
}

/* Desktop Search Bar */
.rlg-desktop-search-bar {
	position: relative;
	width: 400px;
}

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

.rlg-search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	background: #fff;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	overflow: visible;
	transition: all 0.3s ease;
}

.rlg-search-input-wrapper:hover,
.rlg-search-input-wrapper:focus-within {
	border-color: #333;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.rlg-search-input {
	flex: 1;
	padding: 12px 20px;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	font-size: 14px;
	color: #333;
	background: transparent;
}

.rlg-search-input:focus {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.rlg-search-input::placeholder {
	color: #999;
}

.rlg-search-submit {
	padding: 12px 20px;
	background: transparent;
	border: none;
	cursor: pointer;
	color: #000;
	transition: none;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 50px;
}

.rlg-search-submit:hover {
	color: #000;
	background: transparent;
}

.rlg-search-submit:hover .rlg-search-icon-svg {
	color: #000;
}

.rlg-search-icon-svg {
	width: 20px;
	height: 20px;
	display: block;
	color: #000;
	transition: none;
}

/* Search Results Dropdown */
.rlg-search-results {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	z-index: 9999;
	max-height: 500px;
	overflow-y: auto;
}

.rlg-search-results-inner {
	padding: 10px 0;
}

/* Loading State */
.rlg-search-loading {
	padding: 20px;
	text-align: center;
	color: #999;
}

/* No Results */
.rlg-no-results {
	padding: 20px;
	text-align: center;
	color: #999;
}

/* Product Result Item */
.rlg-search-result-item {
	display: flex;
	align-items: center;
	padding: 12px 20px;
	text-decoration: none;
	color: #333;
	transition: background 0.2s ease;
	border-bottom: 1px solid #f5f5f5;
}

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

.rlg-search-result-item:hover {
	background: #f9f9f9;
}

.rlg-result-image {
	width: 60px;
	height: 60px;
	margin-right: 15px;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 4px;
}

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

.rlg-result-content {
	flex: 1;
	min-width: 0;
}

.rlg-result-title {
	font-size: 14px;
	font-weight: 600;
	margin: 0 0 5px 0;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rlg-result-sku {
	font-size: 12px;
	color: #999;
	margin: 0 0 5px 0;
}

.rlg-result-price {
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

/* View All Link */
.rlg-view-all-link {
	display: block;
	padding: 15px 20px;
	text-align: center;
	background: #f9f9f9;
	color: #333;
	font-weight: 600;
	text-decoration: none;
	border-top: 2px solid #e0e0e0;
	transition: none;
}

.rlg-view-all-link:hover {
	background: #f9f9f9;
	color: #333;
	text-decoration: none;
}

/* Mobile Search Overlay */
.rlg-mobile-search-overlay {
	display: none;
}

/* Desktop Header Layout */
@media (min-width: 1025px) {
	/* Make wrapp-header flexbox */
	.main-header .wrapp-header {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
	}

	/* Remove fixed width from right-column */
	.main-header .right-column {
		width: auto !important;
		display: flex !important;
		align-items: center !important;
		gap: 15px !important;
	}
}

/* Mobile Styles */
@media (max-width: 1024px) {
	/* Show mobile search icon */
	.rlg-search-icon {
		display: block;
	}

	/* Hide desktop search bar */
	.rlg-desktop-search-bar {
		display: none;
	}

	/* Show mobile overlay when opened */
	.basel-search-opened .rlg-mobile-search-overlay {
		display: block;
	}
}

/* Tablet Styles */
@media (max-width: 768px) {
	.rlg-desktop-search-bar {
		max-width: 300px;
	}
}

