/* ---------- catalog page: tracklist edition ---------- */
.catalog-page {
  padding-top: 24px;
  padding-bottom: 48px;
}

/* hero */
.hero.catalog-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 2rem;
  margin-bottom: 28px;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 4px solid var(--ink);
  border-radius: var(--r);
  background:
    radial-gradient(60% 50% at 85% 15%, rgba(255,62,165,.35), transparent 70%),
    radial-gradient(50% 60% at 10% 90%, rgba(212,255,63,.16), transparent 70%),
    var(--ink);
  box-shadow: 12px 12px 0 var(--pink);
}

.catalog-hero .hero-txt { position: relative; z-index: 1; }
.catalog-hero .eyebrow { margin-bottom: 1.1rem; }

.catalog-hero h1 {
  font-family:var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 4.6vw, 3.7rem); white-space: nowrap;
  line-height: .98;
  text-transform: uppercase;
  letter-spacing: -.02em;
  color: var(--paper);
  margin: 0;
}

.catalog-hero h1 .row { display: block; overflow: hidden; padding-bottom: .06em; }
.catalog-hero h1 .fill { color: var(--lime); text-shadow: .04em .04em 0 var(--pink); }
.catalog-hero h1 .stroke { color: transparent; -webkit-text-stroke: 3px var(--paper); }

.catalog-hero .lead { max-width: 34rem; margin-top: 1.1rem; }

.cat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.3rem;
}

.cat-stats .stat {
  font: 800 .72rem/1 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .55em 1em;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.cat-stats .stat.lime { background: var(--lime); }
.cat-stats .stat b { font-weight: 900; }

/* decorative mono panel */
.cat-hero-panel {
  position: relative;
  z-index: 1;
  background: #101016;
  border: 2px solid rgba(255,253,245,.18);
  border-radius: 14px;
  padding: 16px 18px;
  font: 600 .74rem/1.9 ui-monospace, 'SF Mono', Menlo, monospace;
  color: rgba(255,253,245,.75);
  transform: rotate(1.2deg);
  box-shadow: 8px 8px 0 rgba(0,0,0,.45);
}

.cat-hero-panel .ph-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
  overflow: hidden;
}

.cat-hero-panel .ph-row.head { color: var(--lime); text-transform: uppercase; letter-spacing: .1em; }
.cat-hero-panel .ph-row { font-family: var(--font-mono); font-size: .78rem; }
.cat-hero-panel .ph-row .dim { color: rgba(255,253,245,.35); }
.cat-hero-panel .ph-eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.cat-hero-panel .ph-eq i { width: 3px; background: var(--lime); animation: catEq 0.9s ease-in-out infinite; }
.cat-hero-panel .ph-eq i:nth-child(2) { animation-delay: .2s; }
.cat-hero-panel .ph-eq i:nth-child(3) { animation-delay: .4s; }
@keyframes catEq { 0%,100% { height: 4px; } 50% { height: 12px; } }

/* controls */
.catalog-controls { margin-bottom: 8px; }

.catalog-controls .title { margin-bottom: 14px; }

.cat-search-row { position: relative; margin-bottom: 10px; }

#search.cat-search {
  width: 100%;
  box-sizing: border-box;
  background: #16161f;
  border: 3px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 5px 0 var(--ink);
  color: var(--paper);
  padding: 15px 18px 15px 48px;
  font: 700 1rem 'Montserrat', sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

#search.cat-search::placeholder { color: rgba(255,253,245,.35); font-weight: 600; }
#search.cat-search:focus { border-color: var(--lime); box-shadow: 5px 5px 0 rgba(212,255,63,.35); }

.cat-search-row .s-ic {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,253,245,.4);
  pointer-events: none;
}

.track-count {
  font: 700 .72rem/1 ui-monospace, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,253,245,.45);
  margin: 14px 2px 10px;
}

/* tracklist */
#tracks.cards {
  display: block;
  border-top: 2px solid rgba(255,253,245,.18);
}

.cat-row {
  display: grid;
  grid-template-columns: 40px 46px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 8px;
  border-bottom: 1px dotted rgba(255,253,245,.25);
  transition: background .15s;
}

.cat-row:hover { background: rgba(212,255,63,.045); }
.cat-row.is-playing { background: rgba(212,255,63,.08); }
.cat-row.is-playing .cat-title { color: var(--lime); }

.cat-num {
  font: 700 .74rem/1 ui-monospace, Menlo, monospace;
  color: rgba(255,253,245,.35);
  text-align: right;
}

.cat-play {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--lime);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0,0,0,.6);
  transition: transform .12s, box-shadow .12s;
  padding: 0;
  flex-shrink: 0;
}

