/* Kill 1s fade; height:auto matches theme anim end (avoids bottom clip). */
#trending-home{opacity:1!important;animation:none!important;height:auto!important;position:relative}
/*
 * Pre-Swiper only — approximate final slidesPerView + theme poster aspect.
 * Releases fully once .swiper-container-initialized exists (no Swiper fight).
 */
#trending-home:not(:has(.swiper-container-initialized)){
  --hi-tr-n:6;
  --hi-tr-gap:20px;
  overflow:hidden;
}
#trending-home:not(:has(.swiper-container-initialized)) .swiper-wrapper{
  display:flex;
  flex-wrap:nowrap;
  gap:var(--hi-tr-gap);
}
#trending-home:not(:has(.swiper-container-initialized)) .swiper-slide{
  flex:0 0 calc((100% - (var(--hi-tr-n) - 1) * var(--hi-tr-gap)) / var(--hi-tr-n));
  width:calc((100% - (var(--hi-tr-n) - 1) * var(--hi-tr-gap)) / var(--hi-tr-n));
  max-width:none;
  box-sizing:border-box;
  margin:0;
}
/* Mirror .trending-list .item + film-poster (115% / left:40px) before & without fighting theme. */
#trending-home:not(:has(.swiper-container-initialized)) .item{
  width:100%;
  height:auto;
  padding-bottom:115%;
  position:relative;
  display:block;
  overflow:hidden;
}
#trending-home:not(:has(.swiper-container-initialized)) .item .film-poster{
  position:absolute;
  left:40px;
  right:0;
  top:0;
  bottom:0;
  background:rgba(255,255,255,.1);
}
#trending-home:not(:has(.swiper-container-initialized)) .item .film-poster-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover;
  font-size:0;
  color:transparent;
  background:rgba(255,255,255,.1);
}
/* Swiper breakpoints (min-width), mirrored for pre-init card size */
@media (max-width:319px){
  #trending-home:not(:has(.swiper-container-initialized)){--hi-tr-n:6;--hi-tr-gap:30px}
}
@media (min-width:320px) and (max-width:479px){
  #trending-home:not(:has(.swiper-container-initialized)){--hi-tr-n:3;--hi-tr-gap:2px}
}
@media (min-width:480px) and (max-width:899px){
  #trending-home:not(:has(.swiper-container-initialized)){--hi-tr-n:3;--hi-tr-gap:15px}
}
@media (min-width:900px) and (max-width:1319px){
  #trending-home:not(:has(.swiper-container-initialized)){--hi-tr-n:4;--hi-tr-gap:20px}
}
@media (min-width:1320px) and (max-width:1879px){
  #trending-home:not(:has(.swiper-container-initialized)){--hi-tr-n:6;--hi-tr-gap:20px}
}
@media (min-width:1880px){
  #trending-home:not(:has(.swiper-container-initialized)){--hi-tr-n:8;--hi-tr-gap:20px}
}
/* Theme mobile poster frame (max-width:575px) */
@media (max-width:575px){
  #trending-home:not(:has(.swiper-container-initialized)) .item{padding-bottom:150%}
  #trending-home:not(:has(.swiper-container-initialized)) .item .film-poster{left:0}
}
