/* Global Smart catalogue only. The owning controller supplies the measured
   --smart-global-catalog-top on the layer and owns hidden/selection/focus.
   Existing header, sidebar, cards and native category URLs are untouched. */
#smart-global-catalog-layer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
  color: #2c4031;
  font-family: var(--smart-ui-font,Manrope,Arial,sans-serif);
  font-size: 14px;
  line-height: 1.5;
}
#smart-global-catalog-layer,
#smart-global-catalog-layer * { box-sizing: border-box; }
#smart-global-catalog-layer[hidden],
#smart-global-catalog-layer [hidden] { display: none !important; }
#smart-global-catalog-layer .sgc-backdrop {
  position: fixed;
  top: var(--smart-global-catalog-top,120px);
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(28,43,32,.32);
  box-shadow: none;
  pointer-events: auto;
  cursor: default;
}
#smart-global-catalog-layer .sgc-panel {
  position: fixed;
  top: var(--smart-global-catalog-top,120px);
  left: 50%;
  display: flex;
  flex-direction: column;
  width: min(1280px,calc(100% - 32px));
  height: min(720px,calc(100vh - var(--smart-global-catalog-top,120px) - 12px));
  height: min(720px,calc(100dvh - var(--smart-global-catalog-top,120px) - 12px));
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e0e8df;
  border-radius: 0 0 18px 18px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(24,45,29,.18);
  transform: translateX(-50%);
  pointer-events: auto;
}
#smart-global-catalog-layer .sgc-topbar {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  min-height: 48px;
  padding: 2px 12px 2px 20px;
  border-bottom: 1px solid #e8eee5;
  background: #fff;
}
#smart-global-catalog-layer .sgc-title {
  min-width: 0;
  margin: 0;
  color: #2c4031;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 24px !important;
  overflow-wrap: anywhere;
}
#smart-global-catalog-layer .sgc-close {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #e5ebe2;
  border-radius: 11px;
  background: #f6f8f3;
  color: #4b6651;
  font-family: inherit;
  font-size: 24px !important;
  line-height: 1 !important;
  cursor: pointer;
}
#smart-global-catalog-layer .sgc-close svg { width: 20px; height: 20px; }
#smart-global-catalog-layer .sgc-close:hover { background: #fff4d3; border-color: #e9d99f; }
#smart-global-catalog-layer .sgc-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 250px minmax(0,1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
#smart-global-catalog-layer .sgc-roots {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 10px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid #e8eee5;
  background: #fafbf8;
  scrollbar-width: thin;
}
#smart-global-catalog-layer .sgc-root {
  display: grid;
  grid-template-columns: 24px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0 0 3px;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #596b5d;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 20px !important;
  text-align: left;
  white-space: normal;
  cursor: pointer;
}
#smart-global-catalog-layer .sgc-root:hover { background: #fff5d8; color: #365f3d; }
#smart-global-catalog-layer .sgc-root[aria-selected="true"] { background: #e8f2e5; color: #2a693b; }
#smart-global-catalog-layer .sgc-root-icon { display: block; width: 24px; height: 24px; color: #7c8b7b; }
#smart-global-catalog-layer .sgc-root[aria-selected="true"] .sgc-root-icon { color: #3e7a4a; }
#smart-global-catalog-layer .sgc-root-label { min-width: 0; overflow-wrap: anywhere; }
#smart-global-catalog-layer .sgc-root-count {
  min-width: 0;
  color: #899487;
  font-size: 12px !important;
  font-weight: 400;
  line-height: 18px !important;
  font-variant-numeric: tabular-nums;
}
#smart-global-catalog-layer .sgc-content {
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 20px 24px 28px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  scrollbar-width: thin;
}
#smart-global-catalog-layer .sgc-heading {
  margin: 0 0 4px;
  color: #2c4031;
  font-size: 20px !important;
  font-weight: 700;
  line-height: 28px !important;
  overflow-wrap: anywhere;
}
#smart-global-catalog-layer .sgc-all {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin: 0 0 14px;
  color: #39764c;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 21px !important;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
#smart-global-catalog-layer .sgc-groups {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: start;
  gap: 24px 28px;
  min-width: 0;
}
#smart-global-catalog-layer .sgc-group { min-width: 0; margin: 0; padding: 0; }
#smart-global-catalog-layer .sgc-group h3 { margin: 0 0 5px; font-size: 15px; line-height: 21px; }
#smart-global-catalog-layer .sgc-group h3 > a {
  display: flex;
  align-items: center;
  min-height: 36px;
  min-width: 0;
  padding: 5px 0;
  color: #304f38;
  font-size: 15px !important;
  font-weight: 700;
  line-height: 21px !important;
  text-decoration: none;
  overflow-wrap: anywhere;
}
#smart-global-catalog-layer .sgc-links { margin: 0; padding: 0; list-style: none; }
#smart-global-catalog-layer .sgc-links li { min-width: 0; margin: 0; padding: 0; list-style: none; }
#smart-global-catalog-layer .sgc-links a {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  padding: 5px 0;
  color: #6c7880;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 21px !important;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
