/* PT Live Search за WooCommerce - стилови за резултатите (theme-agnostic) */

:root {
	--pt-ls-accent: #7f54b3;
}

/*
 * Позицијата (position/top/left/width/max-height) се поставува преку JS,
 * во однос на viewport-от (елементот е закачен директно на <body>) - за да
 * не биде исечен или погрешно поместен од "overflow: hidden" / CSS
 * "transform" на мобилни/off-canvas менија. Тука се само визуелните стилови.
 */
.pt-ls-dropdown {
	position: fixed;
	z-index: 999999;
	background: #ffffff;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.12 );
	overflow-y: auto;
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
	box-sizing: border-box;
}

.pt-ls-dropdown * {
	box-sizing: border-box;
}

.pt-ls-loading,
.pt-ls-empty {
	padding: 14px 16px;
	color: #666;
}

.pt-ls-section-label {
	padding: 10px 16px 4px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #999;
}

.pt-ls-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pt-ls-item a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	text-decoration: none;
	color: #222;
}

.pt-ls-item a:hover,
.pt-ls-item.pt-ls-active a {
	background: rgba( 127, 84, 179, 0.08 );
	background: color-mix( in srgb, var( --pt-ls-accent ) 8%, white );
}

.pt-ls-cat-item a {
	justify-content: space-between;
}

.pt-ls-cat-name {
	font-weight: 500;
	color: #222;
}

.pt-ls-cat-path {
	margin-left: 6px;
	font-size: 12px;
	color: #999;
	flex: 1;
}

.pt-ls-cat-count {
	font-size: 12px;
	color: #999;
}

.pt-ls-thumb {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
	background: #f3f3f3;
}

.pt-ls-info {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.pt-ls-title {
	color: #222;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.pt-ls-sku {
	font-size: 12px;
	color: #999;
}

.pt-ls-stock {
	font-size: 12px;
	color: #c0392b;
}

.pt-ls-price {
	flex-shrink: 0;
	font-weight: 600;
	color: var( --pt-ls-accent );
	white-space: nowrap;
}

.pt-ls-price bdi,
.pt-ls-price ins {
	text-decoration: none;
}

.pt-ls-view-all {
	display: block;
	text-align: center;
	padding: 10px 16px;
	border-top: 1px solid #eee;
	color: var( --pt-ls-accent );
	font-weight: 600;
	text-decoration: none;
}

.pt-ls-view-all:hover {
	text-decoration: underline;
}

.pt-ls-item.pt-ls-oos .pt-ls-thumb {
	opacity: 0.5;
}

/* Shortcode форма (пример стил, лесно се override-ира од темата) */
.pt-ls-form {
	position: relative;
	width: 100%;
	max-width: 480px;
}

.pt-ls-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 16px; /* 16px+ спречува iOS Safari автоматски да зумира при фокус */
}
