/* --------------------------------------------------------------
   Home page card fixes (v7) — load AFTER all.css
   - Movie/TV slides same size as Recommended (smaller)
   - Proper gaps
   - Language chips TOP-RIGHT everywhere (hero + sliders + grid)
   -------------------------------------------------------------- */

:root{
  --card-w: 230px;           /* unified card width for sliders */
  --card-gap: 14px;
  --pad: 8px;
  --chip: #9e7cff;
}

/* ============== RECOMMENDED (grid) ============== */
.nxcontent .germ.p-card:not(.swiper-wrapper){
  display:grid !important;
  grid-template-columns:repeat(auto-fill, minmax(var(--card-w),1fr)) !important;
  gap:var(--card-gap) !important;
}
.nxcontent .germ.p-card:not(.swiper-wrapper) .entity{ width:auto !important; }

/* ============== GENERIC CARD ============== */
.nxcontent .entity{
  background:#0e1421;border:1px solid #1b263a;border-radius:10px;overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease;
}
.nxcontent .entity:hover{ transform:translateY(-2px); box-shadow:0 6px 18px rgba(0,0,0,.25); }

.nxcontent .entity .poster{
  position:relative !important; aspect-ratio:2/3; width:100% !important;
  background:#0b1220; overflow:hidden;
}
.nxcontent .entity .poster img{
  width:100% !important; height:100% !important; object-fit:cover !important; display:block;
  transition:transform .25s ease;
}
.nxcontent .entity:hover .poster img{ transform:scale(1.06); }

/* Quality badge (top-left) */
.nxcontent .entity .poster > b{
  position:absolute; left:var(--pad); top:var(--pad); z-index:60 !important;
  background:var(--chip); color:#fff; border-radius:6px; padding:2px 6px;
  font-size:.72rem; font-weight:700; line-height:1;
}

/* ===== NUCLEAR RESET for language chip centering from theme ===== */
.nxcontent .entity .poster .az-peg,
.nxcontent .entity .poster .az-peg *,
#top-trending .poster .az-peg,
#top-trending .poster .az-peg *{
  top:auto !important; bottom:auto !important; left:auto !important; right:auto !important;
  transform:none !important; margin:0 !important;
}

/* Top-right language chips everywhere */
.nxcontent .entity .poster .az-peg,
#top-trending .poster .az-peg{
  position:absolute !important;
  top:var(--pad) !important; right:var(--pad) !important;
  display:flex !important; flex-direction:column !important; gap:6px !important;
  pointer-events:none !important; z-index:60 !important;
}
.nxcontent .entity .poster .az-langstack,
#top-trending .poster .az-langstack{ display:flex !important; flex-direction:column !important; gap:6px !important; }

.nxcontent .entity .poster .az-langchip,
#top-trending .poster .az-langchip{
  position:static !important; display:inline-flex !important; align-items:center !important; justify-content:center !important;
  min-width:28px !important; height:20px !important; padding:2px 6px !important; line-height:1 !important;
  border-radius:6px !important; background:var(--chip) !important; color:#fff !important;
  font-size:.72rem !important; font-weight:700 !important; box-shadow:0 1px 2px rgba(0,0,0,.25) !important;
}

/* Kill any legacy theme “language/quality” marks */
.nxcontent .language,.nxcontent .lang-badge,#top-trending .language{ display:none !important; }

/* Info */
.nxcontent .entity .info{ padding:.55rem .55rem; text-align:center; }
.nxcontent .entity .info h5{ margin:0 0 .2rem; font-size:.95rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.nxcontent .entity .info i{ color:#bc7bff !important; }

/* ============== MOVIES/TV SWIPERS (size + gap) ============== */
.nxcontent .nxslider .swiper-wrapper{ gap:var(--card-gap) !important; }
.nxcontent .nxslider .swiper-slide{
  width:var(--card-w) !important;
  flex:0 0 var(--card-w) !important;
  margin-right:0 !important;
}
.nxcontent .nxslider .swiper-slide .entity .poster{ aspect-ratio:2/3; }

/* ============== TOP TRENDING (hero) ============== */
#top-trending .poster{
  position:relative !important; display:block !important;
  padding-top:42% !important; /* 16:9 look */
  border-radius:12px !important; background-size:cover !important; background-position:center !important; overflow:hidden !important;
}
#top-trending .poster > b{       /* quality on hero */
  position:absolute; left:10px; top:10px; z-index:9999 !important;
  background:var(--chip); color:#fff; border-radius:8px; padding:4px 8px; font-weight:800; font-size:.8rem; line-height:1;
}
#top-trending .poster .az-peg{ z-index:9999 !important; } /* force above overlays */
#top-trending .poster .az-langchip{ min-width:30px !important; height:22px !important; padding:3px 8px !important; border-radius:8px !important; font-weight:800 !important; font-size:.78rem !important; }
