/* home_private.css
   Home privada (rails tipo Netflix: Seguir viendo / Mi lista + shelves)
*/

/* Variables globales */
:root{
  --rc-poster-ar: 2 / 3;
  --rc-radius: 16px;

  /* Rail (Seguir viendo / Mi lista) */
  --rc-rail-w: clamp(130px, 11vw, 175px);

  /* Shelves (Clásicos/Cortos) */
  --rc-shelf-w: 168px;
}

/* Página */
.page--home{
  padding: 28px 28px 60px;
}

/* =========================
   RAILS (Seguir viendo / Mi lista)
   ========================= */

.rail{
  margin-top: 22px;
}

.rail-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:12px;
}

.rail-actions{
  display:flex;
  gap:10px;
}

.rail-btn{
  width:38px;
  height:38px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  cursor:pointer;
}

.rail-track{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding:6px 2px 14px;
  scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch;
}

.rail-track::-webkit-scrollbar{ height:8px; }
.rail-track::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:999px;
}

.rail-card-wrap{
  position:relative;
  flex:0 0 var(--rc-rail-w);
  width:var(--rc-rail-w);
  scroll-snap-align:start;
}

/* El contenedor recorta de verdad */
.rail-card{
  display:block;
  width:100%;
  border-radius:var(--rc-radius);
  overflow:hidden;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

/* Poster */
.rail-poster{
  width:100%;
  aspect-ratio:var(--rc-poster-ar);
  object-fit:cover;
  object-position:center;
  display:block;
}

/* Fallback */
.rail-poster-fallback{
  width:100%;
  aspect-ratio:var(--rc-poster-ar);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px;
  text-align:center;
  color:rgba(255,255,255,.85);
  background:rgba(0,0,0,.25);
}

/* Barra de progreso */
.continue-progress{
  height:6px;
  background:rgba(255,255,255,.12);
}
.continue-progress span{
  display:block;
  height:100%;
  width:var(--p, 0%);
  background:rgba(255,255,255,.75);
}

/* Meta */
.rail-meta{
  padding:10px 10px 12px;
}

.rail-title{
  margin:0;
  font-size:14px;
  line-height:1.2;
  color:rgba(255,255,255,.92);

  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.rail-sub{
  display:inline-block;
  margin-top:6px;
  font-size:12px;
  color:rgba(255,255,255,.65);
}

/* Botón “−” (quitar) */
.rail-action{
  position:absolute;
  top:10px;
  right:10px;
  width:32px;
  height:32px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(0,0,0,.35);
  color:rgba(255,255,255,.95);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:0;
  transition:opacity .15s ease;
}

.rail-card-wrap:hover .rail-action{
  opacity:1;
}

/* Estado vacío */
.rail-empty{
  padding:14px 2px 6px;
  color:rgba(255,255,255,.7);
  font-size:14px;
}

/* =========================
   CATÁLOGO (grid)
   ========================= */

/* Fallback genérico para tarjetas del catálogo si tu markup varía */
#catalogo [data-movie-id],
#catalogo [data-movie-id] > a,
#catalogo .movie-card,
#catalogo .catalog-card,
#catalogo .movie-tile,
#catalogo .catalog-tile,
.page--home .movie-card-link{
  border-radius:18px;
  overflow:hidden;
}

/* Grid (según tu template: movie-grid / movie-card-link / movie-poster) */
.page--home .movie-grid{
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:16px;
}

@media (max-width:1200px){
  .page--home .movie-grid{ grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (max-width:900px){
  .page--home .movie-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}
@media (max-width:600px){
  .page--home .movie-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

.page--home .movie-card-link{
  display:block;
  text-decoration:none;
  color:inherit;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08);
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}

.page--home .movie-poster{
  width:100%;
  aspect-ratio:var(--rc-poster-ar);
  object-fit:cover;
  object-position:center;
  display:block;
}

.page--home .movie-title{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

/* =========================
   CTA hero
   ========================= */
.page--home .hero-cta{
  display:inline-flex;
  align-items:center;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:rgba(255,255,255,.92);
  text-decoration:none;
}
.page--home .hero-cta:hover{
  background:rgba(255,255,255,.12);
}

/* =========================
   SHELVES (Clásicos/Cortos)
   ========================= */

.shelf{ margin:18px 0 6px; }

.shelf-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin:0 0 10px;
}

.shelf-head h2{
  margin:0;
  font-size:18px;
  font-weight:800;
  letter-spacing:.2px;
}

.see-more{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  text-decoration:none;
  opacity:.9;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  color:inherit;
}
.see-more:hover{
  opacity:1;
  border-color:rgba(255,255,255,.25);
}
.see-more .chev{
  font-size:18px;
  line-height:1;
}

.shelf-rail{
  display:flex;
  gap:12px;
  overflow-x:auto;
  padding:6px 2px 12px;
  scroll-snap-type:x mandatory;
}
.shelf-rail::-webkit-scrollbar{ height:10px; }
.shelf-rail::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.12);
  border-radius:999px;
}

.shelf-card{
  width:var(--rc-shelf-w);
  flex:0 0 auto;
  text-decoration:none;
  color:inherit;
  scroll-snap-align:start;
  transition:transform .15s ease;
}
.shelf-card:hover{
  transform:scale(1.06);
  z-index:3;
}

.shelf-poster{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  background:rgba(255,255,255,.06);
  aspect-ratio:var(--rc-poster-ar);
}
.shelf-poster img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Badge "Nuevo título" (menos feo, más premium) */
/* contenedor de insignias */
.shelf-badges{
  position:absolute;
  top:12px;
  left:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  z-index:5;
}

/* badge base */
.shelf-badge{
  padding:8px 10px;
  border-radius:10px;
  font-size:12px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;

  background: rgba(255,255,255,.10);    /* blanco TRANSPARENTE */
  color: rgba(255,255,255,.92);

  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* variantes */
.shelf-badge-new{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

.shelf-badge-ai{
  background: rgba(0, 200, 255, .14);
  border-color: rgba(0, 200, 255, .25);
}

.shelf-badge-restore{
  background: rgba(120, 255, 160, .12);
  border-color: rgba(120, 255, 160, .22);
}

/* Por si acaso: overlay correcto */
.shelf-poster{ position:relative; }

.shelf-meta{ padding:8px 2px 0; opacity:.92; }
.shelf-title{ font-size:13px; font-weight:700; line-height:1.2; }



