/* Main container */
.custom-search-container {
	width: 100%;
	max-width: 800px;
	margin: 0 auto;
	font-family: sans-serif;
}

/* Form wrapper - force a fixed bar height */
.custom-search-form .search-input-wrapper {
	display: flex !important;
	align-items: stretch !important; /* Force inner elements to cover the full height */
	background-color: #ffffff !important;
	border-radius: 6px !important;
	overflow: hidden !important;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
	height: 50px !important; /* Adjust this value for the desired total height */
}

/* Text input field */
.custom-search-form .search-field {
	flex: 1 !important;
	border: none !important;
	background: transparent !important;
	padding: 0 20px !important;
	font-size: 16px !important;
	color: #666666 !important;
	outline: none !important;
	box-shadow: none !important;
	height: 100% !important; /* Take the full wrapper height */
	margin: 0 !important;
}

/* Placeholder text */
.custom-search-form .search-field::placeholder {
	color: #888888 !important;
	opacity: 1 !important;
}

/* Submit button (orange) - fixed alignment */
.custom-search-form .search-submit {
	background-color: #ff9800 !important;
	border: none !important;
	color: #ffffff !important;
	padding: 0 25px !important;
	height: 100% !important; /* Perfectly cover the height */
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background-color 0.2s ease !important;
	border-radius: 0 !important;
	margin: 0 !important;
	box-shadow: none !important;
}

/* Button hover effect */
.custom-search-form .search-submit:hover {
	background-color: #e68900 !important;
}

/* Arrow icon (SVG) */
.custom-search-form .arrow-icon {
	width: 20px !important;
	height: 20px !important;
	display: block !important;
}

/* Live search dropdown */
.custom-search-form {
	position: relative;
}

.pesi-search-results {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 2147483647; /* massimo pratico: sopra qualsiasi altro elemento */
	max-height: 360px;
	overflow-y: auto;
	background: #ffffff;
	border-radius: 6px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
	font-family: sans-serif;
}

.pesi-search-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	text-decoration: none;
	color: #333333;
	border-bottom: 1px solid #f0f0f0;
}

.pesi-search-item:last-of-type {
	border-bottom: none;
}

.pesi-search-item:hover,
.pesi-search-item.is-active {
	background: #eef1f8;
}

.pesi-search-thumb {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	object-fit: cover;
	border-radius: 4px;
	background: #f3f3f3;
}

.pesi-search-thumb--empty {
	display: inline-block;
}

.pesi-search-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.pesi-search-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #333333;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pesi-search-price {
	font-size: 13px;
	color: #1a3270;
	font-weight: 600;
	margin-top: 2px;
}

.pesi-search-price-old {
	color: #94a3b8;
	font-weight: 400;
	text-decoration: line-through;
	margin-right: 4px;
}

/* Solo en rebaja (cuando hay precio tachado antes) el actual va en rojo. */
.pesi-search-price-old + .pesi-search-price-now { color: #e02424; }

.pesi-search-message {
	padding: 14px;
	font-size: 14px;
	color: #888888;
	text-align: center;
}

.pesi-search-seeall {
	display: block;
	width: 100%;
	padding: 11px 14px;
	border: none;
	border-top: 1px solid #f0f0f0;
	background: #fafafa;
	color: #1a3270;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
}

.pesi-search-seeall:hover {
	background: #eef1f8;
}

/* Responsive: slightly smaller bar on phones */
@media (max-width: 600px) {
	.custom-search-form .search-input-wrapper {
		height: 46px !important;
	}

	.custom-search-form .search-field {
		padding: 0 14px !important;
		font-size: 15px !important;
	}

	.custom-search-form .search-submit {
		padding: 0 18px !important;
	}
}

/* Hide text visually but keep it for screen readers */
.custom-search-container .screen-reader-text {
	border: 0 !important;
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%) !important;
	height: 1px !important;
	margin: -1px !important;
	overflow: hidden !important;
	padding: 0 !important;
	position: absolute !important;
	width: 1px !important;
	word-wrap: normal !important;
}
