/* On-site search panel (site-search.js). Everything is prefixed .ss- so it cannot clash with the site styles. */
.ss-panel{position:absolute;z-index:3000;top:calc(100% + 8px);right:0;width:min(440px,calc(100vw - 24px));max-height:min(72vh,580px);overflow:auto;box-sizing:border-box;
  background:#fff;border:1px solid #dde1e6;border-top:2px solid #cf2126;border-radius:0;box-shadow:0 8px 20px rgba(0,0,0,.12);text-align:left;font:14px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans TC","Noto Sans JP",sans-serif;color:#212529}
.ss-panel[hidden]{display:none}
.ss-group{margin:0;padding:0}
.ss-head{position:sticky;top:0;z-index:1;display:flex;justify-content:space-between;align-items:center;margin:0;padding:8px 14px;background:#f7f8fa;border-bottom:1px solid #eceff3;font-size:12px;font-weight:700;letter-spacing:.02em;color:#495057}
.ss-head span:first-child{border-left:3px solid var(--ss-accent,#cf2126);padding-left:8px}
.ss-head span:last-child{font-weight:400;color:#868e96}
.ss-list{margin:0;padding:0;list-style:none}
.ss-item{display:flex;align-items:flex-start;gap:12px;padding:10px 14px;color:inherit;text-decoration:none;border-bottom:1px solid #f1f3f5}
.ss-item:hover,.ss-item.is-active{background:#f4f6f9;color:inherit;text-decoration:none}
.ss-thumb{display:block;flex:none;overflow:hidden;background:#f1f3f5}
.ss-thumb img{display:block;width:100%;height:100%;max-width:none;margin:0;padding:0}
.ss-text{display:block;flex:1;min-width:0}
.ss-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;overflow:hidden;font-weight:600;color:#1f2933}
.ss-meta{display:block;margin-top:1px;font-size:12px;color:#6c757d;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ss-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin-top:3px;font-size:12.5px;color:#495057}
.ss-panel mark{padding:0;background:#fff0a6;color:inherit}
.ss-empty{padding:18px 14px;text-align:center;color:#6c757d}
/* products: square catalogue photo, spec line under the name */
.ss-p{--ss-accent:#cf2126}
.ss-p .ss-thumb{width:58px;height:58px;border:1px solid #e5e8ec;border-radius:8px;background:#fff}
.ss-p .ss-thumb img{object-fit:contain}
.ss-p .ss-meta{color:#cf2126;font-weight:600}
/* categories: round photo, product count */
.ss-c{--ss-accent:#1d4e89}
.ss-c .ss-thumb{width:58px;height:58px;border-radius:50%;border:2px solid #dbe5f1}
.ss-c .ss-thumb img{object-fit:cover}
.ss-c .ss-title{-webkit-line-clamp:2}
/* blog posts: wide cover, two-line headline, date */
.ss-b{--ss-accent:#2b8a3e}
.ss-b .ss-thumb{width:92px;height:62px;border-radius:6px}
.ss-b .ss-thumb img{object-fit:cover}
.ss-b .ss-title{-webkit-line-clamp:2}
/* pages: small tile with the page picture */
.ss-g{--ss-accent:#6741d9}
.ss-g .ss-thumb{width:58px;height:58px;border-radius:8px;background:#eef0f4}
.ss-g .ss-thumb img{object-fit:cover}
@media (max-width:992px){.ss-panel{max-height:60vh}}

/* Results participate in the drawer's scroll area, never crossing its edges.
   Override the search script's legacy fixed positioning on narrow screens. */
@media (max-width:992px){
  .main-header .mob-view .ss-panel{position:static!important;inset:auto!important;width:100%!important;max-width:100%;max-height:min(360px,45vh)!important;max-height:min(360px,45dvh)!important;margin-top:10px;box-shadow:none;overscroll-behavior:contain}
  .main-header .mob-view .ss-item{gap:10px;padding:10px}
  .main-header .mob-view .ss-head{padding:8px 10px}
}
