/* Keep normal GET search without JavaScript; enhance only after initialization. */
.ke-shop-search-only { min-height:78px; width:100%; max-width:var(--ke-beauty-content-max); margin-inline:auto; padding-inline:var(--ke-beauty-gutter); }
.ke-shop-search-widget { position:relative; width:min(360px,100%); z-index:90; /* Below the shared sticky header (100), above shop content. */ }
.ke-shop-search-widget .ke-shop-search { width:100%; min-width:0; }
.ke-shop-search-widget .ke-shop-search input { min-height:54px; padding:15px 58px 15px 20px; border-radius:28px; background:var(--wp--preset--color--surface); color:var(--wp--preset--color--ink); border-color:var(--wp--preset--color--line); font-family:var(--wp--preset--font-family--body); font-size:13px; }
.ke-shop-search-widget .ke-shop-search input::placeholder { color:var(--wp--preset--color--muted); opacity:1; }
.ke-shop-search-widget .ke-shop-search button { width:52px; height:52px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--wp--preset--color--champagne); }
.ke-shop-search-enhanced.is-floating { position:fixed; top:var(--ke-search-top,140px); right:var(--ke-beauty-content-inset); width:min(360px,calc(100% - 2 * var(--ke-beauty-gutter))); filter:drop-shadow(0 5px 12px rgb(0 0 0 / 14%)); transition:width 230ms ease; }
.ke-shop-search-enhanced.is-collapsed { width:54px; }
.ke-shop-search-enhanced.is-collapsed .ke-shop-search { min-height:54px; border-radius:50%; background:var(--wp--preset--color--surface); border:1px solid var(--wp--preset--color--line); }
.ke-shop-search-widget [hidden] { display:none!important; }
.ke-shop-suggestions { position:absolute; top:calc(100% + 8px); right:0; width:100%; max-height:min(460px,calc(100dvh - var(--ke-search-top,140px) - 80px)); overflow:auto; overscroll-behavior:contain; padding:14px; border:1px solid var(--wp--preset--color--line); border-radius:16px; background:var(--wp--preset--color--surface); color:var(--wp--preset--color--ink); box-shadow:0 12px 28px rgb(0 0 0 / 12%); font:13px/1.5 var(--wp--preset--font-family--body); box-sizing:border-box; }
.ke-shop-search-status { margin:0 0 9px; color:var(--wp--preset--color--muted); }
.ke-shop-suggestions ul { padding:0; margin:0; list-style:none; }
.ke-shop-suggestions li a { display:flex; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--wp--preset--color--line); text-decoration:none; color:inherit; }
.ke-shop-search-thumb { width:48px; height:48px; flex:none; display:grid; place-items:center; color:var(--wp--preset--color--muted); background:var(--wp--preset--color--canvas); border-radius:6px; overflow:hidden; }
.ke-shop-search-thumb img { width:100%; height:100%; object-fit:contain; }
.ke-shop-search-copy { min-width:0; overflow-wrap:anywhere; }
.ke-shop-search-copy>span,.ke-shop-search-copy small { display:block; }
.ke-shop-search-copy small { color:var(--wp--preset--color--muted); margin-top:4px; font-size:12px; }
.ke-shop-search-all { display:flex; justify-content:space-between; gap:10px; border-top:1px solid var(--wp--preset--color--line); padding:14px 0 2px; color:var(--wp--preset--color--ink); text-decoration:none; }
.ke-shop-suggestions a:hover { text-decoration:underline; text-decoration-color:var(--wp--preset--color--champagne); text-underline-offset:4px; }
.ke-shop-search-widget :is(a,button,input):focus-visible { outline:2px solid var(--wp--preset--color--champagne); outline-offset:3px; }
/* Same irregular make-up stroke as the header: no filled active/hover pills. */
.ke-shop .ke-shop-filter-group a,.ke-shop .ke-shop-filter-group a:is([aria-current],:hover,:focus-visible) { background:transparent; border:0; border-radius:0; padding:11px 0; margin:3px 0; color:var(--wp--preset--color--muted); }
.ke-shop .ke-shop-filter-group a:is([aria-current],:hover,:focus-visible) { color:var(--wp--preset--color--ink); }
.ke-shop-filter-stroke { position:relative; display:inline-block; }
.ke-shop-filter-stroke::after { content:''; position:absolute; left:-3px; right:-4px; bottom:-5px; height:3px; background:var(--wp--preset--color--champagne); clip-path:polygon(0 40%,12% 12%,36% 25%,65% 0,98% 21%,95% 43%,100% 61%,74% 74%,47% 62%,20% 100%,2% 77%,6% 59%); transform:scaleX(0) rotate(-1deg); transform-origin:left; transition:transform 280ms ease-out; }
.ke-shop-filter-group a:is([aria-current],:hover,:focus-visible) .ke-shop-filter-stroke::after { transform:scaleX(1) rotate(-1deg); }
@media(max-width:550px) { .ke-shop-search-widget .ke-shop-search input { font-size:16px; } }
@media(prefers-reduced-motion:reduce) { .ke-shop-search-enhanced.is-floating,.ke-shop-filter-stroke::after { transition:none; } }
/* Switch search text and surfaces together when the system theme changes. */
.ke-shop-search-widget :is(a,button,input) { transition:none; }

/* Wrap mobile filter links with real spacing; retain each active make-up stroke. */
@media(max-width:800px) {
  .ke-shop-sidebar nav.ke-shop-filter-group { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 22px; }
  .ke-shop-sidebar nav.ke-shop-filter-group h2 { flex-basis:100%; }
  .ke-shop-sidebar nav.ke-shop-filter-group a { display:block; flex:0 0 auto; max-width:100%; min-height:44px; margin:0; }
}
