/* Catalogue hubs (catalog.php): /movies, /series, genre and year listings. */
.zf-catalog-page { background: #0b0b0f; min-height: 100vh; }
.zf-cat { max-width: 1480px; margin: 0 auto; padding: 96px 4% 56px; color: #f2f2f5; }
.zf-cat-head { margin: 10px 0 18px; }
.zf-cat-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 900; letter-spacing: -0.01em; }
.zf-cat-head p { margin: 8px 0 0; color: #a9a9b6; max-width: 820px; line-height: 1.6; }

/* ---------- filter bar ---------- */
.zf-cat-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s;
}
.zf-cat-tools.is-loading { opacity: 0.6; pointer-events: none; }
.zf-cat-seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.zf-cat-seg a { padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 800; color: #c9c9d2; text-decoration: none; transition: background 0.2s, color 0.2s; }
.zf-cat-seg a:hover { color: #fff; }
.zf-cat-seg a.is-on { color: #0b0b0f; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.zf-cat-select {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 150px;
  height: 48px;
  padding: 0 38px 0 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
[dir="rtl"] .zf-cat-select { padding: 0 14px 0 38px; }
.zf-cat-select:hover { background: rgba(255, 255, 255, 0.1); }
.zf-cat-select:focus-within { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85); }
.zf-cat-select.is-set { background: rgba(229, 9, 20, 0.14); box-shadow: inset 0 0 0 1px rgba(229, 9, 20, 0.55); }
.zf-cat-select > span { font-size: 11px; font-weight: 700; color: rgba(255, 255, 255, 0.55); line-height: 1.1; pointer-events: none; }
.zf-cat-select select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 2px 0 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}
.zf-cat-select select { width: 100%; height: auto !important; min-height: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important; line-height: 1.25; }
.zf-cat-select select option { color: #111; background: #fff; }
.zf-cat-select > svg { position: absolute; inset-inline-end: 12px; top: 50%; margin-top: -8px; color: rgba(255, 255, 255, 0.7); pointer-events: none; }
/* The whole box opens the menu: the select covers it invisibly. */
.zf-cat-select select::-ms-expand { display: none; }
.zf-cat-apply { height: 48px; padding: 0 20px; border: 0; border-radius: 14px; font: inherit; font-weight: 800; color: #fff; background: #e50914; cursor: pointer; }
.zf-cat-status { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.zf-cat-count { font-size: 13.5px; font-weight: 700; color: #a9a9b6; white-space: nowrap; }
.zf-cat-clear { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); white-space: nowrap; }
.zf-cat-clear:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- quick genre chips (wrap, nothing is cut off) ---------- */
.zf-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.zf-cat-chip { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #d2d2db; text-decoration: none;
    background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.09); transition: background .15s, color .15s; }
.zf-cat-chip:hover, .zf-cat-chip:focus-visible { background: rgba(255, 255, 255, 0.12); color: #fff; }
.zf-cat-chip.is-on { background: #e50914; box-shadow: none; color: #fff; }

/* ---------- poster grid ---------- */
.zf-cat-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 24px 16px; }
.zf-cat-item { position: relative; min-width: 0; }
.zf-cat-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; border-radius: 12px; outline: none; }
.zf-cat-poster { position: relative; display: block; aspect-ratio: 2 / 3; border-radius: 12px; overflow: hidden; background: #17171d;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35); transition: box-shadow .3s; }
.zf-cat-poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s ease, filter .3s; }
.zf-cat-poster::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55)); opacity: 0; transition: opacity .3s; }
.zf-cat-play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px;
  display: grid; place-items: center; border-radius: 50%; color: #0b0b0f; background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5); opacity: 0; transform: scale(0.8); transition: opacity .25s, transform .3s cubic-bezier(.34, 1.56, .64, 1);
}
.zf-cat-play svg { margin: 0; }
.zf-cat-card:hover .zf-cat-poster img, .zf-cat-card:focus-visible .zf-cat-poster img { transform: scale(1.06); }
.zf-cat-card:hover .zf-cat-poster::after, .zf-cat-card:focus-visible .zf-cat-poster::after { opacity: 1; }
.zf-cat-card:hover .zf-cat-play, .zf-cat-card:focus-visible .zf-cat-play { opacity: 1; transform: scale(1); }
.zf-cat-card:hover .zf-cat-poster { box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.85); }
.zf-cat-card:focus-visible .zf-cat-poster { box-shadow: 0 0 0 3px #fff; }
.zf-cat-vote { position: absolute; z-index: 2; bottom: 8px; inset-inline-start: 8px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 800;
    color: #ffd166; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(6px); }
/* "+" My List button (added by zapflix-wishlist.js through data-wish-id): always visible here. */
.zf-cat-item .zf-wish-btn { opacity: 1; transform: none; top: 8px; inset-inline-start: auto; inset-inline-end: 8px; width: 34px; height: 34px; }
.zf-cat-name { font-size: 14.5px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.zf-cat-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: #9a9aa6; }
.zf-cat-kind { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #c9c9d2; background: rgba(255, 255, 255, 0.08); }
.zf-cat-empty { color: #9a9aa6; padding: 60px 0; text-align: center; }

.zf-cat-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 36px; }
.zf-cat-pager a, .zf-cat-pager span { min-width: 40px; padding: 8px 12px; border-radius: 10px; text-align: center; font-weight: 700; font-size: 14px;
    color: #d2d2db; text-decoration: none; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); }
.zf-cat-pager a:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.zf-cat-pager [aria-current="page"] { background: #fff; color: #0b0b10; border-color: #fff; }
.zf-cat-pager .zf-cat-gap { background: none; border-color: transparent; min-width: 20px; padding: 8px 2px; }
.zf-cat-lang { display: inline-flex; gap: 8px; margin-inline-end: 10px; }
.zf-cat-lang a { color: #fff; text-decoration: none; font-size: 13px; opacity: .8; }
.zf-cat-lang a[aria-current] { color: #e50914; opacity: 1; }
.zf-catalog-page .nav-links a[aria-current="page"] { color: #fff; font-weight: 800; }

@media (max-width: 860px) {
  .zf-cat-tools { display: grid; grid-template-columns: 1fr 1fr; }
  .zf-cat-seg { grid-column: 1 / -1; justify-self: stretch; }
  .zf-cat-seg a { flex: 1; text-align: center; }
  .zf-cat-select { min-width: 0; }
  .zf-cat-select:last-of-type { grid-column: 1 / -1; }
  .zf-cat-status { grid-column: 1 / -1; margin: 0; justify-content: space-between; }
}
@media (max-width: 700px) {
  .zf-cat { padding: 80px 16px 40px; }
  .zf-cat-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .zf-cat-chips::-webkit-scrollbar { display: none; }
  .zf-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; }
  .zf-cat-name { font-size: 13px; }
  .zf-cat-vote { font-size: 11px; padding: 2px 6px; }
  .zf-cat-item .zf-wish-btn { width: 30px; height: 30px; top: 6px; inset-inline-end: 6px; }
  .zf-cat-play { display: none; }
  .zf-catalog-page .nav-links, .zf-cat-lang { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .zf-cat-poster img, .zf-cat-play { transition: none; }
}

/* Shared breadcrumb (catalogue hubs and title pages) */
.zf-crumbs ol { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: #9a9aa6; }
.zf-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.zf-crumbs li + li::before { content: "›"; opacity: .6; }
[dir="rtl"] .zf-crumbs li + li::before { content: "‹"; }
.zf-crumbs a { color: #c9c9d2; text-decoration: none; }
.zf-crumbs a:hover { color: #fff; text-decoration: underline; }
.zf-crumbs [aria-current="page"] { color: #fff; font-weight: 600; }

/* Trending today page (trending.php, CLAUDE.md 5.91). The "+" button sits top-end, the rank top-start. */
.zf-trend-section { margin: 34px 0 10px; }
.zf-trend-section > h2 { margin: 0; font-size: clamp(20px, 2.2vw, 26px); font-weight: 900; }
.zf-trend-section > .zf-section-sub { margin: 6px 0 16px; }
.zf-cat-head .zf-trend-updated { margin-top: 6px; font-size: 13px; color: #8d8d99; }
.zf-trend-rank { position: absolute; z-index: 2; top: 8px; inset-inline-start: 8px; min-width: 30px; padding: 3px 8px; border-radius: 999px;
    font-size: 13px; font-weight: 900; text-align: center; color: #fff; background: #e50914; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45); unicode-bidi: isolate; }
