/* WP BB Home & Garden v4.0.16 — final ownership layer. */

/* -------------------------------------------------------------------------
 * HOME: exactly four readable department columns on desktop, no missing slot.
 * ---------------------------------------------------------------------- */
body.wpbbshop-theme.wpbb-v416-home .wpbb-v400-departments,
body.wpbbshop-theme .wpbb-v400-departments{
  width:min(1480px,calc(100% - 48px))!important;
  max-width:1480px!important;
  min-height:0!important;
  height:auto!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-top:16px!important;
  padding-bottom:0!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}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-section-head h2{
  margin:0!important;font-size:clamp(24px,1.75vw,32px)!important;line-height:1.08!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:60px!important;
  gap:7px!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  align-items:stretch!important;
  align-content:start!important;
  justify-content:stretch!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid>.wpbb-v400-dept{
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr)!important;
  grid-template-rows:auto auto!important;
  grid-column:auto!important;
  grid-row:auto!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  height:60px!important;
  min-height:60px!important;
  margin:0!important;
  padding:7px 10px!important;
  gap:1px 9px!important;
  align-content:center!important;
  align-items:center!important;
  box-sizing:border-box!important;
  transform:none!important;
  order:0!important;
  overflow:hidden!important;
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-icon{
  grid-column:1!important;grid-row:1/3!important;width:32px!important;height:32px!important;min-width:32px!important
}
body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept strong{
  grid-column:2!important;grid-row:1!important;min-width:0!important;margin:0!important;
  font-size:13px!important;line-height:1.13!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;min-width:0!important;margin:1px 0 0!important;
  font-size:9.5px!important;line-height:1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
}
body.wpbbshop-theme .wpbb-v400-projects{margin-top:10px!important;gap:8px!important}

/* -------------------------------------------------------------------------
 * CART / CHECKOUT: shipping choices own the complete summary width.
 * ---------------------------------------------------------------------- */
body.woocommerce-cart .llg-cart-summary-card table.shop_table,
body.woocommerce-checkout .woocommerce-checkout-review-order-table{
  width:100%!important;max-width:none!important;table-layout:auto!important
}
body.woocommerce-cart .llg-cart-summary-card tr.woocommerce-shipping-totals.shipping,
body.woocommerce-cart .llg-cart-summary-card tr.shipping,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals.shipping,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.shipping{
  width:100%!important;max-width:none!important
}
body.woocommerce-cart .llg-cart-summary-card tr.woocommerce-shipping-totals.shipping:has(#shipping_method),
body.woocommerce-cart .llg-cart-summary-card tr.shipping:has(#shipping_method),
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals.shipping:has(#shipping_method),
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr.shipping:has(#shipping_method){
  display:block!important
}
body.woocommerce-cart .llg-cart-summary-card tr:has(#shipping_method)>th,
body.woocommerce-cart .llg-cart-summary-card tr:has(#shipping_method)>td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr:has(#shipping_method)>th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr:has(#shipping_method)>td{
  display:block!important;width:100%!important;max-width:none!important;min-width:0!important;
  padding-left:0!important;padding-right:0!important;text-align:left!important;box-sizing:border-box!important
}
body.woocommerce-cart .llg-cart-summary-card tr:has(#shipping_method)>th,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr:has(#shipping_method)>th{padding-bottom:7px!important;border-bottom:0!important}
body.woocommerce-cart .llg-cart-summary-card tr:has(#shipping_method)>td,
body.woocommerce-checkout .woocommerce-checkout-review-order-table tr:has(#shipping_method)>td{padding-top:0!important}
body.woocommerce-cart #shipping_method,
body.woocommerce-cart .woocommerce-shipping-methods,
body.woocommerce-checkout #shipping_method,
body.woocommerce-checkout .woocommerce-shipping-methods{
  display:grid!important;grid-template-columns:1fr!important;gap:8px!important;
  width:100%!important;max-width:none!important;min-width:100%!important;margin:0!important;padding:0!important;box-sizing:border-box!important
}
body.woocommerce-cart #shipping_method>li,
body.woocommerce-cart .woocommerce-shipping-methods>li,
body.woocommerce-checkout #shipping_method>li,
body.woocommerce-checkout .woocommerce-shipping-methods>li{
  display:grid!important;grid-template-columns:20px minmax(0,1fr)!important;gap:8px!important;align-items:start!important;
  width:100%!important;max-width:none!important;min-width:100%!important;margin:0!important;padding:11px 12px!important;
  border:1px solid #dde7e2!important;border-radius:9px!important;background:#fbfdfb!important;box-sizing:border-box!important
}
body.woocommerce-cart #shipping_method>li label,
body.woocommerce-checkout #shipping_method>li label,
body.woocommerce-cart .woocommerce-shipping-methods>li label,
body.woocommerce-checkout .woocommerce-shipping-methods>li label{
  display:block!important;width:100%!important;max-width:none!important;min-width:0!important;margin:0!important;
  white-space:normal!important;text-align:left!important;line-height:1.35!important
}
body.woocommerce-cart .woocommerce-shipping-destination,
body.woocommerce-cart .woocommerce-shipping-calculator,
body.woocommerce-checkout .woocommerce-shipping-destination,
body.woocommerce-checkout .woocommerce-shipping-calculator{width:100%!important;max-width:none!important;text-align:left!important}

/* Checkout should not reserve space for empty notices/toggles. */
body.woocommerce-checkout .woocommerce-notices-wrapper:empty,
body.woocommerce-checkout .woocommerce-form-login-toggle:empty,
body.woocommerce-checkout .woocommerce-form-coupon-toggle:empty{display:none!important;margin:0!important;padding:0!important;height:0!important}

/* UK checkout: do not render irrelevant Latvia locker UI. */
body.wpbb-v415-market-uk.woocommerce-checkout .wpbbshop-parcel-fields{display:none!important}
body.wpbb-v415-market-uk.woocommerce-checkout .wpbbshop-courier-fields{display:block!important;width:100%!important}
body.wpbb-v415-market-uk.woocommerce-checkout .wpbbshop-delivery-fields{width:100%!important;max-width:none!important}

/* -------------------------------------------------------------------------
 * Information pages: use the same wide shell as the storefront.
 * ---------------------------------------------------------------------- */
body.wpbbshop-theme.wpbb-v416-wide-info .wpbbshop-page-shell,
body.wpbbshop-theme.wpbb-v416-wide-info main.wpbbshop-page-shell{
  width:min(1480px,calc(100% - 48px))!important;max-width:1480px!important;margin-left:auto!important;margin-right:auto!important
}
body.wpbbshop-theme.wpbb-v416-wide-info .wpbbshop-page-card,
body.wpbbshop-theme.wpbb-v416-wide-info .entry-content,
body.wpbbshop-theme.wpbb-v416-wide-info .llg-info-pro,
body.wpbbshop-theme.wpbb-v416-wide-info .wpbb-row{
  width:100%!important;max-width:none!important;margin-left:0!important;margin-right:0!important;box-sizing:border-box!important
}
body.wpbbshop-theme.wpbb-v416-wide-info .llg-info-cards{grid-template-columns:repeat(4,minmax(0,1fr))!important}

/* My Account: no inherited spacer rows between navigation items. */
body.woocommerce-account .llg-account-nav ul,
body.woocommerce-account .woocommerce-MyAccount-navigation ul{gap:4px!important;margin:0!important;padding:0!important}
body.woocommerce-account .llg-account-nav li,
body.woocommerce-account .woocommerce-MyAccount-navigation li{min-height:0!important;height:auto!important;margin:0!important;padding:0!important}
body.woocommerce-account .llg-account-nav a,
body.woocommerce-account .woocommerce-MyAccount-navigation a{min-height:40px!important;height:40px!important;margin:0!important}

@media(max-width:980px){
  body.wpbbshop-theme .wpbb-v400-departments{width:calc(100% - 28px)!important}
  body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.wpbbshop-theme.wpbb-v416-wide-info .llg-info-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:560px){
  body.wpbbshop-theme .wpbb-v400-departments{width:calc(100% - 20px)!important}
  body.wpbbshop-theme .wpbb-v400-departments .wpbb-v400-dept-grid{grid-template-columns:1fr!important;gap:5px!important}
  body.wpbbshop-theme.wpbb-v416-wide-info .wpbbshop-page-shell{width:calc(100% - 20px)!important}
  body.wpbbshop-theme.wpbb-v416-wide-info .llg-info-cards{grid-template-columns:1fr!important}
}
