/*
 * Builder directory sections: Pricing Partners / Builders headers, the shared
 * card grid, and the favorites row. Loaded after post-grid-styles.min.css and
 * product-pricing-badge-v2.css.
 */

/* --------------------------------------------------------------------------
 * Section headers
 * ------------------------------------------------------------------------ */
.vz-builder-section,
.vz-section-header,
.vz-builder-grid .am_grid_col,
.vz-builder-grid .am_single_grid,
.vz-builder-grid .am_thumb,
.vz-builder-grid .am_cont,
.favorite_builders_container,
.favorite_builders_container_result,
.favorite_builder,
.favorite_builder_container {
  box-sizing: border-box;
}

.vz-builder-section {
  clear: both;
}

.vz-section-header {
  max-width: 1180px;
  margin: 56px auto 34px;
  padding: 0 16px;
  text-align: center;
}

.vz-section-header__title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 0;
  color: #333;
  font-size: 44px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-transform: none;
}

.vz-section-header__text {
  flex: 0 0 auto;
  white-space: nowrap;
}

.vz-section-header__line {
  flex: 1 1 0;
  max-width: 340px;
  height: 9px;
  color: #333;
}

.vz-section-header__line svg {
  display: block;
  width: 100%;
  height: 100%;
}

.vz-section-header__line--right svg {
  transform: scaleX(-1);
}

.vz-section-header__subtitle {
  max-width: 500px;
  margin: 8px auto 0;
  color: #333;
  font-size: 16px;
  line-height: 1.4;
}

.vz-section-header__subtitle a {
  color: #998b7b;
  font-weight: 400;
  text-decoration: underline;
}

.vz-section-header__subtitle a:hover,
.vz-section-header__subtitle a:focus {
  color: #454545;
}

@media (max-width: 767px) {
  .vz-section-header {
    margin: 40px auto 24px;
  }

  .vz-section-header__title {
    gap: 12px;
    font-size: 30px;
  }

  .vz-section-header__line {
    max-width: 110px;
    height: 6px;
  }
}

/* While checkbox filters are active the filtered list (moved above Pricing
 * Partners) replaces the A-Z grid, so the grid and its header are hidden;
 * Pricing Partners stays visible below the results. The theme forces
 * `#builder-posts.am_post_grid` to display:grid !important on the All Builders
 * page, so this needs !important and higher specificity. */
body.vz-builders-filtering #builder-posts.am_post_grid.vz-builder-grid,
body.vz-builders-filtering .vz-builder-section--builders .vz-section-header,
body.vz-builders-filtering .vz-section-header--builders {
  display: none !important;
}

/* Live search left no visible cards in this section. */
.vz-builder-section.vz-section--empty {
  display: none;
}

/* Filter chips + AJAX results get moved above Pricing Partners by the plugin JS. */
.vz-filter-results-host {
  max-width: 1180px;
  margin: 0 auto;
  clear: both;
}

.vz-filter-results-host .clear_filters:empty {
  padding: 0;
}

.vz-filter-results-host .asrafp-filter-result.showing {
  margin-top: 30px;
}

/* --------------------------------------------------------------------------
 * Shared builder card grid (A-Z, filtered results, Pricing Partners)
 * ------------------------------------------------------------------------ */
.am_post_grid.vz-builder-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 34px;
  float: none;
  clear: both;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 1023px) {
  .am_post_grid.vz-builder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 629px) {
  .am_post_grid.vz-builder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Beats post-grid-styles.min.css `.am__col-3 .am_grid_col` (20px radius, #707070 border, shadow). */
.am_post_grid.vz-builder-grid .am_grid_col,
.am_post_grid.vz-builder-grid .am_grid_col.shown {
  position: relative;
  float: none;
  clear: none;
  width: auto !important;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.vz-builder-grid .am_grid_col.builder-search-hidden {
  display: none !important;
}

.vz-builder-grid .am_single_grid {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 315px;
  border: 1px solid #e6e6e6;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  overflow: visible;
}

.vz-builder-grid .am_thumb {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 205px;
  padding: 46px 20px 8px;
  border: 0;
  overflow: visible;
}

.vz-builder-grid .am_thumb_link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  box-shadow: none;
}

.vz-builder-grid .am_thumb img {
  display: block;
  width: auto;
  height: auto;
  max-width: 86%;
  max-height: 170px;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.vz-builder-grid .am_cont {
  display: flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 96px;
  padding: 8px 16px 22px;
  text-align: center;
}

.vz-builder-grid .am_cont a {
  text-decoration: none;
}

.vz-builder-grid .am__title {
  margin: 0;
  color: #333;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.vz-builder-grid .am_grid_col .am_cont .excerpt {
  margin: 0;
}

/* Favorite star: top-left of the card, outside the logo link. */
.vz-builder-grid .builder-favorite-form {
  position: static;
  margin: 0;
}

.vz-builder-grid .am_thumb .favorite-builder-button,
.vz-builder-grid .am_thumb .star-button {
  position: absolute;
  top: 9px;
  left: 6px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #626262;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.vz-builder-grid .am_thumb .favorite-builder-button:hover,
.vz-builder-grid .am_thumb .favorite-builder-button:focus,
.vz-builder-grid .am_thumb .star-button:hover,
.vz-builder-grid .am_thumb .star-button:focus {
  background: none;
  border: 0;
  box-shadow: none;
  outline: none;
}

.vz-builder-grid .am_thumb .favorite-builder-button:focus-visible,
.vz-builder-grid .am_thumb .star-button:focus-visible {
  outline: 2px solid #998b7b;
  outline-offset: 2px;
}

.vz-builder-grid .addingFaves {
  position: absolute;
  top: 44px;
  left: 8px;
  z-index: 5;
  display: none;
  color: #626262;
  font-size: 12px;
  line-height: 1.2;
}

/* --------------------------------------------------------------------------
 * Favorites row (top of the All Builders page)
 * ------------------------------------------------------------------------ */
.favorite_builders_container,
.favorite_builders_container_result {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1180px;
  margin: 24px auto 8px;
  padding: 0;
}

.favorite_builders_container:empty,
.favorite_builders_container_result:empty {
  display: none;
  margin: 0;
}

.favorite_builders_container .favorite_builder,
.favorite_builders_container_result .favorite_builder {
  position: relative;
  display: flex;
  float: none;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 160px;
  margin: 0;
  border: 1px solid #e6e6e6;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.favorite_builders_container .favorite_builder_container,
.favorite_builders_container_result .favorite_builder_container {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 26px 14px 14px;
  text-align: center;
}

.favorite_builder .builder-favorite-form {
  position: static;
  margin: 0;
}

.favorite_builders_container .favorite_builder .favorite-builder-button,
.favorite_builders_container_result .favorite_builder .favorite-builder-button {
  position: absolute;
  top: 6px;
  left: 8px;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #626262;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.favorite_builder .favorite_builder_link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.favorite_builders_container .favorite_builder img,
.favorite_builders_container_result .favorite_builder img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
}

.favorite_builder .addingFaves {
  position: absolute;
  right: 0;
  bottom: 4px;
  left: 0;
  display: none;
  color: #626262;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

@media (max-width: 629px) {
  .favorite_builders_container .favorite_builder,
  .favorite_builders_container_result .favorite_builder {
    width: calc(50% - 8px);
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
