/* DM Toolkit - smart search box ([dm_search], "DM Smart Search" widget) */
.dm-srch, .dm-srch *, .dm-srch-dym, .dm-srch-dym * { box-sizing: border-box; }
.dm-srch { --s-blue: #2563eb; --s-ink: #111827; --s-muted: #6b7280; --s-line: #e5e7eb; --s-soft: #f8fafc;
	position: relative; width: 100%; max-width: 720px; margin: 0 auto; font-size: 15px; color: var(--s-ink); }
.dm-srch-box { position: relative; display: flex; align-items: center; height: 48px; background: #fff; border: 1.5px solid #d1d5db; border-radius: 999px;
	box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: border-color .15s, box-shadow .15s; }
.dm-srch-box:focus-within { border-color: var(--s-blue); box-shadow: 0 0 0 4px rgba(37,99,235,.14); }
.dm-srch-glass { flex: 0 0 20px; width: 20px; height: 20px; margin-left: 16px; fill: none; stroke: #9ca3af; stroke-width: 2.2; stroke-linecap: round; }
.dm-srch-box:focus-within .dm-srch-glass { stroke: var(--s-blue); }
input.dm-srch-input { flex: 1; min-width: 0; height: 100%; margin: 0; padding: 0 8px 0 10px; border: 0 !important; outline: 0; background: transparent !important;
	box-shadow: none !important; font: inherit; font-size: 16px; color: var(--s-ink); -webkit-appearance: none; appearance: none; }
input.dm-srch-input::placeholder { color: #9ca3af; }
input.dm-srch-input::-webkit-search-cancel-button { display: none; }
.dm-srch-clear { flex: 0 0 28px; width: 28px; height: 28px; margin-right: 4px; padding: 0; border: 0; border-radius: 50%; background: #f3f4f6; color: #4b5563;
	font-size: 18px; line-height: 1; cursor: pointer; }
.dm-srch-clear:hover { background: #e5e7eb; }
.dm-srch-go { flex: 0 0 auto; height: 38px; margin-right: 4px; padding: 0 20px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #2563eb, #1d4ed8);
	color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.dm-srch-go:hover { background: linear-gradient(135deg, #1d4ed8, #1e40af); }
.dm-srch.is-loading .dm-srch-glass { animation: dm-srch-spin 1s linear infinite; }
@keyframes dm-srch-spin { to { transform: rotate(360deg); } }
.dm-srch.is-large .dm-srch-box { height: 58px; }
.dm-srch.is-large input.dm-srch-input { font-size: 17px; }
.dm-srch.is-large .dm-srch-go { height: 46px; padding: 0 26px; }

/* Suggestions */
.dm-srch-pop { position: absolute; z-index: 9999; left: 0; right: 0; top: calc(100% + 8px); max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
	padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px rgba(17,24,39,.06), 0 16px 40px rgba(17,24,39,.16); text-align: left; }
.dm-srch-pop[hidden] { display: none; }
.dm-srch-sec + .dm-srch-sec { margin-top: 4px; padding-top: 6px; border-top: 1px solid #f1f2f4; }
.dm-srch-h { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
	text-transform: uppercase; color: var(--s-muted); }
.dm-srch-forget { padding: 0; border: 0; background: none; color: var(--s-blue); font: inherit; font-size: 11px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.dm-srch-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--s-ink) !important; text-decoration: none !important; }
.dm-srch-row:hover, .dm-srch-row.is-active, .dm-srch-chip.is-active, .dm-srch-all.is-active { background: #eff6ff; }
.dm-srch-row img { flex: 0 0 auto; width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px var(--s-line); }
.dm-srch-row.is-deal img { width: 44px; height: 44px; }
.dm-srch-ico { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #eef2ff center / 18px no-repeat; }
.dm-srch-ico.is-cat { background-color: #eff6ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E"); }
.dm-srch-ico.is-brand { background-color: #fdf4ff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a21caf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.6 13.4 13.4 20.6a2 2 0 0 1-2.8 0L2 12V2h10l8.6 8.6a2 2 0 0 1 0 2.8z'/%3E%3Ccircle cx='7' cy='7' r='1.5'/%3E%3C/svg%3E"); }
.dm-srch-ico.is-deal { background-color: #fff7ed; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ea580c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.7 13.4a2 2 0 0 0 2 1.6h9.7a2 2 0 0 0 2-1.6L23 6H6'/%3E%3C/svg%3E"); }
.dm-srch-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.dm-srch-name { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-srch-row.is-deal .dm-srch-name { font-weight: 500; font-size: 14px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dm-srch-name mark { background: none; color: var(--s-blue); font-weight: 800; padding: 0; }
.dm-srch-meta { font-size: 12.5px; color: var(--s-muted); }
.dm-srch-meta b { color: var(--s-ink); font-size: 14px; }
.dm-srch-meta s { color: #9ca3af; }
.dm-srch-meta em { font-style: normal; font-weight: 700; color: #15803d; }
.dm-srch-go-ico { color: #9ca3af; font-size: 22px; line-height: 1; }
.dm-srch-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px 8px; }
.dm-srch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--s-soft); box-shadow: inset 0 0 0 1px var(--s-line);
	color: var(--s-ink) !important; font-size: 13.5px; font-weight: 600; text-decoration: none !important; }
.dm-srch-chip:hover { background: #eff6ff; box-shadow: inset 0 0 0 1px #bfdbfe; }
.dm-srch-chip.is-recent::before { content: "↺"; color: var(--s-muted); font-weight: 400; }
.dm-srch-chip.is-pop::before { content: "↗"; color: #ea580c; font-weight: 700; }
.dm-srch-all { display: block; margin-top: 6px; padding: 11px 12px; border-radius: 10px; background: var(--s-soft); color: var(--s-blue) !important; font-size: 14px;
	font-weight: 600; text-decoration: none !important; }
.dm-srch-all:hover { background: #eff6ff; }
.dm-srch-none { margin: 4px 10px 8px; color: var(--s-muted); font-size: 14px; }

/* Optional bar under the header */
.dm-srch-bar { padding: 12px 16px; background: linear-gradient(180deg, #f8fafc, #fff); border-bottom: 1px solid #eef0f3; }
.dm-srch-bar .wrap { max-width: 760px; margin: 0 auto; }

/* Search results page: "Did you mean" */
.dm-srch-dym { margin: 0 0 18px; padding: 14px 16px; border-radius: 12px; background: #f8fafc; box-shadow: inset 0 0 0 1px #e5e7eb; }
.dm-srch-dym p { margin: 0 0 8px; font-size: 15px; }
.dm-srch-dym p span { color: #6b7280; }
.dm-srch-dym-h { font-size: 12px !important; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; }
.dm-srch-dym ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dm-srch-dym li { margin: 0; }
.dm-srch-dym a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #e5e7eb;
	color: #111827 !important; font-weight: 600; text-decoration: none !important; }
.dm-srch-dym a:hover { box-shadow: inset 0 0 0 1px #93c5fd; background: #eff6ff; }
.dm-srch-dym .dm-srch-ico { flex-basis: 26px; width: 26px; height: 26px; border-radius: 50%; background-size: 14px; }
.dm-srch-dym small { color: #6b7280; font-weight: 500; }

@media (max-width: 480px) {
	.dm-srch-go { padding: 0 14px; }
	.dm-srch-pop { max-height: 60vh; }
}
@media (prefers-reduced-motion: reduce) { .dm-srch.is-loading .dm-srch-glass { animation: none; } }

/* ── 2.9: filter chips, trending, full screen, menu icon ──────────────── */
.dm-srch-fbar { display: flex; gap: 6px; padding: 4px 6px 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-bottom: 1px solid #f1f2f4; margin-bottom: 4px; }
.dm-srch-fbar::-webkit-scrollbar { display: none; }
.dm-srch-f { flex: 0 0 auto; padding: 5px 11px; border: 0; border-radius: 999px; background: #f3f4f6; color: #374151; font: inherit; font-size: 13px; font-weight: 600;
	line-height: 1.3; white-space: nowrap; cursor: pointer; box-shadow: inset 0 0 0 1px #e5e7eb; }
.dm-srch-f:hover { background: #eff6ff; box-shadow: inset 0 0 0 1px #bfdbfe; }
.dm-srch-f.is-on { background: #2563eb; color: #fff; box-shadow: none; }
.dm-srch-f.is-typed { cursor: default; background: #1d4ed8; }
.dm-srch-chip.is-trend::before { content: "🔥"; font-size: 12px; }
.dm-srch-hot { font-style: normal; }
.dm-srch-back { display: none; flex: 0 0 36px; width: 36px; height: 36px; margin-left: 6px; padding: 0; border: 0; border-radius: 50%; background: transparent;
	color: #111827; font-size: 30px; line-height: 1; cursor: pointer; }

/* Full screen: phones (tap on any box) and the 🔍 menu search */
html.dm-srch-lock, html.dm-srch-lock body { overflow: hidden; }
.dm-srch.is-full { position: fixed; z-index: 100000; inset: 0; max-width: none; margin: 0; padding: 10px 10px 0; background: #fff; display: flex; flex-direction: column; }
.dm-srch.is-full .dm-srch-back { display: block; }
.dm-srch.is-full .dm-srch-glass { display: none; }
.dm-srch.is-full .dm-srch-pop { position: static; flex: 1; max-height: none; margin-top: 8px; padding: 4px 0 24px; border-radius: 0; box-shadow: none; overflow-y: auto; }
.dm-srch.is-full .dm-srch-pop[hidden] { display: block; visibility: hidden; }
@media (min-width: 641px) {
	/* Desktop: the menu search opens as a panel near the top over a dark backdrop. */
	.dm-srch-overlay { position: fixed; z-index: 99999; inset: 0; background: rgba(15,23,42,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
	.dm-srch-overlay[hidden] { display: none; }
	.dm-srch-overlay .dm-srch.is-full { inset: 8vh auto auto 50%; transform: translateX(-50%); width: min(760px, calc(100vw - 32px)); max-height: 84vh;
		padding: 14px; border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.3); }
	.dm-srch-overlay .dm-srch.is-full .dm-srch-pop { max-height: calc(84vh - 90px); }
}
.dm-srch-overlay[hidden] { display: none; }

/* 🔍 button in the menu bar (or floating when there is no menu) */
.dm-srch-menu-li { display: flex !important; align-items: center; margin-left: auto !important; }
.dm-srch-menu-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; margin: 0 8px; padding: 0 12px; border: 0; border-radius: 999px;
	background: rgba(255,255,255,.16); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.dm-srch-menu-btn:hover { background: rgba(255,255,255,.28); }
.dm-srch-menu-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.dm-srch-menu-btn.is-floating { position: fixed; z-index: 9990; right: 16px; bottom: 84px; width: 52px; height: 52px; margin: 0; padding: 0; justify-content: center;
	background: #2563eb; box-shadow: 0 8px 20px rgba(37,99,235,.35); }
.dm-srch-menu-btn.is-floating span { display: none; }
@media (max-width: 640px) { .dm-srch-menu-btn span { display: none; } .dm-srch-menu-btn { padding: 0 10px; } }

/* Results page: filters in use / closest matches */
.dm-srch-filters-on { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dm-srch-filters-on li { margin: 0; }
.dm-srch-filters-on a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #2563eb; color: #fff !important;
	font-weight: 700; font-size: 14px; text-decoration: none !important; }
.dm-srch-filters-on a span { opacity: .8; }

/* Trending: widget / [dm_trending] */
.dm-trending ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dm-trending li { margin: 0; }
.dm-trending a { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; background: #fff7ed; box-shadow: inset 0 0 0 1px #fed7aa;
	color: #9a3412 !important; font-weight: 600; font-size: 14px; text-decoration: none !important; }
.dm-trending a::before { content: "🔥"; font-size: 12px; }
.dm-trending a:hover { background: #ffedd5; }
@media (prefers-reduced-motion: reduce) { .dm-srch-f, .dm-srch-menu-btn { transition: none; } }