#smart-global-catalog-layer .sgc-links .sgc-links { margin: 1px 0 5px 2px; padding-left: 12px; border-left: 1px solid #edf0e9; }
#smart-global-catalog-layer :is(.sgc-all,.sgc-group h3 > a,.sgc-links a):hover { color: #267044; text-decoration: underline; text-underline-offset: 3px; }
#smart-global-catalog-layer .sgc-status { margin: 0; padding: 24px; color: #72806f; font-size: 14px !important; line-height: 21px !important; overflow-wrap: anywhere; }
#smart-global-catalog-layer :is(button,a,[tabindex]):focus-visible { outline: 2px solid #39764c; outline-offset: 2px; }
#smart-global-catalog-layer .sgc-content:focus-visible { outline-offset: -3px; }

/* Two independent scroll panes; no horizontal shrink/overflow at320px. */
@media (max-width: 820px) {
  #smart-global-catalog-layer :is(.sgc-panel,.sgc-backdrop) { top: var(--smart-global-catalog-top,112px); }
  #smart-global-catalog-layer .sgc-panel {
    left: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - var(--smart-global-catalog-top,112px));
    height: calc(100dvh - var(--smart-global-catalog-top,112px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    transform: none;
  }
  #smart-global-catalog-layer .sgc-topbar { flex-basis: 48px; padding: 2px 8px 2px 12px; }
  #smart-global-catalog-layer .sgc-title { font-size: 16px !important; line-height: 22px !important; }
  #smart-global-catalog-layer .sgc-layout { grid-template-columns: 104px minmax(0,1fr); }
  #smart-global-catalog-layer .sgc-roots { padding: 6px; }
  #smart-global-catalog-layer .sgc-root {
    grid-template-columns: 20px minmax(0,1fr);
    align-items: start;
    gap: 4px 6px;
    min-height: 72px;
    margin-bottom: 3px;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px !important;
    line-height: 18px !important;
  }
  #smart-global-catalog-layer .sgc-root-icon { grid-column: 1; grid-row: 1; width: 20px; height: 20px; }
  #smart-global-catalog-layer .sgc-root-label { grid-column: 1 / -1; grid-row: 2; }
  #smart-global-catalog-layer .sgc-root-count { grid-column: 2; grid-row: 1; justify-self: end; font-size: 11px !important; line-height: 18px !important; }
  #smart-global-catalog-layer .sgc-content { padding: 14px 12px 24px; }
  #smart-global-catalog-layer .sgc-heading { font-size: 16px !important; line-height: 22px !important; }
  #smart-global-catalog-layer .sgc-all { min-height: 40px; margin-bottom: 10px; }
  #smart-global-catalog-layer .sgc-groups { grid-template-columns: minmax(0,1fr); gap: 18px; }
  #smart-global-catalog-layer .sgc-group h3 { margin-bottom: 2px; }
  #smart-global-catalog-layer .sgc-group h3 > a { min-height: 40px; font-size: 14px !important; line-height: 21px !important; }
  #smart-global-catalog-layer .sgc-links a { min-height: 40px; font-size: 14px !important; line-height: 21px !important; }
  #smart-global-catalog-layer .sgc-links .sgc-links { padding-left: 8px; }
  #smart-global-catalog-layer .sgc-status { padding: 16px 12px; }
}
/* Optional class is added/removed exclusively by this layer's controller. */
html.smart-global-catalog-open { overflow: hidden; }

/* Actual cascade fixes. Only this overlay's text, root rows and native details. */
body#body.smart-ui #smart-global-catalog-layer,
body#body.smart-ui #smart-global-catalog-layer * {
  font-family: "Manrope",Arial,sans-serif !important;
}
body#body.smart-ui #smart-global-catalog-layer .sgc-root {
  height: auto !important;
  min-height: 48px !important;
  white-space: normal !important;
}
body#body.smart-ui #smart-global-catalog-layer .sgc-root-label {
  display: block;
  min-width: 0;
  height: auto !important;
  max-height: none;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
body#body.smart-ui #smart-global-catalog-layer .sgc-root-icon,
body#body.smart-ui #smart-global-catalog-layer .sgc-root-icon * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
body#body.smart-ui #smart-global-catalog-layer details.sgc-more {
  min-width: 0;
  margin: 2px 0 6px;
  padding: 0;
}
body#body.smart-ui #smart-global-catalog-layer details.sgc-more > summary {
  min-height: 28px;
  margin: 0;
  padding: 4px 0;
  color: #39764c;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 20px !important;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}
body#body.smart-ui #smart-global-catalog-layer details.sgc-more > summary:hover { color: #245f35; }
body#body.smart-ui #smart-global-catalog-layer details.sgc-more > summary:focus-visible {
  outline: 2px solid #39764c;
  outline-offset: 2px;
}
body#body.smart-ui #smart-global-catalog-layer details.sgc-more > .sgc-links {
  margin: 2px 0 5px 2px;
  padding-left: 12px;
  border-left: 1px solid #edf0e9;
}
@media (max-width: 820px) {
  body#body.smart-ui #smart-global-catalog-layer details.sgc-more > summary {
    min-height: 40px;
    padding: 10px 0;
  }
  body#body.smart-ui #smart-global-catalog-layer details.sgc-more > .sgc-links { padding-left: 8px; }
}
