.category-refinements h2 { font-size:15px; margin:0 0 10px; }
.category-refinements input[type="search"] { width:100%; min-width:0; padding:9px; border:1px solid #b0b0b0; border-radius:4px; font:inherit; }
.category-refinements .discovery-primary { width:100%; margin:12px 0; }
.category-refinements .discovery-clear { display:block; margin:6px 0; }
.category-pagination { display:flex; justify-content:center; align-items:center; gap:20px; margin:30px 0; }
/* MH-USA buying workbench: existing merchant navy, precise rules, useful density. */
.cat-page,.l3-page { --discovery-navy:#24397e; --discovery-wash:#f1f4fa; --discovery-line:#ccd4e2; }
.discovery-search { margin:16px 0 20px; padding:16px; background:var(--discovery-wash); border-left:3px solid var(--discovery-navy); }
.discovery-search label { display:block; font-weight:700; color:#24397e; margin-bottom:8px; }
.discovery-search-row { display:flex; gap:8px; }
.discovery-search input[type=search],.discovery-local input,.discovery-facet select { width:100%; min-width:0; padding:10px 12px; border:1px solid #b9c4d7; border-radius:3px; background:#fdfefe; color:#303747; font:inherit; }
.discovery-search button,.discovery-primary { border:1px solid #24397e; background:#24397e; color:#fdfefe; padding:10px 16px; font:inherit; font-weight:700; cursor:pointer; }
.discovery-search p,.discovery-scope { font-size:12px; color:#5e687a; line-height:1.6; margin:8px 0 0; }
.discovery-local { display:block; margin:0 0 14px; font-weight:700; font-size:12px; }
.discovery-local input { display:block; margin-top:7px; font-weight:400; }
.discovery-chips { display:flex; gap:8px; flex-wrap:wrap; margin:12px 0 18px; align-items:center; }
.discovery-chip { display:inline-flex; align-items:center; gap:8px; padding:7px 10px; border:1px solid #c3cde0; border-radius:3px; background:#f2f5fb; color:#24397e; font:inherit; font-size:12px; cursor:pointer; text-decoration:none; }
.discovery-clear { border:0; background:transparent; text-decoration:underline; color:#24397e; font:inherit; font-size:12px; cursor:pointer; padding:8px; }
.discovery-facet { display:block; font-size:12px; margin-top:12px; }
.discovery-facet select { display:block; margin-top:6px; }
.discovery-empty { padding:28px 20px; border:1px solid #ccd4e2; background:#f1f4fa; margin:16px 0; }
.discovery-empty h3 { margin:0 0 8px; }
.discovery-empty p { margin:0 0 12px; line-height:1.6; }
[hidden],#l3ListView .l3-prod-section[hidden],#l3ListView tr.l3-row[hidden] { display:none !important; }
#l3ListView.leaf-grid-mode table.prod-table tbody tr.l3-row[hidden] { display:none !important; }
/* Override older compact-card rules: choosing exact specifications is essential. */
#l3ListView.leaf-grid-mode tr.l3-row { grid-template-areas:"compare compare" "photo photo" "title title" "attribute attribute" "pack pack" "model model" "availability availability" "price price" "purchase purchase" !important; }
#l3ListView.leaf-grid-mode td.l3-chk { display:flex !important; justify-content:flex-start; grid-area:compare; padding-bottom:8px; }
#l3ListView.leaf-grid-mode :is(td.l3-attr,td.l3-pack,td.l3-avail,.l3-brand-sm) { display:block !important; }
#l3ListView .l3-chk label { display:flex; gap:6px; align-items:center; font-size:11px; color:#24397e; cursor:pointer; }
#l3ListView.leaf-grid-mode td.l3-img { grid-area:photo; }
#l3ListView.leaf-grid-mode td.l3-price { font-size:15px !important; font-style:normal !important; font-weight:700 !important; color:#303747 !important; }
.discovery-compare-bar { position:sticky; bottom:12px; z-index:30; display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 18px; background:#edf1f9; border:1px solid #aebbd3; box-shadow:0 4px 16px rgb(36 57 126 / 12%); margin-top:18px; }
.discovery-compare-bar strong { margin-right:auto; font-size:13px; }
.discovery-compare-bar button:disabled { opacity:.5; cursor:not-allowed; }
.discovery-status { flex-basis:100%; font-size:12px; color:#24397e; }
.discovery-dialog { width:min(1100px,94vw); max-width:94vw; max-height:88dvh; padding:0; border:1px solid #b5c0d4; color:#303747; background:#fafbfd; }
.discovery-dialog::backdrop { background:rgb(21 33 63 / 55%); }
.discovery-dialog-head { display:flex; justify-content:space-between; gap:20px; align-items:center; padding:18px 22px; border-bottom:1px solid #ccd4e2; }
.discovery-dialog h2 { margin:0; font-size:21px; color:#24397e; }
.discovery-dialog-head button { padding:9px 12px; background:#eef2f9; border:1px solid #bdc8dc; color:#24397e; font:inherit; cursor:pointer; }
.discovery-dialog p { margin:12px 22px; font-size:12px; line-height:1.6; }
.discovery-table-wrap { overflow:auto; max-height:65dvh; padding:0 16px 16px; }
.discovery-table { width:100%; min-width:620px; border-collapse:collapse; table-layout:fixed; font-size:13px; }
.discovery-table th,.discovery-table td { border:1px solid #ccd4e2; padding:12px; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.discovery-table th:first-child { width:125px; background:#eef2f9; color:#24397e; }
.discovery-table img { width:100%; height:110px; object-fit:contain; display:block; margin-bottom:12px; }
.discovery-table a { color:#24397e; font-weight:700; line-height:1.5; }
.discovery-table button { display:block; margin-top:12px; border:0; background:none; color:#24397e; text-decoration:underline; padding:6px 0; cursor:pointer; font:inherit; font-size:12px; }
.cat-page :focus-visible,.l3-page :focus-visible,.discovery-dialog :focus-visible { outline:3px solid #5276b9; outline-offset:3px; }
.l2-subcat-card { position:relative; }
.l2-subcat-title::after { content:""; position:absolute; inset:0; }
@media(max-width:768px) {
  .discovery-search-row { flex-direction:column; }
  #l3ListView.leaf-grid-mode { grid-template-columns:minmax(0,1fr) !important; }
  .discovery-compare-bar { bottom:0; padding:12px; gap:8px; }
  .discovery-compare-bar strong { width:100%; }
  .discovery-dialog-head { padding:14px; }
  .discovery-dialog h2 { font-size:18px; }
  /* Keep filtering available without scripts; the existing toggle enhances it. */
  .l3-sidebar:not(.discovery-enhanced) { display:block !important; }
}
