/* NEXUS v336 — List view + product columns + list specs icons */

/* View toggle buttons */
.nx-view-toggle{
  display:inline-flex;
  gap:4px;
  align-items:center;
  margin-inline-start:8px;
}
.nx-view-toggle button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px;height:38px;
  border-radius:10px;
  border:1px solid rgba(100,170,230,.25);
  background:rgba(255,255,255,.06);
  color:inherit;
  cursor:pointer;
  padding:0;
  transition:background .15s,border-color .15s;
}
.nx-view-toggle button:hover{background:rgba(255,255,255,.1)}
.nx-view-toggle button.is-active{
  background:rgba(10,132,255,.22);
  border-color:rgba(10,132,255,.55);
  color:#7dd3fc;
}
.nx-view-toggle button svg{width:18px;height:18px;display:block}

/* Default: hide list-specs in grid mode */
.nxc-list-specs{display:none}

/* ===== LIST MODE ===== */
.nxc-grid.is-list{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  grid-template-columns:none!important;
}
.nxc-grid.is-list > .nxc-card{
  display:flex!important;
  flex-direction:row!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:100%!important;
  min-height:0;
}
.nxc-grid.is-list .nxc-link{
  display:flex!important;
  flex-direction:row!important;
  flex:1 1 auto;
  min-width:0;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:inherit;
}
.nxc-grid.is-list .nxc-media{
  width:110px!important;
  min-width:110px!important;
  max-width:110px!important;
  height:110px!important;
  flex-shrink:0;
  border-radius:12px;
  overflow:hidden;
}
.nxc-grid.is-list .nxc-media .nxc-img,
.nxc-grid.is-list .nxc-media img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
.nxc-grid.is-list .nxc-body{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
  justify-content:center;
  padding:4px 0;
}
.nxc-grid.is-list .nxc-title{
  font-size:14px!important;
  line-height:1.45!important;
  margin:0!important;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.nxc-grid.is-list .nxc-cond{
  align-self:flex-start;
  margin:2px 0!important;
}
.nxc-grid.is-list .nxc-prices{
  margin-top:2px!important;
}
.nxc-grid.is-list .nxc-form,
.nxc-grid.is-list .nxc-btn{
  align-self:center;
  flex-shrink:0;
  margin:0 8px 0 0;
}
.nxc-grid.is-list .nxc-btn{
  width:auto!important;
  min-width:44px;
  height:40px!important;
  padding:0 12px!important;
}
.nxc-grid.is-list .nxc-btn span{display:none} /* icon only on list to save space */

/* List specs icons — shown on desktop list only */
.nxc-grid.is-list .nxc-list-specs{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  margin:2px 0 0;
  align-items:center;
}
.nxc-ls-item{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:12px;
  color:#8ab4d8;
  background:rgba(60,140,255,.08);
  border:1px solid rgba(60,140,255,.15);
  border-radius:8px;
  padding:3px 8px;
  max-width:100%;
}
.nxc-ls-item svg{flex-shrink:0;opacity:.85}
.nxc-ls-val{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:140px;
}
html[data-theme="light"] .nxc-ls-item{
  color:#1e4a7a;
  background:rgba(10,132,255,.08);
  border-color:rgba(10,132,255,.18);
}

/* Mobile list: hide specs icons to keep rows short */
@media screen and (max-width:768px){
  .nxc-grid.is-list .nxc-list-specs{display:none!important}
  .nxc-grid.is-list .nxc-media{
    width:88px!important;
    min-width:88px!important;
    max-width:88px!important;
    height:88px!important;
  }
  .nxc-grid.is-list .nxc-title{font-size:13px!important;-webkit-line-clamp:2}
  .nxc-grid.is-list .nxc-btn{margin-inline-end:4px}
}

/* Mobile columns from setting (applied via --nxc-cols-mobile) */
@media screen and (max-width:768px){
  .nxc-grid:not(.is-list){
    grid-template-columns:repeat(var(--nxc-cols-mobile, 2), minmax(0,1fr))!important;
  }
}

/* Desktop columns already use --nxc-cols */

/* ===== Column count (admin + user toggle) v337 ===== */
@media screen and (min-width:769px){
  .nxc-grid:not(.is-list){
    display:grid!important;
    grid-template-columns:repeat(var(--nxc-cols, 4), minmax(0,1fr))!important;
    gap:14px!important;
    width:100%!important;
  }
  .nxc-grid:not(.is-list) > .nxc-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}

/* Mobile: full-width + respect --nxc-cols-mobile (overrides forced 2-col) */
@media screen and (max-width:768px){
  .nx-products-layout,
  .nx-products-main,
  #productsGrid,
  .nxc-grid{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  .nx-products-section{padding-left:10px!important;padding-right:10px!important}
  .nxc-grid:not(.is-list){
    display:grid!important;
    grid-template-columns:repeat(var(--nxc-cols-mobile, 2), minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
  }
  .nxc-grid:not(.is-list) > .nxc-card{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
}

/* Column picker buttons */
.nx-cols-toggle{
  display:inline-flex;
  gap:4px;
  align-items:center;
  margin-inline-start:4px;
}
.nx-cols-toggle button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:34px;
  height:34px;
  padding:0 8px;
  border-radius:10px;
  border:1px solid rgba(100,170,230,.25);
  background:rgba(255,255,255,.06);
  color:inherit;
  cursor:pointer;
  font-size:12px;
  font-weight:700;
  transition:background .15s,border-color .15s;
}
.nx-cols-toggle button:hover{background:rgba(255,255,255,.1)}
.nx-cols-toggle button.is-active{
  background:rgba(10,132,255,.22);
  border-color:rgba(10,132,255,.55);
  color:#7dd3fc;
}
@media screen and (max-width:768px){
  .nx-cols-toggle button{min-width:32px;height:32px;font-size:11px;padding:0 6px}
}
