/* Smart Search dropdown. Logical properties keep it RTL-safe. */
.ss-dropdown {
	--ss-bg: #fff;
	--ss-fg: #1b1b1f;
	--ss-muted: #6b6b76;
	--ss-line: #e6e6ea;
	--ss-hover: #f4f4f7;
	--ss-accent: #111;
	--ss-sale: #c8102e;
	--ss-mark: #fff1b8;
	position: absolute;
	z-index: 100000;
	box-sizing: border-box;
	max-height: min(75vh, 640px);
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--ss-bg);
	color: var(--ss-fg);
	border: 1px solid var(--ss-line);
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	text-align: start;
}
.ss-dropdown[hidden] { display: none; }
.ss-dropdown *, .ss-dropdown *::before, .ss-dropdown *::after { box-sizing: border-box; }
.ss-notice { padding: 10px 14px; background: var(--ss-hover); border-block-end: 1px solid var(--ss-line); font-size: 13px; }
.ss-notice a { color: inherit; text-decoration: underline; white-space: nowrap; }
.ss-group + .ss-group, .ss-footer { border-block-start: 1px solid var(--ss-line); }
.ss-heading { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ss-muted); }
.ss-clear { all: unset; cursor: pointer; font-size: 11px; text-transform: none; letter-spacing: 0; text-decoration: underline; }
.ss-item { display: flex; align-items: center; gap: 12px; padding: 8px 14px; color: inherit; text-decoration: none; cursor: pointer; }
.ss-item.is-active, .ss-item:hover { background: var(--ss-hover); }
.ss-tag, .ss-term { justify-content: space-between; }
.ss-count { color: var(--ss-muted); font-size: 12px; }
.ss-thumb { flex: none; width: 48px; height: 48px; object-fit: contain; border-radius: 4px; background: #f6f6f6; }
.ss-body { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.ss-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 500; }
.ss-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.ss-price { font-weight: 600; }
.ss-regular { color: var(--ss-muted); }
.ss-badge { padding: 1px 6px; border-radius: 3px; font-size: 11px; font-weight: 600; }
.ss-sale { background: var(--ss-sale); color: #fff; }
.ss-stock, .ss-backorder { background: var(--ss-hover); color: var(--ss-muted); border: 1px solid var(--ss-line); }
.ss-product.is-out .ss-thumb, .ss-product.is-out .ss-title { opacity: .55; }
/* Themes often style <mark> with padding/margin, which splits a highlighted word from its rest. */
.ss-dropdown mark.ss-hl, mark.ss-hl { display: inline; margin: 0 !important; padding: 0 !important; border: 0 !important; background: var(--ss-mark); color: inherit; border-radius: 0; text-decoration: none; font: inherit; letter-spacing: inherit; box-shadow: none; }
.ss-footer .ss-all { justify-content: center; padding-block: 12px; font-weight: 600; color: var(--ss-accent); }
.ss-empty { padding: 14px; color: var(--ss-muted); text-align: center; }
.ss-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 600px) {
	.ss-item { padding-block: 12px; }
	.ss-dropdown { max-height: 70vh; }
}
@media (prefers-reduced-motion: no-preference) {
	.ss-dropdown:not([hidden]) { animation: ss-in .12s ease-out; }
	@keyframes ss-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}

/* [smart_search] shortcode / block form */
.smart-search-form { display: flex; gap: 6px; max-width: 520px; }
.smart-search-input { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid #c9c9d1; border-radius: 6px; font: inherit; }
.smart-search-submit { padding: 10px 16px; border: 0; border-radius: 6px; background: #111; color: #fff; font: inherit; cursor: pointer; }

.smartsearch-notice { margin: 0 0 16px; }
.smartsearch-notice a { text-decoration: underline; }

/* Phrase suggestions: bold the matched part, no highlighter. */
.ss-phrase mark.ss-hl { background: none; font-weight: 700; text-decoration: none; padding: 0 !important; margin: 0 !important; }
.ss-dropdown a, .ss-dropdown a:hover { text-decoration: none; }
