/* Header integration; retain the existing navigation. */
#masthead .site-branding .malina-header-search {
 display:block!important; float:none; position:relative; inset:auto;
 flex:1 1 320px; width:auto; max-width:560px; min-width:0; margin:0 0 0 auto; padding:0;
}
#masthead .malina-header-search .asl_w_container { width:100%; }
#masthead .malina-header-search .asl_m {
 width:100%!important; background:#242424!important; border:1px solid #494949!important;
 border-radius:8px!important; box-shadow:none!important;
}
#masthead .malina-header-search .asl_m:focus-within { border-color:#e30b5d!important; }
#masthead .malina-header-search .probox { height:46px!important; margin:0!important; background:transparent!important; border:0!important; box-shadow:none!important; }
#masthead .malina-header-search .proinput { margin:0!important; padding:0 12px!important; }
#masthead .malina-header-search .proinput input { font-family:inherit!important; font-size:16px!important; color:#eee!important; height:46px!important; line-height:46px!important; text-shadow:none!important; }
#masthead .malina-header-search .proinput input::placeholder { color:#aaa!important; opacity:1; }
#masthead .malina-header-search .prosettings,
#masthead .malina-header-search .promagnifier { width:44px!important; height:46px!important; background:#242424!important; box-shadow:none!important; }
#masthead .malina-header-search .prosettings svg,
#masthead .malina-header-search .promagnifier svg { fill:#e30b5d!important; }
#masthead .malina-search-fallback { display:flex; gap:8px; }
#masthead .malina-search-fallback input { flex:1; min-width:0; font-size:16px; min-height:46px; }
#masthead .malina-search-fallback button { min-height:46px; }
/* Plugin result/filter panels can be mounted outside the header. */
div.asl_r, div.asl_s { background:#222!important; color:#eee!important; border:1px solid #444!important; border-radius:8px!important; box-shadow:0 8px 24px #0005!important; }
div.asl_r .results .item { background:#222!important; border-bottom:1px solid #383838!important; }
div.asl_r .results .item:hover { background:#2c2c2c!important; }
div.asl_r .results .item .asl_content h3 a { color:#eee!important; text-shadow:none!important; }
div.asl_r .results .item .asl_content .asl_desc { color:#bbb!important; }
div.asl_s label, div.asl_s legend, div.asl_r .nores { color:#ddd!important; }
@media(max-width:1000px) {
 #masthead .site-branding .logo { order:0; }
 #masthead .site-branding > .malina-menu-toggle { order:1; }
 #masthead .site-branding .malina-header-search { order:2; flex:0 0 100%; width:100%; max-width:none; margin:0; }
 #masthead .site-branding .happy-header { order:3; }
 div.asl_r { max-width:calc(100vw - 26px)!important; }
}

/* V2: flat navigation and secondary destination group. */
#masthead #site-navigation,
#masthead #site-navigation > ul,
#masthead #site-navigation > ul > li,
#masthead #site-navigation > ul > li > a,
#masthead #site-navigation > ul > li:hover > a {
 background:#202020!important; background-image:none!important; box-shadow:none!important; text-shadow:none!important;
}
#masthead #site-navigation { border-top:1px solid #333; border-bottom:1px solid #333; }
#masthead #site-navigation > ul > li { border:0; }
#masthead #site-navigation > ul > li > a { color:#eee; border-bottom:3px solid transparent; }
#masthead #site-navigation > ul > li:hover > a { background:#2b2b2b!important; }
#masthead #site-navigation > ul > li:is(.current-menu-item,.current-menu-parent,.current-menu-ancestor) > a,
#masthead #site-navigation > ul > li:has(> .malina-sub-toggle[aria-expanded="true"]) > a { border-bottom-color:#e30b5d; }
#masthead #site-navigation > ul > li.malina-external > a { color:#bbb; }
@media(min-width:1001px) {
 #masthead #site-navigation > ul > li.malina-external { margin-left:auto!important; border-left:1px solid #444; }
 #masthead #site-navigation > ul > li.malina-external ~ li.malina-external { margin-left:0!important; border-left:0; }
}
#masthead .malina-menu-toggle { background:#242424!important; border:1px solid #555; border-radius:8px; box-shadow:none; color:#eee; }
#masthead .malina-menu-toggle[aria-expanded="true"] { border-color:#e30b5d; }
@media(max-width:1000px) {
 #masthead #site-navigation > ul > li.malina-external { border-top:1px solid #444; margin-top:12px; padding-top:8px; }
 #masthead #site-navigation > ul > li.malina-external ~ li.malina-external { border:0; margin-top:0; padding-top:0; }
}
/* Compact live results. Typography preserves the configured result fields. */
div.asl_r .results .item { padding:10px!important; border:0!important; border-bottom:1px solid #393939!important; box-shadow:none!important; }
div.asl_r .results .item .asl_image { width:96px!important; height:54px!important; border-radius:5px; background-size:cover!important; }
div.asl_r .results .item .asl_content { line-height:1.4!important; }
div.asl_r .results .item .asl_content h3 { font-size:15px!important; line-height:1.4!important; }
div.asl_r .results .item .asl_content .asl_desc { font-size:13px!important; line-height:1.4!important; color:#aaa!important; }
#masthead .malina-header-search .proclose,
#masthead .malina-header-search .proclose svg { border:0!important; box-shadow:none!important; background:transparent!important; }
@media(max-width:1000px) {
 div.asl_r .results .item .asl_image { width:80px!important; height:45px!important; }
}

/* V3: Browse owns the mobile overlay; separate destinations visibly. */
@media(max-width:1000px) {
 html.malina-browse-open #masthead .malina-header-search,
 html.malina-browse-open div.asl_r,
 html.malina-browse-open div.asl_s { visibility:hidden!important; pointer-events:none!important; }
 #masthead #site-navigation > ul > li > a { border-bottom:1px solid #3b3b3b; }
 #masthead #site-navigation .malina-browse > ul > li:not(.malina-tools):not(.malina-panel-footer) > a {
  border:1px solid #424242!important; border-radius:8px; background:#292929!important;
  margin:0; padding:9px 10px; min-height:44px;
 }
 #masthead #site-navigation .malina-browse > ul > li:not(.malina-tools):not(.malina-panel-footer) > a:hover,
 #masthead #site-navigation .malina-browse > ul > li:not(.malina-tools):not(.malina-panel-footer) > a:focus-visible { background:#353535!important; border-color:#777!important; }
}
.breadcrumbs-area { border-top:0!important; }

/* OPTION 2: quiet panel */
#masthead #site-navigation > ul { column-gap:8px; }
#masthead #site-navigation > ul > li > a { padding-left:16px; padding-right:16px; }
#masthead #site-navigation > ul > li > a > i { opacity:.75; }
#masthead #site-navigation > ul > li:hover > a { background:#292929!important; }
#masthead #site-navigation > ul > li:is(.current-menu-item,.current-menu-parent,.current-menu-ancestor) > a { color:#fff; border-bottom-color:#e30b5d; }
@media(max-width:1000px) {
 #masthead #site-navigation > ul > li > a { border-bottom:1px solid #393939; }
 #masthead #site-navigation > ul > li:is(.current-menu-item,.current-menu-parent,.current-menu-ancestor) > a { box-shadow:inset 3px 0 #e30b5d!important; border-bottom-color:#393939; }
}

/* Catalog tiles + measured pagination. */
#masthead #site-navigation .malina-browse > ul > li:not(.malina-filter-row) > a { display:flex; align-items:center; border:1px solid #424242!important; border-radius:8px; background:#292929!important; padding:9px 12px; min-height:44px; }
#masthead #site-navigation .malina-browse > ul > li:not(.malina-filter-row) > a:hover { background:#353535!important; border-color:#777!important; }
#masthead #site-navigation.malina-ready .malina-browse > ul { box-sizing:border-box; overflow:hidden!important; align-content:start; grid-auto-rows:min-content; row-gap:8px; }
#masthead #site-navigation .malina-panel-footer .malina-pagination { display:flex!important; margin:0 0 8px!important; }
#masthead #site-navigation .malina-panel-footer .malina-pagination button { display:block!important; }
#masthead #site-navigation .malina-panel-footer { position:absolute!important; left:12px!important; right:12px!important; bottom:12px!important; width:auto!important; margin:0!important; padding-top:8px!important; }
@media(min-width:1001px) {
 #masthead #site-navigation.malina-ready .malina-browse > ul { height:var(--malina-fit-height,480px); max-height:none; padding:12px; border-radius:13px; border:1px solid #444; box-shadow:0 12px 28px #0005; }
}

/* V2: distinct surfaces and content-sized dropdown. */
html.malina-browse-open #masthead { position:relative; z-index:100000; }
html.malina-browse-open body::after { content:""; position:fixed; inset:0; background:rgba(0,0,0,.48); z-index:99990; pointer-events:none; }
#masthead #site-navigation, #masthead #site-navigation > ul,
#masthead #site-navigation > ul > li, #masthead #site-navigation > ul > li > a { background:#181818!important; }
#masthead #site-navigation > ul > li.malina-browse:has(>button[aria-expanded="true"]) > a,
#masthead #site-navigation > ul > li.malina-browse:has(>button[aria-expanded="true"]) > button { background:#422633!important; color:#fff; }
#masthead #site-navigation.malina-ready .malina-browse > ul { background:#2b2b2b!important; border:1px solid #686868!important; box-shadow:0 14px 36px #0009!important; border-radius:13px; }
#masthead #site-navigation .malina-browse > ul > li:not(.malina-filter-row) > a { background:#202020!important; border-color:#515151!important; }
#masthead #site-navigation .malina-browse > ul > li:not(.malina-filter-row) > a:hover { background:#402d36!important; border-color:#a26c84!important; }
#masthead #site-navigation .malina-panel-footer button,
#masthead #site-navigation .malina-panel-footer .malina-all-sites { background:#202020!important; background-image:none!important; box-shadow:none!important; border:1px solid #666!important; border-radius:8px; color:#eee!important; }
#masthead #site-navigation .malina-panel-footer .malina-pagination button:last-child:not(:disabled) { background:#bf0b50!important; border-color:#db2468!important; }
#masthead #site-navigation .malina-panel-footer button:disabled { opacity:.4; }

/* V3: contiguous desktop tabs and reversible backdrop fade. */
@media(min-width:1001px) {
 #masthead #site-navigation > ul { gap:0!important; column-gap:0!important; }
 #masthead #site-navigation > ul > li:not(.malina-external) { margin-left:0!important; margin-right:0!important; }
}
body::after {
 content:""; position:fixed; inset:0; z-index:99990;
 background:rgba(0,0,0,.48); pointer-events:none;
 opacity:0; visibility:hidden;
 transition:opacity 180ms ease-in-out, visibility 0s linear 180ms;
}
html.malina-browse-open body::after {
 opacity:1; visibility:visible;
 transition:opacity 180ms ease-in-out, visibility 0s linear 0s;
}
/* Keep the header above the fading scrim on close as well. */
#masthead { position:relative; z-index:100000; }
@media(prefers-reduced-motion:reduce) { body::after, html.malina-browse-open body::after { transition:none; } }

/* Mobile-only polish: desktop rules remain unchanged. */
@media(max-width:1000px) {
 #masthead #site-navigation > ul:not([hidden]) {
  box-sizing:border-box; width:calc(100% - 26px); margin:0 13px 16px;
  padding:8px 10px 12px; background:#202020!important;
  border:1px solid #494949; border-bottom:2px solid #606060;
  border-radius:13px; box-shadow:0 8px 18px #0004!important;
 }
 #masthead #site-navigation > ul > li { background:transparent!important; }
 #masthead #site-navigation > ul > li > a,
 #masthead #site-navigation > ul > li:hover > a {
  background:transparent!important; border:0!important; box-shadow:none!important;
  border-radius:8px; margin:2px 0; padding-left:14px; padding-right:14px;
 }
 #masthead #site-navigation > ul > li:is(.current-menu-item,.current-menu-parent,.current-menu-ancestor) > a {
  background:#402a34!important; color:#fff!important;
  border:0!important; box-shadow:none!important;
 }
 #masthead #site-navigation > ul > li.malina-browse:has(>button[aria-expanded="true"]) > a {
  background:#402a34!important; border:0!important; box-shadow:none!important;
 }
 #masthead #site-navigation .malina-tools .malina-panel-heading {
  box-sizing:border-box; padding:6px 12px 10px!important; margin:0 0 6px!important;
  align-items:center; gap:12px;
 }
 #masthead #site-navigation .malina-tools .malina-panel-heading strong { line-height:1.3; }
 #masthead #site-navigation .malina-tools .malina-panel-close { flex:0 0 44px; }
}
