/* ============================================================
   RYNERA · 列表页布局修复 (2026-11-20)
   根因：cinema.css 中「详情页播放源模块」的
        .vod-list-box{display:flex!important;flex-direction:column!important}
        未限定作用域，污染了分类 show 页 / 搜索页的同名容器，
        使 .show-vod-list 作为 flex 子项收缩到内容宽度(~226px)，
        内部 .movie-ul 网格被挤成 4 列 × 43px 窄条。
   修复：把这两个页面的 .vod-list-box 恢复为 block，
        并给网格/卡片加最小宽度保护。
   影响页面：vod/show.html（分类筛选）、vod/search.html（搜索结果）
   ============================================================ */

/* ---------- 1. 解除详情页规则对列表页的污染 ---------- */
body.show .vod-list-box,
body.search .vod-list-box,
body.show .show-vod-list,
body.search .show-vod-list{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  flex:none!important;
  height:auto!important;
}

/* ---------- 2. 网格容器撑满并锁定列数 ---------- */
body.show .movie-ul,
body.search .movie-ul,
body.show .show-vod-list .movie-ul,
body.search .show-vod-list .movie-ul{
  display:grid!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  /* min(100%,150px)：窄容器下列宽自动收缩，绝不撑破视口 */
  grid-template-columns:repeat(auto-fill,minmax(min(100%,160px),1fr))!important;
  gap:22px 18px!important;
  align-items:start!important;
}

/* ---------- 3. 卡片最小宽度保护：绝不被压成窄条 ---------- */
body.show .movie-ul>.myui-vodbox-content,
body.search .movie-ul>.myui-vodbox-content{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
body.show .myui-vodbox-content .card-img,
body.search .myui-vodbox-content .card-img{
  width:100%!important;
  aspect-ratio:2/3!important;
}
body.show .myui-vodbox-content .card-info .title,
body.search .myui-vodbox-content .card-info .title{
  font-size:14px!important;
  line-height:1.45!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
  display:-webkit-box!important;
  -webkit-line-clamp:2!important;
  -webkit-box-orient:vertical!important;
  overflow:hidden!important;
}

/* ---------- 4. 响应式列数（与首页网格一致：6/4/3/2） ---------- */
@media(max-width:1200px){
  body.show .movie-ul,body.search .movie-ul{
    grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr))!important;
  }
}
@media(max-width:780px){
  /* 提高特指度：重复类名，压过 cinema.css 的 auto-fill!important */
  body.show .movie-ul.movie-ul,
  body.search .movie-ul.movie-ul,
  body.show .show-vod-list .movie-ul,
  body.search .show-vod-list .movie-ul{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    grid-auto-columns:minmax(0,1fr)!important;
    gap:14px 10px!important;
    width:100%!important;
  }
}
@media(max-width:360px){
  body.show .movie-ul.movie-ul,
  body.search .movie-ul.movie-ul{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* ---------- 5. 筛选栏（screen-box）手机端：容器内横向滚动 ---------- */
body.show .screen-box{
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
@media(max-width:780px){
  body.show .screen-box .filter-box{
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    padding:8px 0!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior-x:contain!important;
    scrollbar-width:none!important;
  }
  body.show .screen-box .filter-box::-webkit-scrollbar{display:none!important}
  body.show .screen-box .filter-title{
    flex:0 0 auto!important;
    position:sticky!important;left:0!important;
    background:inherit!important;
    z-index:2!important;
  }
  body.show .screen-box .filter-ul{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    align-items:center!important;
  }
  body.show .screen-box .filter-ul .filter-li{
    flex:0 0 auto!important;
    white-space:nowrap!important;
  }
  /* 排序栏手机端等宽排列 */
  body.show .screen-head{
    display:flex!important;
    width:100%!important;
    overflow:hidden!important;
  }
  body.show .screen-head>a{
    flex:1 1 0!important;
    min-width:0!important;
    text-align:center!important;
  }
  body.show .screen-head .title{justify-content:center!important}
}

/* ---------- 6. 搜索页结果头与空结果 + 容器宽度保护 ---------- */
body.search .search-head{
  width:100%!important;
  max-width:100%!important;
}
/* 搜索页 container/row 被长标题或 grid 最小宽度撑破时，强制收敛 */
body.search .container,
body.search .container>.row{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
