/* Shop3 Product Search Styles */

.shop3-product-search-container {
	position: relative;
	width: 100%;
	max-width: 400px;
	margin: 0 auto;
}

.shop3-search-input-wrapper {
	display: flex;
	gap: 0;
	align-items: center;
}

.shop3-product-search-input {
	flex: 1;
	padding: 7px 16px;
	font-size: 14px;
	border: 1px solid #ddd;
	border-radius: 4px 0 0 4px;
	outline: none;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	box-sizing: border-box;
	font-family: inherit;
	line-height: normal;
}

.shop3-product-search-input:focus {
	border-color: #333;
	box-shadow: 0 0 5px rgb(90 151 177 / 10%);
}

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

.shop3-search-button {
	padding: 9px 16px;
	font-size: 14px;
	border: 1px solid #ddd;
	border-left: none;
	border-radius: 0 4px 4px 0;
	background-color: #f5f5f5;
	cursor: pointer;
	transition: background-color 0.3s ease, border-color 0.3s ease;
	box-sizing: border-box;
	font-family: inherit;
}

.shop3-search-button:hover {
	background-color: #e8e8e8;
	border-color: #999;
}

.shop3-search-button:active {
	background-color: #ddd;
}

/* Results Dropdown */
.shop3-search-results-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	border-radius: 0 0 4px 4px;
	max-height: 400px;
	overflow-y: auto;
	z-index: 1000;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	display: none;
}

.shop3-search-header {
	padding: 10px 12px;
	border-bottom: 1px solid #f0f0f0;
	background-color: #fafafa;
}

.shop3-result-count {
	font-size: 12px;
	color: #666;
	font-weight: 600;
}

.shop3-search-results-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.shop3-search-result-item {
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.2s ease;
}

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

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

.shop3-search-result-link {
	display: flex;
	align-items: flex-start;
	padding: 10px 12px;
	text-decoration: none;
	color: #333;
	gap: 12px;
	transition: background-color 0.2s ease;
}

.shop3-search-result-link:hover {
	background-color: #f5f5f5;
}

.shop3-search-result-image-container {
	flex-shrink: 0;
	width: 50px;
	height: 50px;
	background-color: #f0f0f0;
	border-radius: 4px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.shop3-search-result-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.shop3-search-result-image-placeholder {
	font-size: 12px;
	color: #999;
	text-align: center;
}

.shop3-search-result-info {
	flex: 1;
	min-width: 0;
}

.shop3-search-result-name {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #333;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.shop3-search-result-meta {
	display: flex;
	gap: 8px;
	margin-top: 4px;
	flex-wrap: wrap;
}

.shop3-brand-style {
	font-size: 12px;
	color: #666;
	background-color: #f0f0f0;
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 120px;
}

.shop3-sku {
	font-size: 12px;
	color: #666;
	background-color: #f0f0f0;
	padding: 2px 6px;
	border-radius: 3px;
	white-space: nowrap;
}

.shop3-search-colors {
	display: flex;
	gap: 4px;
	margin-top: 6px;
	align-items: center;
	flex-wrap: wrap;
}

.shop3-search-color-swatch {
	width: 18px;
	height: 18px;
	border-radius: 3px;
	border: 1px solid #ddd;
	cursor: pointer;
	transition: transform 0.2s ease, border-color 0.2s ease;
	flex-shrink: 0;
}

.shop3-search-color-swatch:hover {
	transform: scale(1.1);
	border-color: #999;
}

.shop3-more-colors-badge {
	font-size: 11px;
	color: #999;
	margin-left: 2px;
	font-weight: 600;
}

.shop3-search-no-results {
	padding: 16px;
	text-align: center;
	color: #999;
	font-size: 14px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
	.shop3-product-search-container {
		max-width: 100%;
	}

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

	.shop3-search-result-image-container {
		width: 40px;
		height: 40px;
	}

	.shop3-search-result-name {
		font-size: 13px;
	}

	.shop3-search-result-link {
		padding: 8px 10px;
	}

	.shop3-search-button {
		padding: 12px 12px;
	}
}
