/* Search page upgrade — dark mode (particle field) only */

/* ===== idle: one big glowing pill ===== */
html.kx-dark .kx-find-idle .kx-find-bar {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px !important; border-radius: 999px !important;
  border: 1.6px dotted rgba(127,243,221,.75) !important; box-shadow: 0 0 34px rgba(0,201,167,.22), inset 0 0 24px rgba(0,201,167,.06) !important;
  animation: usBreath 4s ease-in-out infinite; }
html.kx-dark .kx-find-idle .kx-find-bar::before {
  content: ""; position: absolute; inset: -6px; border-radius: inherit; pointer-events: none; padding: 1.5px;
  background: conic-gradient(from var(--usA, 0deg), transparent 0 72%, #7ff3dd 82%, #a78bfa 90%, transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: usOrbit 4.5s linear infinite; filter: drop-shadow(0 0 6px #7ff3dd); }
@property --usA { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes usOrbit { to { --usA: 360deg; } }
@keyframes usBreath { 0%, 100% { box-shadow: 0 0 26px rgba(0,201,167,.18), inset 0 0 20px rgba(0,201,167,.05); } 50% { box-shadow: 0 0 46px rgba(0,201,167,.34), inset 0 0 28px rgba(0,201,167,.1); } }
html.kx-dark .kx-find-idle .kx-find-bar:focus-within { animation: none; box-shadow: 0 0 0 4px rgba(127,243,221,.14), 0 0 50px rgba(0,201,167,.4) !important; }
html.kx-dark .kx-find-bar .kx-find-icon { font-size: 22px; color: #7ff3dd; animation: usPulse 2.4s ease-in-out infinite; }
@keyframes usPulse { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.18); opacity: 1; text-shadow: 0 0 12px #7ff3dd; } }
html.kx-dark .kx-find-bar .form-input { border: 0 !important; box-shadow: none !important; background: transparent !important; font-size: 17px !important; padding: 10px 2px !important; min-width: 0; flex: 1; }
html.kx-dark .kx-find-bar .kx-search-go { width: 48px; height: 48px; min-height: 48px !important; padding: 0 !important; border-radius: 50% !important; flex: none; justify-content: center;
  box-shadow: 0 0 22px rgba(127,243,221,.45) !important; transition: transform .25s cubic-bezier(.2,1.5,.4,1) !important; }
html.kx-dark .kx-find-bar .kx-search-go span { display: none; }
html.kx-dark .kx-find-bar .kx-search-go i { font-size: 22px; font-weight: 800; }
html.kx-dark .kx-find-bar .kx-search-go:hover { transform: scale(1.08) rotate(-8deg); }
html.kx-dark .kx-find-bar .kx-search-go:active { transform: scale(.92); }
html.kx-dark .kx-find-hint { text-align: center; margin-top: 16px; color: #8fa6a0; font-size: 13.5px; min-height: 1.4em; }
html.kx-dark .kx-find-hint b { color: #7ff3dd; font-weight: 600; }
html.kx-dark .kx-find-hint i { display: inline-block; width: 2px; height: 1em; background: #7ff3dd; vertical-align: -2px; margin-left: 2px; animation: usCaret 1s steps(1) infinite; }
@keyframes usCaret { 50% { opacity: 0; } }

/* ===== results: summary strip on top ===== */
html.kx-dark .kx-sum { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 14px; border-radius: 20px; cursor: pointer;
  border: 1.6px dotted rgba(127,243,221,.7); box-shadow: 0 0 22px rgba(0,201,167,.18); animation: usIn .7s cubic-bezier(.22,1,.36,1) both; }
html.kx-dark .kx-sum-ring { position: relative; width: 58px; height: 58px; flex: none; border-radius: 50%; display: grid; place-items: center; }
html.kx-dark .kx-sum-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px dotted rgba(127,243,221,.3); }
html.kx-dark .kx-sum-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px dotted var(--c, #7ff3dd); filter: drop-shadow(0 0 5px var(--c, #7ff3dd));
  -webkit-mask: conic-gradient(#000 0 calc(var(--p) * 1%), transparent 0); mask: conic-gradient(#000 0 calc(var(--p) * 1%), transparent 0); }
html.kx-dark .kx-sum-ring b { font: 800 19px 'JetBrains Mono', monospace; color: #fff; }
html.kx-dark .kx-sum-t { min-width: 0; flex: 1; }
html.kx-dark .kx-sum-t small { display: block; font: 700 10.5px 'JetBrains Mono', monospace; letter-spacing: .16em; color: #7ff3dd; }
html.kx-dark .kx-sum-t b { display: block; font-size: 18px; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.kx-dark .kx-sum-t span { color: #9fb8b2; font-size: 13px; }
html.kx-dark .kx-sum > i { font-style: normal; color: #7ff3dd; font-size: 22px; }
html.kx-dark .kx-sum.is-good { --c: #3cf08f; } html.kx-dark .kx-sum.is-ok { --c: #ffd257; } html.kx-dark .kx-sum.is-weak { --c: #ff6b81; }

/* filters: one scrollable row */
html.kx-dark .kx-find .kx-tools { display: flex !important; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
html.kx-dark .kx-find .kx-tools::-webkit-scrollbar { display: none; }
html.kx-dark .kx-find .kx-result-filters { display: flex; gap: 8px; flex: none; }
html.kx-dark .kx-find .kx-result-filters button { white-space: nowrap; border-radius: 999px !important; border: 1.6px dotted rgba(127,243,221,.45) !important; background: transparent !important; color: #cfe7e1; padding: 8px 14px; transition: all .25s; }
html.kx-dark .kx-find .kx-result-filters button.active { border-style: solid !important; border-color: #7ff3dd !important; color: #04140f; background: linear-gradient(135deg, #7ff3dd, #4fd6e8) !important; box-shadow: 0 0 18px rgba(127,243,221,.4); }
html.kx-dark .kx-find .kx-tools select { flex: none; width: auto !important; border-radius: 999px !important; padding: 8px 34px 8px 14px !important; }

/* ===== product cards ===== */
html.kx-dark .kx-find .kx-grid { gap: 12px !important; }
html.kx-dark .kx-find .kx-pcard { position: relative; padding: 8px !important; border-radius: 20px !important; overflow: hidden;
  animation: usCard .65s cubic-bezier(.22,1,.36,1) both !important; animation-delay: calc(var(--n, 0) * 55ms) !important; transition: transform .25s cubic-bezier(.2,1.3,.3,1), box-shadow .25s !important; }
@keyframes usCard { from { opacity: 0; transform: translateY(22px) scale(.92); clip-path: inset(50% 0 50% 0 round 20px); } 60% { clip-path: inset(0 0 0 0 round 20px); } to { opacity: 1; transform: none; clip-path: inset(-20px); } }
html.kx-dark .kx-find .kx-pcard:hover { transform: translateY(-4px); box-shadow: 0 0 30px rgba(127,243,221,.3) !important; }
html.kx-dark .kx-find .kx-pcard:active { transform: scale(.97); }
html.kx-dark .kx-find .kx-pimg { border-radius: 14px !important; overflow: hidden; background: #fff !important; }
html.kx-dark .kx-find .kx-pimg img { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
html.kx-dark .kx-find .kx-pcard:hover .kx-pimg img { transform: scale(1.07); }
/* light sweep across each card photo, staggered */
html.kx-dark .kx-find .kx-pimg::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%);
  transform: translateX(-120%); animation: usPhoto 5.5s ease-in-out infinite; animation-delay: calc(var(--n, 0) * .35s + 1s); }
html.kx-dark .kx-find .kx-pimg { position: relative; }
@keyframes usPhoto { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
/* score: glowing dotted badge */
html.kx-dark .kx-find .kx-card-score { position: absolute; top: 14px; right: 14px; width: 50px; height: 50px; border-radius: 50% !important; display: grid; place-content: center; text-align: center;
  background: rgba(3,10,9,.78) !important; border: 1.6px dotted #7ff3dd !important; box-shadow: 0 0 14px rgba(127,243,221,.45); backdrop-filter: blur(6px); z-index: 2; }
html.kx-dark .kx-find .kx-card-score b { font: 800 17px/1 'JetBrains Mono', monospace; color: #fff; }
html.kx-dark .kx-find .kx-card-score small { font-size: 7.5px; letter-spacing: .06em; color: #9fe9da; }
html.kx-dark .kx-find .kx-ptitle { font-size: 14px !important; line-height: 1.3; margin: 10px 4px 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html.kx-dark .kx-find .kx-pmeta { padding: 0 4px; font-size: 13px; }
html.kx-dark .kx-find .kx-price { font: 800 17px 'JetBrains Mono', monospace; color: #7ff3dd !important; }
html.kx-dark .kx-find .kx-card-why { display: none !important; }
html.kx-dark .kx-find .kx-beat { border-radius: 999px !important; background: rgba(60,240,143,.92) !important; color: #03140f !important; font-weight: 700; box-shadow: 0 0 14px rgba(60,240,143,.6); animation: usPop .6s cubic-bezier(.2,1.6,.3,1) both .5s; }
@keyframes usPop { from { transform: scale(0); } to { transform: none; } }
html.kx-dark .kx-find .kx-select-card { margin-top: 8px; width: 100%; border-radius: 12px !important; border: 1.6px dotted rgba(127,243,221,.4) !important; background: transparent !important; color: #9fe9da !important; font-size: 13px; padding: 8px; }
html.kx-dark .kx-find .kx-pcard.is-selected { box-shadow: 0 0 0 2px #7ff3dd, 0 0 30px rgba(127,243,221,.45) !important; }
html.kx-dark .kx-find .kx-pcard.is-selected .kx-select-card { background: rgba(127,243,221,.16) !important; color: #fff !important; border-style: solid !important; }

/* new search button */
html.kx-dark .kx-find-reset { border-radius: 999px !important; border: 1.6px dotted rgba(127,243,221,.6) !important; background: transparent !important; color: #eafff9 !important; padding: 10px 18px; font-weight: 600; animation: usIn .6s both; }

@keyframes usIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* desktop: wider grid, centred bar */
@media (min-width: 900px) {
  html.kx-dark .kx-find-idle .kx-find-bar { max-width: 640px; width: 100%; margin: 0 auto !important; }
  html.kx-dark .kx-find .kx-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)) !important; }
}

@media (prefers-reduced-motion: reduce) {
  html.kx-dark .kx-find *, html.kx-dark .kx-find *::before, html.kx-dark .kx-find *::after { animation: none !important; }
}
html.kx-dark .kx-find-hint { display: block; width: 100%; background: none !important; border: 0 !important; box-shadow: none !important; cursor: pointer; }
.kx-find:not(.kx-find-idle) .kx-find-hint { display: none !important; }
html:not(.kx-dark) .kx-find-hint { background: none; border: 0; margin-top: 12px; color: var(--text-muted); width: 100%; }
html.kx-dark .kx-sum { width: 100%; text-align: left; background: transparent; color: inherit; font: inherit; }
/* order: summary → filters → products → details */
html.kx-dark #kx-amz > .kx-sum { order: -3; }
html.kx-dark .kx-find .kx-ptitle { display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 2.6em; }
html.kx-dark .kx-find .kx-select-card { box-sizing: border-box; width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
html.kx-dark .kx-find .kx-pcard { box-sizing: border-box; }
html.kx-dark .kx-find .kx-pcard .kx-ptitle { min-height: 0 !important; padding: 0 !important; box-sizing: content-box !important; height: 2.6em; max-height: 2.6em !important; line-height: 1.3 !important; }
