/* Compact approved product links inside the existing article header and home visual. */
.bfap-products {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--bf-ink, #252a30);
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.bfap-products.bfap-products--article {
  width: min(calc(100% - 40px), var(--bf-reading, 780px));
  margin: 16px auto 24px;
}

.bfap-products .bfap-disclosure {
  margin: 10px 0 0;
  padding: 0;
  background: transparent;
  color: var(--bf-muted, #595959);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
}

.bfap-products .bfap-products-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bfap-products .bfap-products-list .bfap-product {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.bfap-products .bfap-product-media {
  display: flex;
  box-sizing: border-box;
  width: 80px;
  height: 80px;
  min-width: 0;
  flex: 0 0 80px;
  margin: 0;
  padding: 4px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bf-line, #d9dde3);
  background: #fff;
}

.bfap-products .bfap-product-media .bfap-product-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  object-fit: contain;
}

.bfap-products .bfap-product-body {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.bfap-products .bfap-product-body .bfap-product-title {
  margin: 0;
  color: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.bfap-products .bfap-product-body .bfap-product-link {
  display: inline-flex;
  box-sizing: border-box;
  width: 128px;
  min-height: 26px;
  max-width: 100%;
  margin: 0;
  padding: 2px 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0 4px;
  border: 1px solid var(--bf-muted, #595959);
  background: #fff;
  color: var(--bf-ink, #252a30);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
}

.bfap-products .bfap-product-body .bfap-product-link:focus-visible {
  outline: 2px solid var(--bf-ink, #252a30);
  outline-offset: 3px;
}

.bfap-products .bfap-product-link .bfap-product-new-window {
  font-size: 12px;
  font-weight: 400;
}

.bfap-products.bfap-products--home {
  margin: 16px 0 0;
}

.bf-home-intro > .bf-home-intro__media {
  width: 100%;
  min-width: 0;
  max-width: 360px;
}

.bfap-products.bfap-products--home .bfap-disclosure {
  margin: 10px 0 0;
  font-size: 12px;
}

.bfap-products.bfap-products--home .bfap-products-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.bfap-products.bfap-products--home .bfap-products-list .bfap-product {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  text-align: center;
}

.bfap-products.bfap-products--home .bfap-product-media {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
  align-self: center;
}

.bfap-products.bfap-products--home .bfap-product-body {
  align-items: center;
}

.bfap-products.bfap-products--home .bfap-product-body .bfap-product-title {
  font-size: 14px;
}

.bfap-products.bfap-products--home .bfap-product-body .bfap-product-link {
  width: 100%;
  margin-top: auto;
  padding-inline: 4px;
  white-space: nowrap;
}

.bfap-products.bfap-products--home .bfap-product-link .bfap-product-new-window {
  display: none;
}

@media (max-width: 639px), (pointer: coarse) {
  .bfap-products .bfap-product-body .bfap-product-link {
    min-height: 28px;
  }
}

@media (max-width: 639px) {
  .bfap-products.bfap-products--article .bfap-products-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The existing mobile theme still hides the figure; the separate product area remains visible. */
@media (max-width: 768px) {
  .bfap-products.bfap-products--article {
    width: min(calc(100% - 36px), var(--bf-reading, 780px));
  }

  .bf-home-intro > .bf-home-intro__media {
    max-width: none;
    order: 2;
  }
}
