/* WP BB Home & Garden v4.0.14 R5 — compact 4-column homepage departments. */

/* Desktop: exactly four equal columns across the full storefront shell. */
/* Ignore formatting breaks in previously cached shortcode markup. */
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid > br,
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid > p:empty{
  display:none!important;
}

body.wpbbshop-theme .wpbb-v400-departments{
  width:min(var(--wpbb-v4-shell,1480px),calc(100% - 48px))!important;
  max-width:var(--wpbb-v4-shell,1480px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-top:18px!important;
  padding-bottom:0!important;
  min-height:0!important;
  height:auto!important;
  content-visibility:visible!important;
  contain:none!important;
  contain-intrinsic-size:auto!important;
  box-sizing:border-box!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-section-head{
  margin:0 0 8px!important;
  gap:12px!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-section-head h2{
  margin:2px 0 0!important;
  font-size:clamp(25px,1.85vw,33px)!important;
  line-height:1.06!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  grid-auto-rows:58px!important;
  gap:6px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:20px 0!important;
  padding:0!important;
  align-items:stretch!important;
  align-content:start!important;
  justify-content:stretch!important;
  box-sizing:border-box!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid > .wpbb-v400-dept{
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  grid-column:auto!important;
  grid-row:auto!important;
  flex:none!important;
  width:auto!important;
  max-width:none!important;
  min-width:0!important;
  min-height:58px!important;
  height:58px!important;
  margin:0!important;
  padding:7px 10px!important;
  gap:1px 8px!important;
  align-content:center!important;
  align-items:center!important;
  border-radius:9px!important;
  box-sizing:border-box!important;
  transform:none!important;
  overflow:hidden!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-icon{
  grid-column:1!important;
  grid-row:1/3!important;
  width:30px!important;
  height:30px!important;
  min-width:30px!important;
  border-radius:8px!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-icon svg{
  width:17px!important;
  height:17px!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept strong{
  grid-column:2!important;
  grid-row:1!important;
  align-self:end!important;
  min-width:0!important;
  margin:0!important;
  font-size:15px!important;
  font-weight:500!important;
  line-height:1.12!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept small{
  grid-column:2!important;
  grid-row:2!important;
  align-self:start!important;
  min-width:0!important;
  margin:1px 0 0!important;
  font-size:11px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Keep the category block close to the three project cards. */
body.wpbbshop-theme .wpbb-v400-projects{
  margin-top:10px!important;
  gap:8px!important;
}
body.wpbbshop-theme .wpbb-v400-products,
body.wpbbshop-theme .wpbb-v400-products + .wpbb-v400-products{
  padding-top:22px!important;
}

@media (max-width:820px){
  body.wpbbshop-theme .wpbb-v400-departments{
    width:calc(100% - 20px)!important;
    padding-top:14px!important;
  }
  body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-auto-rows:58px!important;
    gap:6px!important;
  }
  body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid > .wpbb-v400-dept{
    width:auto!important;
    max-width:none!important;
    height:58px!important;
    min-height:58px!important;
  }
}
@media (max-width:480px){
  body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid{
    grid-template-columns:1fr!important;
    gap:5px!important;
  }
}
