/* ---------------------------------------------------------------------------
   Imperial Display UI (screenshot-style filter panel + grid)
   Notes:
   - Card backgrounds use #0f163b (per your preference)
   - Class names match display.js: .disp-*
--------------------------------------------------------------------------- */

.disp-wrap{
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  font-family: inherit;
}

.disp-disabled{
  pointer-events: none;
  opacity: 0.55;
}


/* ---------------- Top Bar (Search + Sort + New Arrivals) ---------------- */
.disp-topbar{
  display:flex;
  align-items:flex-end;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom: 12px;
}

.disp-search{
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 260px;
}

.disp-sort{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 220px;
  margin-left:auto;
}

.disp-label{
  font-size: 12px;
  opacity: .85;
}

.disp-input{
  width:100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  outline: none;
}

.disp-input:focus{
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.disp-select{
  width:100%;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,.15);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  outline: none;
}

.disp-select:focus{
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.disp-check{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 10px 8px;
  user-select:none;
  white-space:nowrap;
}

/* ---------------- Filter Panel (screenshot style) ---------------- */
.disp-filterpanel{
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 10px;
  background: #f7f7f7;
  overflow: hidden;
}

.disp-filter-header{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 14px;
  border: none;
  background: #f7f7f7 !important;
  color: rgba(0,0,0,0.88) !important;
  cursor: pointer;
  font: inherit;
}

.disp-filter-header:disabled{
  cursor: not-allowed;
  opacity: .60;
}

.disp-filter-header:hover{ background: #f7f7f7 !important; color: rgba(0,0,0,0.88) !important; }

.disp-filter-title{
  font-weight: 600;
  display:flex;
  align-items:center;
  gap:10px;
}

.disp-filter-icon{
  display:inline-flex;
  width: 18px;
  height: 18px;
  align-items:center;
  justify-content:center;
  opacity: .85;
}

.disp-filter-chevron{
  font-size: 16px;
  opacity: .8;
}

.disp-filter-body{
  padding: 14px;
  background: #f7f7f7;
}

.disp-filter-cols{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px){
  .disp-filter-cols{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .disp-filter-cols{ grid-template-columns: 1fr; }
}

.disp-col-title{
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 13px;
}

.disp-facet{
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0; /* allows content to shrink inside grid column */
}

.disp-opt{
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  min-width: 0;
}

.disp-opt input{
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-top: 3px;
}

.disp-opt span,
.disp-opt .disp-opt-label{
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  line-height: 1.25;
}

.disp-opt:hover{
  background: rgba(0,0,0,.04);
}

.disp-opt.is-disabled{
  opacity: .45;
  cursor: not-allowed;
}

.disp-opt.is-disabled,
.disp-opt.is-disabled *{
  cursor: not-allowed !important;
}

.disp-opt.is-disabled:hover{
  background: transparent;
}

.disp-opt.is-disabled input{
  pointer-events: none;
}

.disp-opt.is-disabled .disp-opt-label{
  color: rgba(0,0,0,.9);
}

/* Apply Button row (centered) */
.disp-cta-row{
  display:flex;
  justify-content:center;
  padding-top: 18px;
}

.disp-apply{
  padding: 12px 18px;
  min-width: 200px;
  border: none;
  border-radius: 8px;
  background: #0a58a8;
  color:#fff;
  font: inherit;
  font-weight: 600;
  cursor:pointer;
}

.disp-apply:hover{
  filter: brightness(0.97);
}

/* ---------------- Chips Row ---------------- */
.disp-chips-row{
  display:flex;
  align-items:center;
  gap: 12px;
  flex-wrap:wrap;
  margin-top: 10px;
}

.disp-chips{
  display:flex;
  gap: 10px;
  flex-wrap:wrap;
}

.disp-chip{
  display:inline-flex;
  align-items:center;
  justify-content: center;
  gap: 8px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  padding: 0px 10px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 8px;
  background: rgba(255,255,255,0.85);
  color: rgba(0,0,0,0.78);
  cursor:pointer;
  font: inherit;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}

.disp-chip:hover{
  background: rgba(255,255,255,0.95) !important;
  color: rgba(0,0,0,0.78) !important;
}

.disp-chip-x{
  font-size: 16px;
  line-height: 1;
  opacity: .85;
}

.disp-clear{
  border:none;
  background: rgba(255,255,255,0.95);
  color: rgba(0,0,0,0.78);
  cursor:pointer;
  padding: 7px 10px;
  font: inherit;
  text-decoration: underline;
  opacity: .85;
}

.disp-clear:hover{
  opacity: 1;
  background: rgba(255,255,255,0.95) !important;
  color: rgba(0,0,0,0.78) !important;
}

/* Gap above grid */
.disp-gap{ height: 12px; }

/* ---------------- Grid ---------------- */
.disp-grid{
  --disp-card-minh: 300px;
  min-height: calc((var(--disp-card-minh) * 1) + 16px);
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px){ 
  .disp-grid{ grid-template-columns: repeat(3, 1fr); } 
}
@media (max-width: 768px){  
  .disp-grid{ --disp-card-minh: 275px; grid-template-columns: repeat(2, 1fr); } 
  .disp-tags{display: None !important;}
}
@media (max-width: 480px){  
  .disp-grid{ grid-template-columns: 1fr; } s
}

/* Cards */
.disp-card{
  position: relative;
  text-align:left;
  padding: 0;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #0f163b !important; /* preference */
  color: #fff;         /* ensure readability */
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
  min-height: var(--disp-card-minh);
}

.disp-card:hover{
  transform: scale(1.05);
  box-shadow: 0 10px 26px rgba(0,0,0,.14);
  background: #0f163b !important;
}

.disp-thumb-wrap{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 65%;
  background: rgba(255,255,255,.06);
  overflow:hidden;

  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.disp-thumb{
  width:100%;
  height:100%;
  object-fit: cover;
  object-position: center top;
  display:block;
}

/* Hide image area if it becomes too small to be useful */
.disp-thumb-wrap.is-hidden{
  display: none;
}

/* Text starts at 75% height mark */
.disp-card-body{
  position: absolute;
  top: 65%;
  left: 0;
  width: 100%;
  height: 35%;
  padding: 6px 12px 6px;
  box-sizing: border-box;
  overflow: hidden;

  display: grid;
  grid-template-rows: auto auto 1fr;
  row-gap: 6px;
}

.disp-card-badge{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1;

  box-shadow: 0 4px 12px rgba(0,0,0,.20);
}

.disp-card-badge-new{
  background: #cb8700;
  color: #fff;
  border: 1px solid rgba(0,0,0,.08);
}

.disp-title{
  font-weight: 700;
  line-height: 2;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  margin: 0;
}

.disp-meta{
  font-size: 13px;
  opacity: .9;
  margin: 0;
}

/* Tags */
.disp-tags{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-content: flex-start;
  overflow:hidden;
}

.disp-tag{
  display: inline-flex;
  align-items: center;
  height: 22px;
  min-height: 22px;
  max-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(255,255,255,0.85);
  color: rgba(0,0,0,0.78);
  font-size: 12px;
  line-height: 1;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.disp-tag:hover{
    border: 1px solid rgba(0,0,0,0.10);
}

.disp-tag-new{
  border-color: rgba(0,0,0,0.16);
  background: #cb8700;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
}


/* Empty / Loading */
.disp-empty{
  padding: 18px;
  opacity: .85;
}

.disp-loading{
  padding: 10px;
  opacity: .85;
}

.disp-sentinel{
  height: 1px;
}

/* ---------------- Lightbox ---------------- */
.disp-lightbox{
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.disp-lb-backdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0, 0.75);
}

.disp-lb-panel{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
}

@media (max-width: 768px){
  .disp-lb-panel{
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }
}

.disp-lb-body{
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  background: #0f163b;
  box-shadow: 0 18px 60px rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
}

.disp-lb-img{
  
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100vh - 20vh);
  object-fit: contain;
  display:block;
  background:#0f163b;
}

.disp-lb-text{
  flex: 0 0 auto;
  padding: 12px 14px 14px;
}

.disp-lb-title{
  padding: 0;
  color:#fff;
  font-weight: 700;
  margin-bottom: 10px;
}

.disp-lb-tags{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.disp-lb-close,
.disp-lb-prev,
.disp-lb-next{
  position:absolute;
  width: 44px;
  height: 44px;

  /* remove pill background */
  background: transparent !important;
  border: none;
  border-radius: 0;

  cursor:pointer;
  font-size: 45px;
  line-height: 55px;
  text-align:center;

  /* grey icon */
  color: rgb(255, 255, 255);

  /* prevent theme styles */
  box-shadow: none;

  /* Temp Remove light box nav buttons*/
  display: none !important;
}

.disp-lb-close:hover,
.disp-lb-prev:hover,
.disp-lb-next:hover{
  color: rgba(255, 255, 255, 0.4) !important;
  background: transparent !important;
}

.disp-lb-close{ right: 20px; top: 20px;}
.disp-lb-prev{ left: 10px; top: 50%; transform: translateY(-50%); }
.disp-lb-next{ right: 10px; top: 50%; transform: translateY(-50%); }

.disp-noscroll{ overflow:hidden; }