/* Shared storefront/editor catalog layout. All colors inherit the published palette. */
body .catalog-toolbar { display: block; }
body .catalog-heading { display: none; }
body .catalog-controls { display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
body .catalog-discovery-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; border-bottom: 1px solid var(--line); }
body .catalog-views, body .catalog-filter-row, body .catalog-quick-filters { display: flex; align-items: center; gap: 8px; min-width: 0; }
body .catalog-views { flex: 0 0 auto; }
body .catalog-views button { position: relative; min-height: 49px; padding: 0 10px; border: 0; background: transparent; color: var(--muted); font: 750 .75rem var(--sans); white-space: nowrap; cursor: pointer; }
body .catalog-views button.active { color: var(--ink); }
body .catalog-views button.active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 4px; background: var(--red); }
body .catalog-views .catalog-random { margin-left: 5px; padding-left: 17px; border-left: 1px solid var(--line); }
body .catalog-filter-row { width: auto; flex: 1 1 auto; justify-content: flex-end; overflow: visible; padding: 0; }
body .catalog-quick-filters { gap: 6px; }
body .catalog-quick-filters button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); font: 750 .7rem var(--sans); white-space: nowrap; cursor: pointer; }
body .catalog-quick-filters button::after { content: '⌄'; margin-left: 8px; color: var(--muted); }
body .catalog-quick-filters button:hover, body .catalog-quick-filters button:focus-visible { border-color: var(--red); outline: 0; }
body .catalog-filter-row #savedFilter { min-height: 38px; height: 38px; white-space: nowrap; }
body .catalog-filter-row #sortMenu { width: auto; min-width: 135px; margin-left: auto; }
body .catalog-filter-row #sortMenu .tool-pill { height: 38px; white-space: nowrap; }
body .catalog-search-row { display: flex; align-items: center; gap: 16px; min-width: 0; }
body .catalog-suggested { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; overflow-x: auto; scrollbar-width: none; }
body .catalog-suggested::-webkit-scrollbar { display: none; }
body .catalog-suggested span { margin-right: 5px; flex: 0 0 auto; color: var(--muted); font-size: .7rem; white-space: nowrap; }
body .catalog-suggested button { min-height: 30px; padding: 0 11px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--ink); font: 700 .68rem var(--sans); cursor: pointer; }
body .catalog-suggested button.active { border-color: var(--red); color: var(--red); }
body .catalog-search-row .search-wrap { flex: 0 1 37%; min-width: 265px; }
body .catalog-search-row .catalog-search { height: 42px; }
body .catalog-search-row #filtersMenu { display: block; position: static; width: 0; flex: 0 0 0; }
body .catalog-search-row #filtersMenu > .tool-pill { display: none; }
body .catalog-search-row #filtersMenu .catalog-filters-menu { position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; z-index: 120; width: min(460px, calc(100vw - 32px)); max-height: min(680px, 82vh); transform: translate(-50%, -50%); }
body .catalog-collection-legacy { display: none; }
body .filter-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
body .filter-tags-label { color: var(--muted); font-size: .7rem; font-weight: 750; }
body .filter-tag { color: var(--ink); border-radius: 999px; background: var(--surface-soft); cursor: pointer; }
body .filter-reset { min-height: 28px; padding: 0 6px; border: 0; background: transparent; color: var(--muted); font: 700 .68rem var(--sans); text-decoration: underline; cursor: pointer; }
body .catalog-head { display: none; }
body .catalog-grid, body.storefront-compact .catalog-grid { grid-template-columns: 48px minmax(220px, 1fr) minmax(240px, 32%) 43px 39px 34px 34px 110px; column-gap: 10px; }
body .catalog-list { max-height: none; }
body .track-row { min-height: 73px; padding-inline: 16px; }
body .track-copy { min-width: 0; }
body .track-title-link { max-width: 100%; }
body .track-row .track-artist-tags { display: flex; flex-wrap: nowrap; overflow: hidden; }
body .track-row .row-wave { min-width: 0; width: 100%; }
body .track-row .time-cell, body .track-row .bpm-cell { display: block; }
body .track-row .key-cell { display: none; }
body .track-row .license-open { width: 100%; padding-inline: 5px; }
body .catalog-filter-sheet-head { display: flex; align-items: center; justify-content: space-between; }
body .catalog-filter-close { width: 34px !important; min-height: 34px !important; padding: 0 !important; border-radius: 50% !important; font-size: 1.4rem !important; }
body .catalog-filter-sheet-actions { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
body .catalog-filter-sheet-actions #resetCatalogFilters { flex: 1; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink); }
body .catalog-filter-sheet-actions #applyCatalogFilters { flex: 2; margin: 0; border-radius: 9px; color: var(--palette-accent-text, #fff); }
body .catalog-filters-menu { color: var(--ink); }
body .catalog-filters-menu details { color: var(--ink); }
body .catalog-filters-menu .catalog-filter-options { display: flex; flex-wrap: wrap; gap: 6px; max-height: none; padding: 0 0 12px; }
body .catalog-filters-menu .catalog-filter-options button { width: auto; min-height: 34px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); }
body .catalog-filters-menu .catalog-filter-options button.active, body .catalog-filters-menu .bpm-range-option.active { border-color: var(--red); background: var(--red); color: var(--palette-accent-text, #fff); }
body .catalog-filters-menu .catalog-filter-options button.active::after { display: none; }
body .catalog-filters-menu[hidden] { display: none !important; }
body .catalog-filters-menu:not([hidden]) { display: flex; flex-direction: column; }
body .catalog-filter-sheet-body { overflow-y: auto; min-height: 0; }
body .catalog-search-row { position: relative; }

@media (max-width: 1250px) {
  body .catalog-discovery-row { flex-wrap: wrap; }
  body .catalog-filter-row { justify-content: flex-start; flex-wrap: wrap; }
  body .catalog-grid, body.storefront-compact .catalog-grid { grid-template-columns: 44px minmax(170px, 1fr) minmax(150px, 30%) 42px 36px 30px 30px 95px; column-gap: 7px; }
}
@media (max-width: 980px) {
  body .catalog-quick-filters { display: none; }
  body .catalog-filter-row { flex: 0 0 auto; margin-left: auto; }
  body .catalog-search-row #filtersMenu { display: block; position: relative; width: auto; flex: 0 0 auto; }
  body .catalog-search-row #filtersMenu > .tool-pill { display: flex; }
  body .catalog-search-row #filtersMenu .tool-pill { min-height: 42px; border-color: var(--red); background: var(--red); color: var(--palette-accent-text, #fff); }
  body .catalog-search-row .search-wrap { flex: 1 1 auto; min-width: 0; }
  body .catalog-suggested { flex: 1 0 100%; order: 2; }
  body .catalog-search-row { flex-wrap: wrap; gap: 9px; }
  body .catalog-grid, body.storefront-compact .catalog-grid, body .track-row.catalog-grid { grid-template-columns: 46px minmax(0, 1fr) 32px 90px; }
  body .track-row .track-artist-tags, body .track-row .row-wave, body .track-row .time-cell, body .track-row .bpm-cell { display: none; }
  body .catalog-filter-sheet-body { overflow-y: auto; max-height: calc(75dvh - 155px); }
  body .catalog-filters-menu { display: flex; flex-direction: column; padding: 16px; }
  body .catalog-search-row #filtersMenu .catalog-filters-menu { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-height: 80dvh; transform: none; }
  body .catalog-filter-sheet-actions { position: sticky; bottom: 0; background: var(--surface); }
}
@media (max-width: 700px) {
  body .catalog-controls { gap: 10px; }
  body .catalog-discovery-row { gap: 2px; }
  body .catalog-views { width: 100%; justify-content: flex-start; gap: 13px; overflow-x: auto; scrollbar-width: none; }
  body .catalog-views::-webkit-scrollbar { display: none; }
  body .catalog-views button { min-height: 40px; padding-inline: 3px; font-size: .68rem; }
  body .catalog-views .catalog-random { margin-left: 0; padding-left: 14px; }
  body .catalog-filter-row { display: flex; width: 100%; flex: 0 0 100%; justify-content: flex-end; padding: 0 0 6px; }
  body .catalog-filter-row .catalog-quick-filters, body .catalog-filter-row #savedFilter { display: none; }
  body .catalog-filter-row #sortMenu { width: auto !important; min-width: 0; }
  body .catalog-filter-row #sortMenu .tool-pill { min-height: 33px; height: 33px; padding: 0 10px; font-size: .68rem; }
  body #sortMenuLabel, body.storefront-compact #sortMenuLabel { font-size: .68rem; }
  body #sortMenuLabel::after, body.storefront-compact #sortMenuLabel::after { content: none; }
  body .catalog-search-row { display: flex; flex-direction: column; align-items: stretch; }
  body .catalog-search-row .search-wrap { flex: 0 0 auto; width: 100%; }
  body .catalog-search-row .catalog-search { height: 42px; }
  body .catalog-search-row .catalog-suggested { order: 2; width: 100%; flex: 0 0 auto; }
  body .catalog-search-row #filtersMenu { position: static; width: 0; height: 0; padding: 0; margin: 0; }
  body .catalog-search-row #filtersMenu > .tool-pill { position: fixed; z-index: 95; left: 50%; bottom: 82px; transform: translateX(-50%); min-height: 43px; padding: 0 23px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.3); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility .18s ease; }
  body.catalog-filters-in-view:not(.beat-page-view) .catalog-search-row #filtersMenu > .tool-pill { opacity: 1; visibility: visible; pointer-events: auto; }
  body .catalog-search-row #filtersMenu.open > .tool-pill { opacity: 0; visibility: hidden; pointer-events: none; }
  body .catalog-suggested span { font-size: .65rem; }
  body .catalog-suggested button { min-height: 28px; }
  body .track-row.catalog-grid, body.storefront-compact .track-row.catalog-grid, body:not(.beat-page-view):not(.storefront-compact) .track-row.catalog-grid { min-height: 70px; grid-template-columns: 44px minmax(0, 1fr) 30px 88px; grid-template-rows: 24px 20px; grid-template-areas: 'cover copy save price' 'cover facts save price'; gap: 1px 8px; padding: 10px; }
  body .track-row .mobile-cover { width: 44px; height: 44px; }
  body .track-row .track-copy { grid-area: copy; min-width: 0; align-self: end; }
  body .track-row .mobile-facts { grid-area: facts; min-width: 0; align-self: start; }
  body .track-row .save-icon { grid-area: save; width: 30px; }
  body .track-row .download-icon { display: none !important; }
  body .track-row .license-open { grid-area: price; width: 88px; min-width: 0; }
  body .track-row .track-artist-tags { display: none; }
  body .track-title-link { font-size: .86rem; }
  body .track-row .license-open { min-height: 38px; font-size: .67rem; }
  body .filter-tags { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  body .filter-tags > * { flex: 0 0 auto; }
  body:has(#filtersMenu.open) .sticky-player { visibility: hidden; }
}
