﻿.sg-search {
	position: relative;
}

.sg-search .sg-search__dropdown {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 10010;
	display: none;
}

.sg-search.sg-search--open .sg-search__dropdown {
	display: block;
}

.sg-search .sg-search__panel {
	background: #fff;
	border: 1px solid #e4ebf2;
	border-radius: 12px;
	box-shadow: 0 14px 38px rgba(16, 38, 64, 0.16);
	overflow: hidden;
}

.sg-search .sg-search__layout {
	display: block;
	max-height: min(70vh, 520px);
}

.sg-search .sg-search__layout.sg-search__layout--split {
	display: grid;
	grid-template-columns: minmax(230px, 34%) minmax(360px, 66%);
}

.sg-search .sg-search__col {
	min-width: 0;
	overflow-y: auto;
	max-height: min(70vh, 520px);
}

.sg-search .sg-search__layout--split .sg-search__col--left {
	border-right: 1px solid #edf2f7;
}

.sg-search .sg-search__section {
	padding: 12px 0;
}

.sg-search .sg-search__section + .sg-search__section {
	border-top: 1px solid #f1f4f8;
}

.sg-search .sg-search__section-title {
	margin: 0;
	padding: 0 14px 8px;
	font-size: 12px;
	line-height: 1.3;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: #6f7f91;
}

.sg-search .sg-search__section--product .sg-search__section-title {
	color: #0f5ca7;
}

.sg-search .sg-search__section-body {
	padding: 0 8px;
}

.sg-search .sg-search__list {
	display: block;
}

.sg-search .sg-search__item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 10px;
	color: #1d2b3a;
	text-decoration: none;
	transition: background-color .18s ease, color .18s ease;
}

.sg-search .sg-search__item:hover,
.sg-search .sg-search__item:focus,
.sg-search .sg-search__item.sg-search__item--active {
	background: #eef6ff;
	color: #0c4f97;
	outline: none;
}

.sg-search .sg-search__item-icon {
	width: 18px;
	min-width: 18px;
	text-align: center;
	color: #86a1bc;
	font-size: 13px;
}

.sg-search .sg-search__item-label {
	font-size: 14px;
	line-height: 1.35;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sg-search .sg-search__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 6px;
}

.sg-search .sg-search__chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	border-radius: 999px;
	background: #f6f9fd;
	border: 1px solid #e0e9f3;
	font-size: 13px;
	line-height: 1;
	font-weight: 500;
	color: #2a3b4d;
}

.sg-search .sg-search__chip:hover,
.sg-search .sg-search__chip.sg-search__item--active {
	background: #eaf3ff;
	border-color: #c7def8;
	color: #0d5aa7;
}

.sg-search .sg-search__chip-icon {
	font-size: 11px;
	color: #f06f1f;
}

.sg-search .sg-search__chip-label {
	max-width: 170px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sg-search .sg-search__section--product .sg-search__section-body {
	padding: 0 10px;
}

.sg-search .sg-search__item--product {
	align-items: flex-start;
	padding: 10px;
	border-radius: 12px;
}

.sg-search .sg-search__item--product + .sg-search__item--product {
	margin-top: 4px;
}

.sg-search .sg-search__thumb {
	width: 56px;
	height: 56px;
	min-width: 56px;
	border-radius: 10px;
	border: 1px solid #e6edf4;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.sg-search .sg-search__thumb img {
	max-width: 90%;
	max-height: 90%;
}

.sg-search .sg-search__content {
	min-width: 0;
	flex: 1;
	display: block;
}

.sg-search .sg-search__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 13px;
	line-height: 1.38;
	color: #223446;
	margin-bottom: 4px;
}

.sg-search .sg-search__price {
	display: block;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 700;
	color: #d3202f;
}

.sg-search .sg-search__loading,
.sg-search .sg-search__empty {
	padding: 18px 16px;
	font-size: 14px;
	line-height: 1.4;
	color: #5f7082;
}

.sg-search .sg-search__loading {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sg-search .sg-search__loading-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #1b86e3;
	animation: sg-search-pulse 1s infinite ease-in-out;
}

@keyframes sg-search-pulse {
	0%,
	100% {
		opacity: .35;
		transform: scale(.8);
	}
	50% {
		opacity: 1;
		transform: scale(1);
	}
}

.sg-search .sg-search__col::-webkit-scrollbar {
	width: 6px;
	height: 6px;
}

.sg-search .sg-search__col::-webkit-scrollbar-thumb {
	background: #ccd8e5;
	border-radius: 999px;
}

@media screen and (max-width: 1024px) {
	.sg-search .sg-search__layout.sg-search__layout--split {
		grid-template-columns: minmax(210px, 40%) minmax(280px, 60%);
	}
}

@media screen and (max-width: 768px) {
	.sg-search .sg-search__dropdown {
		top: calc(100% + 6px);
	}

	.sg-search .sg-search__panel {
		border-radius: 10px;
		box-shadow: 0 10px 28px rgba(16, 38, 64, 0.16);
	}

	.sg-search .sg-search__layout,
	.sg-search .sg-search__col {
		max-height: min(60vh, 420px);
	}

	.sg-search .sg-search__layout.sg-search__layout--split {
		display: block;
	}

	.sg-search .sg-search__layout.sg-search__layout--split .sg-search__col--left {
		border-right: none;
		border-bottom: 1px solid #edf2f7;
	}

	.sg-search .sg-search__section {
		padding: 10px 0;
	}

	.sg-search .sg-search__section-title {
		padding: 0 12px 8px;
		font-size: 11px;
	}

	.sg-search .sg-search__section-body {
		padding: 0 6px;
	}

	.sg-search .sg-search__item {
		padding: 11px 10px;
		min-height: 44px;
	}

	.sg-search .sg-search__item-label {
		font-size: 14px;
	}

	.sg-search .sg-search__chips {
		gap: 7px;
	}

	.sg-search .sg-search__chip {
		padding: 7px 10px;
		font-size: 13px;
	}

	.sg-search .sg-search__thumb {
		width: 50px;
		height: 50px;
		min-width: 50px;
	}

	.sg-search .sg-search__name {
		font-size: 13px;
		line-height: 1.35;
	}

	.sg-search .sg-search__price {
		font-size: 14px;
	}
}
