:root {
	--baly-radius: 20px;
	--baly-border: rgba(0, 0, 0, 0.1);
	--baly-gray: #6b7280;
	--baly-blue: #0000ff;
}

[hidden] {
	display: none !important;
}

.baly-search-hero {
	--baly-font-family: "Graphikarabic3", Tahoma, Arial, sans-serif;
	max-width: 760px;
	margin: 0 auto;
	padding: 12px;
	direction: rtl;
	font-family: var(--baly-font-family);
}

.baly-search-hero,
.baly-search-hero *,
.baly-search-hero *::before,
.baly-search-hero *::after {
	box-sizing: border-box;
	font-family: inherit;
}

.baly-search-form {
	position: relative;
}

.baly-header__search-form,
.baly-header__mobile-search {
	position: relative;
}

.baly-field {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid var(--baly-border);
	border-radius: var(--baly-radius);
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02), 0 8px 24px rgba(0, 0, 0, 0.06);
}

.baly-field:focus-within {
	border-color: #d6d9e0;
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08), 0 0 0 3px rgba(0, 0, 0, 0.02);
}

.baly-field .baly-input,
.baly-field input[type="search"].baly-input,
.baly-field input.baly-input[type="search"] {
	border: none !important;
	box-shadow: none !important;
	background: transparent !important;
	outline: none !important;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.baly-field input[type="search"]::-webkit-search-decoration,
.baly-field input[type="search"]::-webkit-search-cancel-button,
.baly-field input[type="search"]::-webkit-search-results-button,
.baly-field input[type="search"]::-webkit-search-results-decoration {
	-webkit-appearance: none;
}

.baly-input {
	flex: 1;
	font-size: 18px;
	line-height: 28px;
	padding: 12px 6px;
	font-weight: 400;
}

@supports (-webkit-touch-callout: none) {
	.baly-input {
		font-size: 16px !important;
	}
}

.baly-input::placeholder {
	color: #9aa1ad;
	opacity: 1;
	font-weight: 400;
}

.baly-icon-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	cursor: pointer;
	background-color: #fff !important;
	color: #cfcfcf !important;
	border: none !important;
}

.baly-icon-submit:hover {
	background: #f5f7fb;
	color: #7b8493;
}

.baly-suggest {
	position: absolute;
	top: 100%;
	inset-inline: 0;
	transform: translateY(8px);
	display: none;
	background: #fff;
	border: 1px solid var(--baly-border);
	border-radius: calc(var(--baly-radius) - 6px);
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	z-index: 9;
}

.baly-header-search-suggest {
	top: calc(100% + 10px);
	transform: none;
	border-radius: 16px;
	max-height: min(60vh, 420px);
	overflow: auto;
	z-index: 40;
}

.baly-header__search-form .baly-suggest-item,
.baly-header__mobile-search .baly-suggest-item {
	display: flex;
	width: 100%;
	height: auto;
	min-height: 0;
	padding: 12px 14px;
	border: 0;
	border-top: 1px solid #eef2f7;
	border-radius: 0;
	background: transparent;
	color: #0a0a0a;
	box-shadow: none;
	justify-content: flex-start;
	transform: none;
}

.baly-header__search-form .baly-suggest-item:first-child,
.baly-header__mobile-search .baly-suggest-item:first-child {
	border-top: 0;
}

.baly-header__search-form .baly-suggest-item:hover,
.baly-header__search-form .baly-suggest-item:focus-visible,
.baly-header__mobile-search .baly-suggest-item:hover,
.baly-header__mobile-search .baly-suggest-item:focus-visible {
	background: #f7f9fc;
	color: #0a0a0a;
}

.baly-suggest-item {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 0.6rem;
	padding: 14px 16px;
	border-top: 1px solid #f1f3f6;
	text-decoration: none;
	color: #0a0a0a;
	font-size: 16px;
	background: transparent;
	text-align: right;
	border-inline: none;
	border-bottom: none;
	cursor: pointer;
}

.baly-suggest-thumb {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: #f8fafc;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	overflow: hidden;
}

.baly-suggest-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.baly-suggest-thumb--fallback {
	color: #94a3b8;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.08em;
}

