/* WRAPING – exact flat tree presentation matching the homepage.
 * Applied server-side to ALL non-home pages, even if the JS tree swap fails.
 * No content sections, products, articles, top navigation links or URLs are changed.
 */
body.wum-sitewide .mainnav .shell.nav-inner {
  display:flex; justify-content:center; align-items:center; flex-wrap:wrap;
}
/* Remove brown cards AND shadows on both legacy trees and the replacement tree. */
html body.wum-sitewide aside.nfct-sk-tree,
html body.wum-sitewide aside.nf-side-tree,
html body.wum-sitewide aside.wrp-tree,
html body.wum-sitewide .nfct-sk-slot,
html body.wum-sitewide .nfct-sk-tree-wrap,
html body.wum-sitewide .nfct-sk-tree-inner {
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  outline:0 !important;
}
html body.wum-sitewide aside.nfct-sk-tree,
html body.wum-sitewide aside.nf-side-tree,
html body.wum-sitewide aside.wrp-tree {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:none !important;
  min-width:0 !important;
  height:auto !important;
  margin:0 !important;
  padding:19px 15px 13px !important;
  color:#ede8e0 !important;
  font-family:inherit;
  font-size:13px;
  line-height:1.5;
  transform:none !important;
}
/* Never allow hidden original trees to claim space. */
body.wum-sitewide aside.wum-tree-hidden {display:none !important;}
/* Existing theme catalogue has a nested grid; use this rule only when sidebar is its direct child. */
@media(min-width:841px) {
  body.wum-sitewide .nf-catalogue-with-tree.wum-catalogue-layout:has(> aside.wum-tree-installed) {
    display:grid !important;
    grid-template-columns:238px minmax(0,1fr) !important;
    column-gap:18px !important;
    align-items:start !important;
  }
  body.wum-sitewide .nf-catalogue-with-tree.wum-sidebar-outside {
    grid-template-columns:minmax(0,1fr) !important;
  }
}
body.wum-sitewide .wum-page-shell {
  display:grid;
  grid-template-columns:238px minmax(0,1fr);
  align-items:start;
  gap:18px;
  width:calc(100% - 36px);
  max-width:1560px;
  min-width:0;
  margin:0 auto;
}
body.wum-sitewide .wum-page-shell > main {min-width:0;max-width:none;width:100%;}
/* Homepage tree's typography and spacing */
body.wum-sitewide aside.wrp-tree .wrp-tree-top {margin-bottom:10px;}
body.wum-sitewide aside.wrp-tree .wrp-tree-kicker {color:#a9a098;letter-spacing:.19em;font-size:9px;font-weight:500;text-transform:uppercase;}
body.wum-sitewide aside.wrp-tree .wrp-tree-titleline {
  display:flex;justify-content:space-between;gap:8px;align-items:center;
  margin-top:7px;border-bottom:1px solid rgba(200,169,120,.45);padding-bottom:12px;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-titleline h2 {
  margin:0 !important;padding:0 !important;color:#e9d3af !important;
  font-size:16px !important;font-weight:600 !important;line-height:1.3 !important;
  letter-spacing:.13em !important;text-transform:uppercase;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-star {color:#c8a978;font-size:12px;}
body.wum-sitewide aside.wrp-tree .wrp-tree-nav {display:block;overflow:visible;max-height:none;}
body.wum-sitewide aside.wrp-tree .wrp-tree-list,
body.wum-sitewide aside.wrp-tree .wrp-tree-sublist {list-style:none !important;margin:0 !important;padding:0 !important;}
body.wum-sitewide aside.wrp-tree .wrp-tree-node {list-style:none !important;margin:0 !important;border:0 !important;}
body.wum-sitewide aside.wrp-tree .wrp-tree-row {
  display:flex;align-items:center;justify-content:space-between;gap:3px;
  min-height:35px;margin:2px 0;padding:0 5px;
  border:1px solid transparent !important;border-radius:4px !important;
  background:transparent !important;box-shadow:none !important;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-link {
  display:block;flex:1;min-width:0;padding:8px 5px !important;
  color:#eae3d8 !important;font-size:12.5px !important;line-height:1.4 !important;
  text-decoration:none !important;border:0 !important;background:transparent !important;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-row:hover,
body.wum-sitewide aside.wrp-tree .wrp-tree-row:focus-within {
  border-color:#ddb673 !important;
  background:rgba(188,133,53,.095) !important;
  box-shadow:0 0 13px rgba(221,182,115,.12) !important;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-row:hover .wrp-tree-link {color:#ddb673 !important;}
body.wum-sitewide aside.wrp-tree .wrp-tree-expand {
  display:flex;align-items:center;justify-content:center;
  flex:0 0 25px;width:25px;min-width:25px;height:30px;
  padding:0;margin:0;cursor:pointer;
  color:#ddb673 !important;border:0 !important;background:transparent !important;
  box-shadow:none !important;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-sublist {
  border:0 !important;margin:1px 0 7px 8px !important;padding:0 0 0 9px !important;
  background:transparent !important;box-shadow:none !important;
}
body.wum-sitewide aside.wrp-tree .wrp-tree-sublist .wrp-tree-link {color:#d4c4aa !important;font-size:12px !important;}
body.wum-sitewide aside.wrp-tree .wrp-tree-sublist[hidden] {display:none !important;}
body.wum-sitewide aside.wrp-tree .wrp-tree-mobile-toggle {display:none;}
/* Before JS runs / if it fails, flatten the legacy tree's inner category cards too. */
body.wum-sitewide aside.nfct-sk-tree .nfct-sk-nav,
body.wum-sitewide aside.nfct-sk-tree .nfct-sk-group,
body.wum-sitewide aside.nf-side-tree nav,
body.wum-sitewide aside.nf-side-tree details {
  background:transparent !important;border-color:transparent !important;
  box-shadow:none !important;
}
@media(min-width:841px) and (max-width:1100px) {
  body.wum-sitewide .wum-page-shell {grid-template-columns:206px minmax(0,1fr);}
  body.wum-sitewide .nf-catalogue-with-tree.wum-catalogue-layout:has(> aside.wum-tree-installed) {grid-template-columns:206px minmax(0,1fr) !important;}
}
@media(max-width:840px) {
  body.wum-sitewide .wum-page-shell,
  body.wum-sitewide .nf-catalogue-with-tree.wum-catalogue-layout:has(> aside.wum-tree-installed) {
    display:flex !important;flex-direction:column !important;gap:12px !important;
    width:calc(100% - 24px);margin:0 auto;
  }
  body.wum-sitewide aside.wrp-tree,
  body.wum-sitewide aside.nfct-sk-tree,
  body.wum-sitewide aside.nf-side-tree {padding:13px 16px !important;}
  body.wum-sitewide aside.wrp-tree .wrp-tree-mobile-toggle {
    display:flex;align-items:center;justify-content:space-between;
    width:100%;padding:9px 0 2px;border:0;background:transparent;
    color:#e7d4b5;font:inherit;font-size:12px;cursor:pointer;text-align:left;
  }
  body.wum-sitewide aside.wrp-tree:not(.is-open) .wrp-tree-nav {display:none !important;}
}


/* ===== v1.4: MATCH HOMEPAGE GRID WIDTH =====
 * Keep the ENTIRE left tree plus catalogue inside one centred shell,
 * calibrated against the user's 2048px screenshots of the homepage. No global page/background fixes.
 * !important overrides the full-viewport theme layout and earlier old plugin CSS.
 */
html body.wum-sitewide {
  --wum-shell: 1430px;
  --wum-tree-col: 238px;
  --wum-gutter: 18px;
}
html body.wum-sitewide .nf-catalogue-with-tree,
html body.wum-sitewide .wum-page-shell {
  box-sizing:border-box !important;
  position:relative !important;
  inset:auto !important;
  left:auto !important;
  right:auto !important;
  transform:none !important;
  float:none !important;
  display:grid !important;
  grid-template-columns:var(--wum-tree-col) minmax(0,1fr) !important;
  gap:var(--wum-gutter) !important;
  align-items:start !important;
  width:calc(100% - 32px) !important;
  max-width:var(--wum-shell) !important;
  min-width:0 !important;
  margin:24px auto 42px !important;
  padding:0 !important;
}
/* Override v1.1's more-specific fixed 238px legacy rule. */
html body.wum-sitewide .nf-catalogue-with-tree.wum-catalogue-layout:has(> aside.wum-tree-installed) {
  grid-template-columns:var(--wum-tree-col) minmax(0,1fr) !important;
  gap:var(--wum-gutter) !important;
}
/* If a theme has placed a category tree outside the catalogue grid,
 * retain the one-column content layout rather than a blank first column. */
html body.wum-sitewide .nf-catalogue-with-tree.wum-sidebar-outside {
  display:block !important;
  grid-template-columns:minmax(0,1fr) !important;
}
html body.wum-sitewide .nf-catalogue-with-tree > .nf-catalogue-with-tree-main,
html body.wum-sitewide .nf-catalogue-with-tree .nf-catalogue-with-tree-main,
html body.wum-sitewide .wum-page-shell > main {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin-left:0 !important;
  margin-right:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
  float:none !important;
}
/* Control inner full-width shells and legacy transform rules within the shop. */
html body.wum-sitewide .nf-catalogue-with-tree-main > .shell,
html body.wum-sitewide .nf-catalogue-with-tree-main > .container,
html body.wum-sitewide .nf-catalogue-with-tree-main > .woocommerce,
html body.wum-sitewide .wum-page-shell > main > .shell {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  margin-left:auto !important;
  margin-right:auto !important;
  padding-left:0 !important;
  padding-right:0 !important;
  transform:none !important;
}
/* Desktop tree is flat, clean, with no superfluous wide 'hide' button. */
@media(min-width:841px) {
  html body.wum-sitewide aside.wrp-tree button.wrp-tree-mobile-toggle {
    display:none !important;
  }
}
html body.wum-sitewide .nf-catalogue-with-tree aside.wrp-tree,
html body.wum-sitewide .wum-page-shell aside.wrp-tree {
  box-sizing:border-box !important;
  max-width:100% !important;
  min-width:0 !important;
  margin:0 !important;
  padding:10px 4px 12px !important;
  background:transparent !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
}
/* Three usable products per row rather than four oversized widescreen cards.
 * Supports WooCommerce's native classes even if the theme shifts wrappers. */
@media(min-width:1101px) {
  html body.wum-sitewide:is(.woocommerce,.woocommerce-page,.tax-product_cat,.post-type-archive-product) .nf-catalogue-with-tree-main ul.products,
  html body.wum-sitewide:is(.woocommerce,.woocommerce-page,.tax-product_cat,.post-type-archive-product) .wum-page-shell ul.products,
  html body.wum-sitewide.tax-product_cat .nf-catalogue-with-tree ul.products {
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:14px !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    padding-left:0 !important;
    padding-right:0 !important;
    margin:14px 0 !important;
    float:none !important;
  }
}
html body.wum-sitewide .nf-catalogue-with-tree-main ul.products > li.product,
html body.wum-sitewide .wum-page-shell ul.products > li.product {
  box-sizing:border-box !important;
  min-width:0 !important;
  max-width:100% !important;
  width:auto !important;
  clear:none !important;
  float:none !important;
  margin:0 !important;
}
html body.wum-sitewide .nf-catalogue-with-tree :is(img,video,picture),
html body.wum-sitewide .wum-page-shell :is(img,video,picture) {
  max-width:100%;
}
@media(min-width:841px) and (max-width:1100px) {
  html body.wum-sitewide { --wum-tree-col:175px; --wum-gutter:14px; }
  html body.wum-sitewide .nf-catalogue-with-tree-main ul.products,
  html body.wum-sitewide .wum-page-shell ul.products {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }
}
@media(min-width:541px) and (max-width:840px) {
  html body.wum-sitewide .nf-catalogue-with-tree,
  html body.wum-sitewide .wum-page-shell {
    display:flex !important;
    flex-direction:column !important;
    gap:14px !important;
    width:calc(100% - 24px) !important;
    margin:15px auto !important;
  }
  html body.wum-sitewide .nf-catalogue-with-tree-main ul.products,
  html body.wum-sitewide .wum-page-shell ul.products {
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:12px !important;
  }
}
@media(max-width:540px) {
  html body.wum-sitewide .nf-catalogue-with-tree,
  html body.wum-sitewide .wum-page-shell {
    display:flex !important;
    flex-direction:column !important;
    gap:12px !important;
    width:calc(100% - 20px) !important;
    margin:12px auto !important;
  }
  html body.wum-sitewide .nf-catalogue-with-tree-main ul.products,
  html body.wum-sitewide .wum-page-shell ul.products {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    gap:12px !important;
  }
}

/* ================================================================
   v1.5: Remove exactly the two unwanted product catalogue panels.
   Verified against the theme's original HTML classes:
   - <nav class="nf-related-categories">  EXPLORE SIMILAR COLLECTIONS
   - <section class="nf-catalogue-tools"> FIND YOUR FAVOURITES
   display:none collapses the panels and their box-model space; the
   existing WooCommerce heading, sorting and product grid rise naturally.
   Never hide product cards, search results, categories tree or header.
   ================================================================= */
html body.wum-sitewide nav.nf-related-categories,
html body.wum-sitewide section.nf-catalogue-tools {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  min-height: 0 !important;
  height: 0 !important;
}
