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

.jrv-title{
  margin:0;
  font-size: 22px;
  font-weight: 700;
  color:#eaf6ff;
}

.jrv-actions{ display:flex; align-items:center; gap:10px; }

.jrv-clear{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#eaf6ff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor:pointer;
  font-size: 14px;
  display:flex;
  align-items:center;
  gap:8px;
}
.jrv-clear:hover{ background: rgba(255,255,255,.10); }

.jrv-nav{
  width:34px; height:34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color:#eaf6ff;
  cursor:pointer;
  font-size: 18px;
  display:flex; align-items:center; justify-content:center;
}
.jrv-nav:hover{ background: rgba(255,255,255,.10); }

.jrv-row{
  display:flex;
  gap:14px;
  overflow-x:auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

/* ✅ Desktop tile size (keep premium + allow longer names) */
.jrv-tile{
  display:flex;
  align-items:center;            /* ✅ name multi-line হলে nicer */
  gap:10px;
  padding: 10px 12px;
  min-width: 240px;                  /* ✅ একটু বড়, নাম বেশি ধরবে */
  max-width: 240px;
  border-radius: 14px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color:#eaf6ff;
  text-decoration:none;
  scroll-snap-align: start;
}
.jrv-tile:hover{ background: rgba(255,255,255,.08); }

.jrv-tile-icon{
  width:44px; height:44px;
  border-radius: 12px;
  overflow:hidden;
  background: rgba(0,0,0,.20);
  display:flex; align-items:center; justify-content:center;
  flex:0 0 44px;
}
.jrv-tile-img{ width:100%; height:100%; object-fit:cover; display:block; }
.jrv-fallback{ font-weight:800; opacity:.85; }

/* ✅ KEY FIX: name should wrap (2 lines) on PC and Mobile */
.jrv-tile-name{
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  position: relative;
  top: 0;
	
  /* allow wrap */
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;

  /* 2-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  line-height: 1.15;
  max-width: 170px;                 /* ✅ bigger so it can show more */
  word-break: break-word;
}

.jrv-row::-webkit-scrollbar{ height: 9px; }
.jrv-row::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.12); border-radius: 12px; }

/* Hide horizontal scrollbar (keep scroll functional) */
.jrv-row{
  overflow-x: auto;
  -ms-overflow-style: none;  /* IE/Edge legacy */
  scrollbar-width: none;     /* Firefox */
}
.jrv-row::-webkit-scrollbar{
  display: none;             /* Chrome/Safari */
}

/* =========================================================
   Premium reveal (no flash, no jump) — 200ms fade-in
   - Recently Viewed: hidden by default, shown only when .jrv-ready
   - New Arrival: should NOT be hidden (you want it with page load)
   ========================================================= */

/* ✅ Recently Viewed ONLY: start hidden (no flash for new users) */
.jrv-wrap[data-jrv="1"]{
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  max-height: 0;
  overflow: hidden;
  pointer-events: none;

  transition:
    opacity 200ms ease,
    transform 200ms ease,
    max-height 260ms ease,
    visibility 0s linear 200ms;
}

/* loading state remains hidden */
.jrv-wrap.jrv-loading{
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(6px) !important;
  max-height: 0 !important;
  pointer-events: none !important;
}

/* ✅ when ready: fade in */
.jrv-wrap.jrv-ready{
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  max-height: 320px !important;   /* ✅ name 2 lines হলে height দরকার */
  pointer-events: auto !important;

  transition:
    opacity 200ms ease,
    transform 200ms ease,
    max-height 260ms ease,
    visibility 0s;
}

@media (min-width: 992px){
  .jrv-wrap.jrv-ready{
    max-height: 340px !important;
  }
}

/* ✅ New Arrival: always visible like other page content (no hide/show) */
.jna-wrap[data-jna="1"]{
  opacity: 1;
  visibility: visible;
  transform: none;
  max-height: none;
  overflow: visible;
  pointer-events: auto;
}

/* ===== Mobile Fix: 3 full + 1 partial + more readable name ===== */
@media (max-width: 768px){

  /* header layout: allow wrapping, reduce spacing */
  .jrv-head{
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }

  .jrv-title{
    font-size: 18px;
    line-height: 1.15;
  }

  .jrv-actions{
    gap: 8px;
  }

  /* smaller Clear All button */
  .jrv-clear{
    padding: 6px 9px;
    border-radius: 9px;
    font-size: 12px;
    gap: 6px;
  }
  .jrv-clear .jrv-ico{
    font-size: 13px;
    line-height: 1;
  }

  /* smaller nav buttons */
  .jrv-nav{
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 16px;
  }

  /* tighter row so more tiles fit */
  .jrv-row{
    gap: 10px;
    padding-bottom: 4px;
    padding-right: 22px; /* ✅ last item partial দেখানোর জন্য space */
  }

  /* ✅ key: width tuned for 3 full + 1 partial */
  .jrv-tile{
    min-width: 30.5vw;   /* ✅ 3 full + partial */
    max-width: 30.5vw;
    padding: 9px 10px;
    border-radius: 12px;
    gap: 8px;
  }

  .jrv-tile-icon{
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex: 0 0 36px;
  }

  /* ✅ mobile name: 2 lines but bigger than before */
  .jrv-tile-name{
    font-size: 12px;
    max-width: none;            /* ✅ let it use available space */
    -webkit-line-clamp: 2;
    line-height: 1.15;
  }
}

/* Even smaller phones (<=360px) — still 3-ish visible */
@media (max-width: 360px){
  .jrv-tile{
    min-width: 31vw;
    max-width: 31vw;
  }
}

@media (max-width: 420px){
  .jrv-clear-text{ display:none; }
}
