/* ─────────────────────────────────────────────
   VLC IPTV — Catalog (category browse + items)
   catalog.css
───────────────────────────────────────────── */

#vlc-catalog {
  padding: 24px 48px 48px;
  color: var(--text);
}

/* ── Count / status line ── */
.catalog-count {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 20px;
  letter-spacing: .03em;
}

/* ── Category grid ── */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.catalog-card {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  min-height: 80px;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  overflow-wrap: anywhere;
  transition: border-color .18s, background .18s, transform .18s var(--ease), box-shadow .18s;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.35;
}
.catalog-card::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--purple);
  border-radius: 50%;
  flex-shrink: 0;
  opacity: .7;
}
.catalog-card:hover,
.catalog-card:focus-visible {
  border-color: var(--border-hi);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  outline: none;
}
.catalog-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ── Show more ── */
.catalog-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 14px 28px;
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.catalog-more:hover,
.catalog-more:focus-visible {
  border-color: var(--border-hi);
  background: var(--surface-2);
  outline: none;
}
.catalog-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Status / message ── */
.catalog-message,
.catalog-selected {
  font-size: 16px;
  color: var(--text-3);
  padding: 16px 0;
  line-height: 1.6;
}

/* ── Items grid (after category selected) ── */
.catalog-grid.catalog-items {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
  margin-top: 4px;
}

.catalog-card.catalog-item {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  min-height: auto;
  overflow: hidden;
  border-radius: var(--radius);
  gap: 0;
}
.catalog-card.catalog-item::before { display: none; }

.catalog-item img {
  width: 100%;
  aspect-ratio: 2/3;
  object-fit: cover;
  background: var(--surface-2);
  display: block;
  transition: transform .25s var(--ease);
}
.catalog-item:hover img { transform: scale(1.04); }

.catalog-item span {
  display: block;
  padding: 10px 12px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  color: var(--text-2);
  transition: color .15s;
}
.catalog-item:hover span { color: var(--text); }

/* No image fallback */
.catalog-item:not(:has(img)) {
  min-height: 100px;
  align-items: flex-start;
  padding: 18px 16px;
}
.catalog-item:not(:has(img))::before { display: flex; }

@media (max-width: 900px) {
  #vlc-catalog { padding: 16px 20px 48px; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .catalog-grid.catalog-items { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (max-width: 600px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .catalog-grid.catalog-items { grid-template-columns: repeat(2, 1fr); }
  .catalog-card { font-size: 15px; padding: 18px 14px; }
}