.cat-play:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 rgba(0,0,0,.6); }
.cat-play:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,.6); }
.cat-play svg { width: 16px; height: 16px; }

.cat-main { min-width: 0; }

.cat-title {
  font: 800 1rem/1.25 'Montserrat', sans-serif;
  color: var(--paper);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-sub {
  font: 600 .78rem/1.4 'Montserrat', sans-serif;
  color: rgba(255,253,245,.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cat-sub .ver {
  font: 700 .66rem/1 ui-monospace, Menlo, monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .3em .6em;
  border: 1px solid rgba(255,253,245,.25);
  border-radius: 6px;
  color: rgba(255,253,245,.6);
}

.cat-sub .ver.is-owned { border-color: var(--lime); color: var(--lime); }

/* equalizer indicator */
.cat-eq {
  display: none;
  gap: 2.5px;
  align-items: flex-end;
  height: 14px;
  flex-shrink: 0;
}

.cat-row.is-playing .cat-eq { display: inline-flex; }
.cat-eq i { width: 3px; background: var(--lime); animation: catEq 0.9s ease-in-out infinite; border-radius: 2px; }
.cat-eq i:nth-child(2) { animation-delay: .18s; }
.cat-eq i:nth-child(3) { animation-delay: .36s; }
.cat-eq i:nth-child(4) { animation-delay: .54s; }

/* right block: meta + buy */
.cat-side {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cat-kbps {
  font: 700 .7rem/1 ui-monospace, Menlo, monospace;
  color: rgba(255,253,245,.45);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.cat-price {
  font: 900 .95rem/1 'Montserrat', sans-serif;
  color: var(--lime);
  min-width: 76px;
  text-align: right;
}

.cat-price.is-owned { color: rgba(255,253,245,.45); font-weight: 700; }

.cat-ver-select {
  background: #1b1b24;
  color: var(--paper);
  border: 2px solid rgba(255,253,245,.2);
  border-radius: 10px;
  padding: 7px 10px;
  font: 700 .78rem 'Montserrat', sans-serif;
  cursor: pointer;
  outline: none;
}

.cat-ver-select:focus { border-color: var(--lime); }
.cat-ver-select:disabled { opacity: .45; cursor: default; }

.cat-buy {
  font: 800 .8rem/1 var(--font-ui);
  letter-spacing: .01em;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  white-space: nowrap;
}

.cat-buy.primary { background: var(--lime); color: var(--ink); box-shadow: 3px 3px 0 rgba(0,0,0,.6); }
.cat-buy.primary:hover { transform: translate(-1px,-1px); box-shadow: 4px 4px 0 rgba(0,0,0,.6); }
.cat-buy.ghost { background: transparent; color: var(--paper); border-color: rgba(255,253,245,.3); }
.cat-buy.ghost:hover { border-color: var(--lime); color: var(--lime); }
.cat-buy:disabled { opacity: .5; cursor: default; transform: none; }

.empty {
  padding: 48px 20px;
  text-align: center;
  font: 700 .9rem 'Montserrat', sans-serif;
  color: rgba(255,253,245,.5);
  border-bottom: 1px dotted rgba(255,253,245,.25);
}

.load-more-wrap { text-align: center; margin-top: 24px; }
.status-line { margin-top: 12px; text-align: center; }

/* info section */
.info-section {
  margin-top: 36px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border: 3px solid var(--ink);
  border-radius: var(--r);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 var(--lime);
}

.info-section .title { margin-bottom: 10px; }
.info-section .muted { color: #3d3d46; }
.info-section a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime); text-decoration-thickness: 2px; }

/* mobile */
@media (max-width: 860px) {
  .hero.catalog-hero { grid-template-columns: 1fr; box-shadow: 7px 7px 0 var(--pink); min-height: 0; padding-top: 1.6rem; }
  .catalog-hero .eyebrow { margin-bottom: .9rem; }
  .cat-hero-panel { display: none; }
}

@media (max-width: 640px) {
  .catalog-hero h1 .stroke { -webkit-text-stroke-width: 2px; }
  .cat-row {
    grid-template-columns: 34px minmax(0,1fr);
    grid-template-areas:
      "num main"
      "play side";
    gap: 8px 12px;
    padding: 13px 4px;
  }
  .cat-num { grid-area: num; text-align: left; align-self: start; padding-top: 3px; }
  .cat-main { grid-area: main; }
  .cat-play { grid-area: play; width: 38px; height: 38px; justify-self: start; }
  .cat-side {
    grid-area: side;
    justify-self: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }
  .cat-kbps { display: none; }
  .cat-price { min-width: 0; }
  .cat-buy { padding: 11px 16px; }
}
