/* Premium Product Search — styles (v1.1.0 — clean rectangle, premium finish) */

.pps-wrapper {
	position: relative;
	width: 100%;
	max-width: 560px;
	min-width: 0;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	box-sizing: border-box;
	flex: 1 1 auto;
}

.pps-wrapper * {
	box-sizing: border-box;
}

.pps-wrapper a,
.pps-wrapper a:hover,
.pps-wrapper a:focus,
.pps-wrapper a:active,
.pps-wrapper a:visited {
	text-decoration: none !important;
}

/* Kill any outline/ring the theme's global input styling tries to add —
   this is what was producing the pink pill around the box. */
.pps-wrapper,
.pps-wrapper *,
.pps-wrapper *:focus,
.pps-wrapper *:focus-visible,
.pps-wrapper *:active {
	outline: none !important;
	box-shadow: none !important;
}

.pps-search-box {
	position: relative;
	display: flex;
	align-items: center;
	background: #ffffff !important;
	border: 1.5px solid #e2e2e7 !important;
	border-radius: 10px !important;
	padding: 0 42px;
	height: 48px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	width: 100%;
	box-shadow: 0 1px 2px rgba(20, 20, 30, 0.04) !important;
}

.pps-search-box:hover {
	border-color: #d0d0d8 !important;
}

.pps-search-box:focus-within {
	border-color: #d6006e !important;
	box-shadow: 0 0 0 3px rgba(214, 0, 110, 0.10) !important;
}

.pps-icon-search {
	position: absolute;
	left: 16px;
	color: #9a9aa2;
	pointer-events: none;
	transition: color 0.15s ease;
}

.pps-search-box:focus-within .pps-icon-search {
	color: #d6006e;
}

.pps-input {
	width: 100%;
	height: 100%;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	background: transparent !important;
	border-radius: 0 !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	font-size: 15px;
	color: #1f1f23;
	padding: 0;
}

.pps-input::placeholder {
	color: #a5a5ad;
}

.pps-clear {
	all: unset;
	box-sizing: border-box !important;
	position: absolute !important;
	right: 12px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	width: 22px !important;
	height: 22px !important;
	min-width: 22px !important;
	max-width: 22px !important;
	min-height: 22px !important;
	max-height: 22px !important;
	flex: 0 0 22px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	background: #f1f1f3 !important;
	color: #6b6b76 !important;
	border-radius: 50% !important;
	line-height: 0 !important;
	cursor: pointer !important;
	display: none;
	align-items: center !important;
	justify-content: center !important;
	transition: background 0.15s ease;
}

.pps-clear svg {
	display: block;
	pointer-events: none;
}

.pps-clear:hover {
	background: #e4e4e7 !important;
}

.pps-wrapper.has-text .pps-clear {
	display: flex;
}

.pps-spinner {
	position: absolute;
	right: 12px;
	width: 18px;
	height: 18px;
	border: 2px solid #e4e4e7;
	border-top-color: #d6006e;
	border-radius: 50%;
	display: none;
	animation: pps-spin 0.7s linear infinite;
}

.pps-wrapper.is-loading .pps-spinner {
	display: block;
}

.pps-wrapper.is-loading .pps-clear {
	display: none;
}

@keyframes pps-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Dropdown — premium elevated card */
.pps-dropdown {
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	right: 0;
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #ececef;
	box-shadow: 0 12px 32px rgba(20, 20, 30, 0.10), 0 2px 8px rgba(20, 20, 30, 0.04);
	max-height: 420px;
	overflow-y: auto;
	z-index: 9999;
	display: none;
	padding: 10px 0;
}

.pps-wrapper.is-open .pps-dropdown {
	display: block;
}

.pps-section-title {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #a5a5ad;
	padding: 10px 18px 8px;
}

.pps-cat-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 14px 10px;
}

.pps-cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: #fdf1f7;
	color: #d6006e;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 999px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.pps-cat-chip:hover {
	background: #fbe2ee;
}

.pps-cat-count {
	color: #d6006e;
	opacity: 0.6;
	font-weight: 500;
}

.pps-divider {
	height: 1px;
	background: #f0f0f2;
	margin: 4px 0;
}

.pps-product-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 18px;
	text-decoration: none;
	color: inherit;
	transition: background 0.12s ease;
}

.pps-product-item:hover,
.pps-product-item.is-active {
	background: #f7f7f9;
}

.pps-product-thumb {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	object-fit: cover;
	background: #f5f5f7;
	border: 1px solid #f0f0f2;
}

.pps-product-info {
	flex: 1 1 auto;
	min-width: 0;
}

.pps-product-title {
	font-size: 14px;
	font-weight: 600;
	color: #1f1f23;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	display: block;
}

.pps-product-cat {
	display: block;
	font-size: 12px;
	color: #9a9aa2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-top: 2px;
}

.pps-arrow {
	flex: 0 0 auto;
	color: #c7c7cf;
}

.pps-view-all {
	display: block;
	text-align: center;
	padding: 12px 18px 6px;
	font-size: 13px;
	font-weight: 700;
	color: #d6006e;
	text-decoration: none;
}

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

.pps-empty-state {
	padding: 28px 18px;
	text-align: center;
	color: #9a9aa2;
	font-size: 14px;
}

/* Scrollbar polish */
.pps-dropdown::-webkit-scrollbar {
	width: 6px;
}

.pps-dropdown::-webkit-scrollbar-thumb {
	background: #e4e4e7;
	border-radius: 999px;
}

/* Responsive: tablet — same visual style as desktop, just fluid width */
@media (max-width: 768px) {
	.pps-wrapper {
		max-width: 100%;
	}

	.pps-dropdown {
		max-height: 60vh;
	}
}

/* Responsive: mobile — same look as desktop, scaled down */
@media (max-width: 480px) {
	.pps-search-box {
		height: 44px;
		padding: 0 38px;
		border-radius: 10px !important;
	}

	.pps-input {
		font-size: 14px;
	}

	.pps-icon-search {
		left: 14px;
		width: 16px;
		height: 16px;
	}

	.pps-clear {
		right: 10px !important;
		width: 20px !important;
		height: 20px !important;
		min-width: 20px !important;
		max-width: 20px !important;
		min-height: 20px !important;
		max-height: 20px !important;
		flex: 0 0 20px !important;
	}

	.pps-clear svg {
		width: 10px;
		height: 10px;
	}

	.pps-spinner {
		right: 10px;
	}

	.pps-dropdown {
		left: 0;
		right: 0;
		border-radius: 10px;
	}

	.pps-product-thumb {
		width: 38px;
		height: 38px;
	}

	.pps-product-title {
		font-size: 13px;
	}

	.pps-section-title {
		padding: 8px 14px 4px;
	}
}

/* Responsive: very narrow header/widget slots */
@media (max-width: 340px) {
	.pps-search-box {
		padding: 0 32px;
	}

	.pps-icon-search {
		left: 10px;
		width: 15px;
		height: 15px;
	}

	.pps-clear {
		right: 8px !important;
		width: 18px !important;
		height: 18px !important;
		min-width: 18px !important;
		max-width: 18px !important;
		min-height: 18px !important;
		max-height: 18px !important;
		flex: 0 0 18px !important;
	}

	.pps-clear svg {
		width: 9px;
		height: 9px;
	}

	.pps-spinner {
		right: 8px;
	}

	.pps-input {
		font-size: 13px;
	}
}
