/* Kitchenu — mobile header search modal */

body.ku-search-modal-open {
	overflow: hidden !important;
}

body.ku-search-modal-open .ku-mobile-dock {
	z-index: 10030 !important;
}

#header .ku-search-nav-item {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

#header .ku-search-modal-trigger {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	border: 1px solid rgba(253, 230, 138, 0.95) !important;
	border-radius: 14px !important;
	background: linear-gradient(145deg, #fffbeb 0%, #ffffff 100%) !important;
	color: #c2410c !important;
	font-family: var(--ku-font, 'Vazirmatn', Tahoma, Arial, sans-serif) !important;
	font-size: 12.5px !important;
	font-weight: 800 !important;
	cursor: pointer !important;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.98) inset,
		0 4px 14px rgba(15, 23, 42, 0.06) !important;
	transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease !important;
}

body.ku-mobile-header-active #header .ku-search-nav-item {
	display: flex !important;
	align-items: center !important;
}

body.ku-mobile-header-active #header .ku-search-modal-trigger {
	min-width: 44px !important;
	min-height: 44px !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
}

body.ku-mobile-header-active #header .ku-search-modal-trigger__label {
	display: none !important;
}

body.ku-mobile-header-active #header .ku-search-modal-trigger__icon {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 22px !important;
	height: 22px !important;
	color: #ea580c !important;
}

body.ku-mobile-header-active #header .ku-search-modal-trigger__icon svg {
	width: 20px !important;
	height: 20px !important;
}

body.ku-mobile-header-active #header .ku-categories-nav-item {
	display: none !important;
}

.ku-search-modal {
	position: fixed;
	inset: 0;
	z-index: 10000060;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
	font-family: 'Vazirmatn', Tahoma, sans-serif;
}

.ku-search-modal.ku-search-modal--visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.ku-search-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.ku-search-modal__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: min(94dvh, 94vh);
	border-radius: 22px 22px 0 0;
	border: 1px solid rgba(255, 255, 255, 0.78);
	border-bottom: 0;
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	box-shadow: 0 -16px 48px rgba(15, 23, 42, 0.18);
	direction: rtl;
	overflow: hidden;
	transform: translateY(100%);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.ku-search-modal.ku-search-modal--visible .ku-search-modal__panel {
	transform: translateY(0);
}

.ku-search-modal__handle {
	width: 42px;
	height: 4px;
	margin: 8px auto 0;
	border-radius: 999px;
	background: rgba(148, 163, 184, 0.45);
	flex-shrink: 0;
}

.ku-search-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px 10px;
	border-bottom: 1px solid rgba(226, 232, 240, 0.9);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.88) 100%);
}

.ku-search-modal__title-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
	flex: 1 1 auto;
}

.ku-search-modal__title-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	background: linear-gradient(145deg, #f59e0b 0%, #f97316 100%);
	color: #ffffff;
	box-shadow:
		0 6px 16px rgba(249, 115, 22, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
	flex-shrink: 0;
}

.ku-search-modal__title-badge svg {
	width: 18px;
	height: 18px;
}

.ku-search-modal__title-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.ku-search-modal__title {
	margin: 0;
	font-size: 15px;
	font-weight: 900;
	color: #0f172a;
	line-height: 1.35;
}

.ku-search-modal__subtitle {
	margin: 0;
	font-size: 11.5px;
	font-weight: 700;
	color: #64748b;
	line-height: 1.45;
}

.ku-search-modal__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.92);
	color: #64748b;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
	flex-shrink: 0;
}

.ku-search-modal__form {
	display: flex;
	align-items: stretch;
	flex-direction: row;
	direction: ltr;
	gap: 0;
	margin: 0 14px 10px;
	padding: 0;
	min-height: 48px;
	height: 48px;
	border: 2px solid #cbd5e1;
	border-radius: 16px;
	background: #ffffff;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ku-search-modal__form:focus-within {
	border-color: #f97316;
	box-shadow: 0 8px 20px rgba(249, 115, 22, 0.16);
}

.ku-search-modal__submit {
	order: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	width: 52px;
	min-width: 52px;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 0;
	background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
	color: #ffffff;
	box-shadow: none;
	cursor: pointer;
	flex-shrink: 0;
}

.ku-search-modal__submit svg {
	width: 18px;
	height: 18px;
}

.ku-search-modal__input {
	order: 2;
	flex: 1 1 auto;
	align-self: stretch;
	width: 100%;
	min-width: 0;
	height: 100%;
	min-height: 0;
	margin: 0;
	padding: 0 14px;
	border: none;
	border-radius: 0;
	background: transparent;
	color: #0f172a;
	font-family: inherit;
	font-size: 15px;
	font-weight: 800;
	line-height: 48px;
	direction: rtl;
	text-align: right;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.ku-search-modal__input::placeholder {
	color: #94a3b8;
	font-size: 13.5px;
	font-weight: 600;
}

.ku-search-modal__input:focus {
	outline: none;
}

.ku-search-modal__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.ku-search-modal__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 4px 14px calc(14px + env(safe-area-inset-bottom, 0px));
}