.baly-suggest-text {
	min-width: 0;
	flex: 1;
}

.baly-suggest-item:hover {
	background: #f7f9fc;
}

.baly-suggest-empty {
	padding: 14px 16px;
	color: #64748b;
	font-size: 14px;
	line-height: 1.6;
}

.baly-search-modal-open {
	overflow: hidden;
	height: 100%;
}

.baly-results-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	overflow: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 28px;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.baly-results-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.44);
	backdrop-filter: blur(6px);
}

.baly-results-panel {
	position: relative;
	z-index: 1;
	width: min(1120px, calc(100vw - 56px));
	max-height: calc(100dvh - 56px);
	height: auto;
	overflow: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	touch-action: pan-y;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 32px 80px rgba(0, 0, 0, 0.18);
	padding: 22px;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.baly-results-panel::-webkit-scrollbar {
	display: none;
}

.baly-results-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 10px;
}

.baly-results-kicker {
	margin: 0 0 4px;
	font-size: 13px;
	color: #64748b;
}

.baly-results-title {
	margin: 0;
	font-size: 24px;
	line-height: 1.2;
	color: #0f172a;
}

.baly-results-close {
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: #f1f5f9;
	color: #0f172a;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
}

.baly-results-status {
	margin-bottom: 14px;
	color: #475569;
	font-size: 14px;
}

.baly-results-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 12px;
}

.baly-result-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	background: linear-gradient(180deg, #ffffff, #f8fbff);
	box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.baly-result-card:hover {
	transform: translateY(-2px);
	border-color: #cbd5e1;
	box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.baly-result-media {
	aspect-ratio: 1 / 0.62;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
}

.baly-result-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.baly-result-fallback {
	color: #94a3b8;
	font-weight: 700;
	letter-spacing: 0.08em;
}

.baly-result-body {
	padding: 10px 10px 12px;
}

.baly-result-name {
	margin: 0 0 5px;
	font-size: 13px;
	line-height: 1.4;
	color: #0f172a;
}

.baly-result-subtitle {
	margin: 0 0 6px;
	font-size: 10px;
	line-height: 1.45;
	color: #64748b;
}

.baly-result-meta {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.baly-result-price {
	font-size: 14px;
	font-weight: 800;
	color: #0043ff;
}

.baly-result-compare {
	color: #94a3b8;
	text-decoration: line-through;
	font-size: 10px;
}

.baly-results-empty {
	grid-column: 1 / -1;
	padding: 28px;
	border-radius: 22px;
	background: #f8fafc;
	color: #334155;
	text-align: center;
}

@media (max-width: 640px) {
	.baly-search-hero {
		max-width: 100%;
		padding: 8px;
	}

	.baly-icon-submit {
		width: 42px;
		height: 42px;
	}
}

@media (max-width: 1200px) {
	.baly-results-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	.baly-results-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.baly-results-modal {
		padding: 8px;
		align-items: stretch;
	}

	.baly-results-panel {
		width: calc(100vw - 16px);
		height: calc(100dvh - 16px);
		max-height: none;
		min-height: 0;
		padding: 10px;
		border-radius: 18px;
	}

	.baly-results-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}

	.baly-results-title {
		font-size: 17px;
	}

	.baly-results-kicker {
		font-size: 11px;
	}

	.baly-results-status {
		margin-bottom: 8px;
		font-size: 12px;
	}

	.baly-results-header {
		align-items: flex-start;
		margin-bottom: 6px;
	}

	.baly-results-close {
		width: 36px;
		height: 36px;
		font-size: 22px;
	}

	.baly-result-card {
		border-radius: 13px;
	}

	.baly-result-media {
		aspect-ratio: 1 / 1;
		padding: 8px;
		background: #f8fafc;
	}

	.baly-result-media img {
		object-fit: contain;
		object-position: center;
	}

	.baly-result-body {
		padding: 6px 6px 7px;
	}

	.baly-result-name {
		margin-bottom: 3px;
		font-size: 10px;
	}

	.baly-result-subtitle {
		margin-bottom: 4px;
		font-size: 9px;
	}

	.baly-result-price {
		font-size: 11px;
	}

	.baly-result-compare {
		font-size: 9px;
	}
}
