/* Collection catalogs inherit their heading, filters and cards from catalog-refresh.css. */
.collection-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100%, 440px);
  margin: 0 auto 24px;
  color: var(--sf-muted);
  font: 500 13px/1.6 "Manrope", sans-serif;
  text-align: left;
}

.collection-search input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--sf-line);
  border-radius: 12px;
  font: inherit;
}

.collection-search input:focus-visible {
  outline: 2px solid var(--sf-rose-bright);
  outline-offset: 3px;
}

/* Show the complete audio card, including its title and signature, on every screen. */
.collection-audio .template-card .thumb.card-preview-button {
  aspect-ratio: 10 / 9;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  transform: none;
}

/* Keep portrait stationery intact and its purchase details compact. */
.collection-handwritten .template-grid {
  align-items: start;
}

.collection-handwritten .template-card .thumb.card-preview-button {
  aspect-ratio: 45 / 64;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  transform: none;
}

.collection-handwritten .template-card .template-meta {
  flex: 0 0 auto;
  padding: 10px 12px 12px;
}

.collection-handwritten .template-card .template-meta h3 {
  min-height: 0;
  margin-bottom: 6px;
}

.collection-handwritten .template-card .template-meta-row {
  min-height: 0;
  margin-top: 0;
  margin-bottom: 8px;
}

/* Letter story previews are portrait sheets; keep every edge in view. */
.collection-letter-story .template-grid {
  align-items: start;
}

@media (min-width: 1200px) {
  .collection-letter-story .template-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.collection-letter-story .template-card .thumb.card-preview-button {
  aspect-ratio: 3 / 4;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  transform: none;
}

.collection-letter-story .template-card .template-meta {
  flex: 0 0 auto;
  padding: 8px 10px;
}

.collection-letter-story .template-card .template-meta h3 {
  min-height: 0;
  margin-bottom: 4px;
}

.collection-letter-story .template-card .template-meta-row {
  min-height: 0;
  margin-top: 0;
  margin-bottom: 6px;
}

/* Keep the full bouquet and its envelope visible, including on hover. */
.collection-bouquet .template-card .thumb,
.collection-bouquet .template-card .thumb.card-preview-button {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 25 / 33;
  flex-shrink: 0;
  background-size: contain;
  background-repeat: no-repeat;
  transform: none;
}

.collection-bouquet .template-card .thumb > img {
  object-fit: contain !important;
}

/* Show the same artwork colors as the editor, including hover and selection. */
.collection-bouquet .template-card .thumb-photo,
.collection-bouquet .template-card:hover .thumb-photo,
.collection-bouquet .template-card.selected .thumb-photo {
  filter: none;
}
.collection-bouquet .template-card .thumb-photo::after {
  content: none;
  background: none;
}