.ku-search-modal__body.is-loading {
	opacity: 0.72;
}

.ku-search-modal__idle {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ku-search-modal__section-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.ku-search-modal__section-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
	color: #2563eb;
	flex-shrink: 0;
}

.ku-search-modal__section-icon svg {
	width: 17px;
	height: 17px;
}

.ku-search-modal__section-copy {
	min-width: 0;
}

.ku-search-modal__idle-title {
	margin: 0 0 2px;
	font-size: 13px;
	font-weight: 900;
	color: #0f172a;
}

.ku-search-modal__idle-sub {
	margin: 0;
	font-size: 11.5px;
	font-weight: 600;
	color: #64748b;
	line-height: 1.55;
}

.ku-search-modal__quick-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.ku-search-modal__quick-card {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	min-height: 54px;
	padding: 10px 12px;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 14px;
	background: #ffffff;
	color: #0f172a;
	font-family: inherit;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.35;
	text-align: right;
	text-decoration: none;
	cursor: pointer;
	box-shadow:
		0 4px 14px rgba(15, 23, 42, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.92);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ku-search-modal__quick-card:active {
	transform: scale(0.98);
}

.ku-search-modal__quick-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 11px;
	color: #ffffff;
	flex-shrink: 0;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.ku-search-modal__quick-icon svg {
	width: 17px;
	height: 17px;
}

.ku-search-modal__quick-label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ku-search-modal__quick-card--amber .ku-search-modal__quick-icon {
	background: linear-gradient(145deg, #fbbf24 0%, #f97316 100%);
}

.ku-search-modal__quick-card--blue .ku-search-modal__quick-icon {
	background: linear-gradient(145deg, #3b82f6 0%, #6366f1 100%);
}

.ku-search-modal__quick-card--rose .ku-search-modal__quick-icon {
	background: linear-gradient(145deg, #fb7185 0%, #f43f5e 100%);
}

.ku-search-modal__quick-card--violet .ku-search-modal__quick-icon {
	background: linear-gradient(145deg, #a855f7 0%, #7c3aed 100%);
}

.ku-search-modal__quick-card--teal .ku-search-modal__quick-icon {
	background: linear-gradient(145deg, #2dd4bf 0%, #0d9488 100%);
}

.ku-search-modal__quick-card--indigo .ku-search-modal__quick-icon {
	background: linear-gradient(145deg, #6366f1 0%, #4338ca 100%);
}

.ku-search-modal__quick-card--amber {
	border-color: rgba(253, 186, 116, 0.55);
	background: linear-gradient(145deg, #fffbeb 0%, #ffffff 100%);
}

.ku-search-modal__tags {
	display: none;
}

.ku-search-modal__tag {
	display: none;
}

.ku-search-modal__results {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ku-search-modal__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid rgba(226, 232, 240, 0.95);
	border-radius: 16px;
	background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
	text-decoration: none !important;
	color: inherit;
	box-shadow:
		0 4px 14px rgba(15, 23, 42, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.95);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.ku-search-modal__item:active {
	transform: scale(0.99);
	border-color: rgba(249, 115, 22, 0.35);
	box-shadow: 0 6px 18px rgba(249, 115, 22, 0.1);
}

.ku-search-modal__thumb {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	overflow: hidden;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	flex-shrink: 0;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ku-search-modal__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.ku-search-modal__thumb-ph {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(145deg, #f1f5f9, #e2e8f0);
}

.ku-search-modal__meta {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ku-search-modal__name {
	font-size: 12.5px;
	font-weight: 800;
	line-height: 1.5;
	color: #0f172a;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ku-search-modal__price-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
}

.ku-search-modal__arrow {
	width: 16px;
	height: 16px;
	color: #94a3b8;
	flex-shrink: 0;
	margin-right: auto;
}

.ku-search-modal__price {
	font-size: 12px;
	font-weight: 900;
	color: #c2410c;
}

.ku-search-modal__price small {
	font-size: 10px;
	font-weight: 700;
}

.ku-search-modal__price--old {
	font-size: 11px;
	font-weight: 700;
	color: #94a3b8;
	text-decoration: line-through;
}

.ku-search-modal__all-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 4px;
	padding: 12px 14px;
	border-radius: 14px;
	border: 1px solid rgba(249, 115, 22, 0.28);
	background: linear-gradient(145deg, #fff7ed 0%, #ffffff 100%);
	color: #c2410c !important;
	font-size: 12px;
	font-weight: 800;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(249, 115, 22, 0.1);
}

.ku-search-modal__loading,
.ku-search-modal__hint,
.ku-search-modal__empty {
	padding: 18px 8px;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: #64748b;
}

.ku-search-modal__empty .ku-search-modal__all-link {
	margin-top: 12px;
}

@media (min-width: 850px) {
	.ku-search-modal {
		display: none !important;
	}

	body.ku-mobile-header-active #header .ku-search-nav-item {
		display: none !important;
	}
}
