/*
 * The catalogue pages: Sheet Music, Backing Tracks, Educational.
 * No hex values: colours come from tokens.css.
 */

/* Ordinary pages hold their text to a reading measure; a grid of products is
   not text. Same undoing as the account page and the shop. */
.bp-catalogue .bp-container > * { max-width: none; }

.bp-catalogue-intro {
  font-size: 17px;
  line-height: 1.65;
  color: var(--bp-muted);
  max-width: 60ch;
  margin: 0 0 28px;
}

.bp-catalogue-empty {
  font-size: 16px;
  color: var(--bp-muted);
  padding: 34px 0 60px;
  margin: 0;
}

.bp-catalogue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.bp-catalogue-search {
  flex: 1 1 260px;
  max-width: 360px;
  box-sizing: border-box;
  font-family: var(--bp-body);
  font-size: 15px;
  padding: 11px 14px;
  border: 1px solid var(--bp-hair);
  border-radius: var(--bp-radius-btn);
  background: var(--bp-page);
  color: var(--bp-ink);
}
.bp-catalogue-search:focus-visible {
  outline: 2px solid var(--bp-gold-deep);
  outline-offset: 1px;
}

.bp-catalogue-sort {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--bp-hair);
  border-radius: 999px;
  background: var(--bp-page);
}

.bp-sort-btn {
  font-family: var(--bp-body);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--bp-muted);
  cursor: pointer;
}
.bp-sort-btn.is-active {
  background: var(--bp-ink);
  color: var(--bp-page);
}

.bp-catalogue-count,
.bp-catalogue-none {
  font-size: 13.5px;
  color: var(--bp-muted);
  margin: 0 0 22px;
}
.bp-catalogue-none[hidden] { display: none; }

.bp-catalogue-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
  margin: 0 0 70px;
}

.bp-product {
  display: flex;
  flex-direction: column;
  background: var(--bp-page);
  border: 1px solid var(--bp-hair);
  border-radius: var(--bp-radius);
  overflow: hidden;
}
.bp-product[hidden] { display: none; }
.bp-product:hover { border-color: var(--bp-gold-deep); }

/* The theme underlines links inside page copy, which is right for a sentence
   and wrong for a product card: the whole card is the link. */
.bp-product-link,
.bp-product-link:hover,
.bp-product-title {
  text-decoration: none;
}

.bp-product-link {
  display: block;
  color: inherit;
  flex: 1;
}
.bp-product-link:hover .bp-product-title { color: var(--bp-gold-deep); }

.bp-product-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bp-band);
}
.bp-product-image--blank { aspect-ratio: 1; }

.bp-product-title {
  display: block;
  padding: 15px 16px 0;
  font-family: var(--bp-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  color: var(--bp-ink);
}

.bp-product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 14px 16px 16px;
}

.bp-product-price {
  font-family: var(--bp-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--bp-ink);
}
.bp-product-price del { color: var(--bp-muted); font-weight: 400; font-size: 15px; }

.bp-product-buy {
  font-size: 13px;
  padding: 9px 16px;
  white-space: nowrap;
}

/* WooCommerce adds its own View cart link after a successful add. The basket
   slides open at that moment and already offers View basket. */
.bp-product .added_to_cart { display: none; }

@media (max-width: 560px) {
  .bp-catalogue-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .bp-product-title { font-size: 14.5px; }
  .bp-product-foot { padding: 12px; }
  .bp-product-price { font-size: 17px; }
}
