/* BeDOM Leo Parts Bridge - isolated styles only. */
#bdleopartsbridge-category-results.bdlb-category-results {
  margin: 0 0 2rem;
}

#bdleopartsbridge-category-results .bdlb-category-results__header {
  margin-bottom: 1.5rem;
}

#bdleopartsbridge-category-results .bdlb-category-results__vehicle {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

#bdleopartsbridge-category-results .bdlb-category-results__intro > :last-child {
  margin-bottom: 0;
}

#bdleopartsbridge-category-results .bdlb-category-results__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 2.25rem;
}

#bdleopartsbridge-category-results .bdlb-category-card {
  min-width: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dedede;
  background: #fff;
}

#bdleopartsbridge-category-results .bdlb-category-card__image-wrap {
  min-height: 150px;
  padding: 1.35rem 1rem .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bdleopartsbridge-category-results .bdlb-category-card__image {
  width: auto;
  max-width: 100%;
  max-height: 145px;
  object-fit: contain;
}

#bdleopartsbridge-category-results .bdlb-category-card__body {
  flex: 1 1 auto;
  padding: .75rem 1.25rem 1.25rem;
}

#bdleopartsbridge-category-results .bdlb-category-card__title {
  margin: 0 0 .55rem;
}

#bdleopartsbridge-category-results .bdlb-category-card__count,
#bdleopartsbridge-category-results .bdlb-category-tree__count {
  margin-left: .18rem;
  font-size: .92em;
  font-weight: inherit;
  color: inherit;
}

#bdleopartsbridge-category-results .bdlb-category-tree {
  margin: .25rem 0 0;
  padding-left: 0;
  list-style: none;
}

#bdleopartsbridge-category-results .bdlb-category-tree .bdlb-category-tree {
  margin-top: .15rem;
  padding-left: .9rem;
}

#bdleopartsbridge-category-results .bdlb-category-tree__item {
  margin: .18rem 0;
  padding: 0;
  line-height: 1.25;
}

#bdleopartsbridge-category-results .bdlb-category-tree__item::before {
  display: none;
}

.bdlb-filtered-category-header {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid #dedede;
  background: #fff;
}

.bdlb-filtered-category-header .h1 {
  margin: 0 0 .35rem;
}

.bdlb-filtered-category-header__vehicle {
  margin: 0;
}

.bdlb-filtered-category-header__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}

body#index .container-filter,
body#category .container-filter,
body.bdleopartsbridge-category .container-filter {
  margin-bottom: 1.5rem;
}

@media (max-width: 991px) {
  #bdleopartsbridge-category-results .bdlb-category-results__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .bdlb-filtered-category-header {
    display: block;
  }

  .bdlb-filtered-category-header__actions {
    margin-top: .85rem;
    justify-content: flex-start;
  }
}

@media (max-width: 575px) {
  #bdleopartsbridge-category-results .bdlb-category-results__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  #bdleopartsbridge-category-results .bdlb-category-card__image-wrap {
    min-height: 115px;
    padding-top: 1rem;
  }

  .bdlb-filtered-category-header__actions .btn {
    width: 100%;
    text-align: center;
  }
}


.bdlb-compatible-subcategories {
  margin: 0 0 2rem;
  padding: 1rem 0 0;
}

.bdlb-compatible-subcategories__header {
  margin-bottom: 1rem;
}

.bdlb-compatible-subcategories__header .h2 {
  margin: 0;
}

.bdlb-compatible-subcategories__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.bdlb-compatible-subcategory {
  min-width: 0;
  padding: .85rem;
  border: 1px solid #dedede;
  background: #fff;
  text-align: center;
}

.bdlb-compatible-subcategory__image-wrap {
  min-height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .65rem;
}

.bdlb-compatible-subcategory__image {
  width: auto;
  max-width: 100%;
  max-height: 95px;
  object-fit: contain;
}

.bdlb-compatible-subcategory__title {
  margin: 0;
  font-size: 1rem;
}

.bdlb-compatible-subcategory__count {
  white-space: nowrap;
}

@media (max-width: 991px) {
  .bdlb-compatible-subcategories__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .bdlb-compatible-subcategories__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .bdlb-compatible-subcategories__grid {
    grid-template-columns: 1fr;
  }
}

/* 1.2.6 — horizontal category filter alignment and reliable hydration.
   The outer host spans the section, while the inner Bootstrap/theme container
   uses exactly the same responsive width as #subcategories and the product
   listing. The sidebar copy remains independent. */
body#category #left-column .container-filter,
body.page-category #left-column .container-filter {
  width: 100%;
  margin: 1.5rem 0 0;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

body#category .bdlb-category-filter-host,
body.page-category .bdlb-category-filter-host {
  clear: both;
  width: 100%;
  margin: 1.5rem 0 1.75rem;
}

body#category .bdlb-category-filter-host__inner,
body.page-category .bdlb-category-filter-host__inner {
  margin-left: auto;
  margin-right: auto;
}

body#category .bdlb-category-filter-host__inner > .wrapper,
body.page-category .bdlb-category-filter-host__inner > .wrapper,
body#category .bdlb-category-filter-host__inner > .container-filter,
body.page-category .bdlb-category-filter-host__inner > .container-filter {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  box-sizing: border-box;
}

body#category .bdlb-category-filter-host .container-filter,
body.page-category .bdlb-category-filter-host .container-filter {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

body#category .bdlb-category-filter-host .bdlb-category-filter-duplicate,
body.page-category .bdlb-category-filter-host .bdlb-category-filter-duplicate {
  display: none !important;
}

/* Prevent interaction during the very short serial restoration of the four
   dependent dropdowns. This avoids a click while Leo Parts Filter is still
   rebuilding a downstream select. */
body#category .container-filter[data-bdlb-hydrating="1"] .leo-partsfilter-submit-1,
body.page-category .container-filter[data-bdlb-hydrating="1"] .leo-partsfilter-submit-1 {
  pointer-events: none;
}

@media (max-width: 767px) {
  body#category #left-column .container-filter,
  body.page-category #left-column .container-filter {
    margin-top: 1rem;
  }

  body#category .bdlb-category-filter-host,
  body.page-category .bdlb-category-filter-host {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
  }
}
