/* static/css/catalog.css
   Premium clean grid + orange hover
   Minimal animations only (reveal + hover)
*/

:root{
  --bg: #0b0d12;
  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.08);
  --line: rgba(255,255,255,.14);
  --line2: rgba(255,255,255,.10);
  --muted: rgba(255,255,255,.66);
  --muted2: rgba(255,255,255,.55);
  --text: #fff;

  --accent: rgba(255,138,0,.9);
  --accentLine: rgba(255,138,0,.60);
  --accentIn: rgba(255,138,0,.20);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;

  --shadow: 0 22px 70px rgba(0,0,0,.30);
  --shadow2: 0 30px 90px rgba(0,0,0,.35);
  --ease: cubic-bezier(.2,.9,.2,1);
}

/* full page background */
.catalog-bg{
  position:fixed;
  inset:0;
  z-index:-1;
  background:
    radial-gradient(1200px 700px at 18% 10%, rgba(255,138,0,.18), transparent 60%),
    radial-gradient(1200px 700px at 82% 28%, rgba(80,120,255,.14), transparent 60%),
    radial-gradient(900px 520px at 50% 95%, rgba(255,255,255,.06), transparent 60%),
    var(--bg);
}

.catalog-page{
  padding-bottom:110px;
}

/* reveal (light) */
.js-reveal{
  opacity:0;
  transform: translateY(14px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}
.js-reveal.is-in{
  opacity:1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .js-reveal{ opacity:1; transform:none; transition:none; }
}

/* reuse base container if it exists, but safe fallback */
.container{
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 80px;
}

/* Top header */
.catalog-top{
  padding-top: 110px;
  padding-bottom: 28px;
}
.catalog-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:22px;
}
.eyebrow{
  font-size:12px;
  letter-spacing:.45px;
  text-transform:uppercase;
  color: var(--muted2);
}
.title{
  font-size:52px;
  letter-spacing:-1px;
  margin:10px 0 10px;
  color: var(--text);
}
.sub{
  margin:0;
  max-width:760px;
  color: var(--muted);
}

/* toolbar */
.toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.pill{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text);
}
.muted{ color: var(--muted2); font-size:12px; }
.strong{ font-weight:900; }

.select{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.select-label{
  font-size:12px;
  color: var(--muted2);
}
.select-control{
  background: transparent;
  color: var(--text);
  border:none;
  outline:none;
  font-size:13px;
}
.select-control option{ color:#000; }

.view{
  display:flex;
  gap:6px;
  padding:6px;
  border-radius:999px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--line2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.view-btn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color: rgba(255,255,255,.85);
  cursor:pointer;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.view-btn:hover{
  border-color: var(--accentLine);
  transform: translateY(-1px);
}
.view-btn.is-active{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.20);
}

/* layout */
.catalog-main{
  padding-top: 14px;
}
.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items:start;
}

/* sidebar */
.sidebar{
  position: sticky;
  top: 88px;
}
.sidebar-card{
  border-radius: 26px;
  padding:16px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.sidebar-title{
  font-size:16px;
  font-weight:900;
  margin-bottom:12px;
}
.filter{
  padding:12px 0;
  border-top:1px solid rgba(255,255,255,.08);
}
.filter:first-of-type{ border-top:none; padding-top:0; }
.filter-label{
  font-size:12px;
  letter-spacing:.35px;
  text-transform:uppercase;
  color: var(--muted2);
  margin-bottom:10px;
}

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.chip{
  display:inline-flex;
  align-items:center;
  padding:8px 10px;
  border-radius:999px;
  text-decoration:none;
  font-size:12px;
  color: rgba(255,255,255,.86);
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.chip:hover{
  transform: translateY(-2px);
  border-color: var(--accentLine);
  background: rgba(255,255,255,.07);
}

.check{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color: rgba(255,255,255,.86);
}
.check input{
  width:16px;
  height:16px;
}

.range{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.range-input{
  width:100%;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  outline:none;
}
.btn-lite{
  margin-top:10px;
  width:100%;
  padding:11px 12px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor:pointer;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.btn-lite:hover{
  transform: translateY(-2px);
  border-color: var(--accentLine);
  box-shadow: 0 0 0 1px var(--accentIn) inset;
}
.sidebar-note{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:12px;
  color: var(--muted);
}

/* grid */
.grid-wrap{ min-width:0; }
.grid{
  display:grid;
  gap: 14px;
}
.grid.grid-4{ grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.grid-2{ grid-template-columns: repeat(2, minmax(0,1fr)); }

/* product card */
.p-card{
  border-radius: 24px;
  overflow:hidden;
  background: rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.p-card:hover{
  transform: translateY(-4px);
  border-color: var(--accentLine);
  background: rgba(255,255,255,.065);
  box-shadow: 0 0 0 1px var(--accentIn) inset, var(--shadow2);
}
.p-media{
  display:block;
  position:relative;
  height: 190px;
  background: rgba(0,0,0,.20);
  overflow:hidden;
}
.p-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.01);
  transition: transform .22s var(--ease);
}
.p-card:hover .p-media img{
  transform: scale(1.06);
}
.p-media-empty{
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(255,255,255,.55);
  font-size:12px;
}
.p-body{
  padding: 14px 14px 16px;
}

.p-meta{
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.p-category{
  font-size:11px;
  color: var(--muted2);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 68%;
}
.p-brand{
  font-size:11px;
  color: rgba(255,255,255,.72);
  text-align:right;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 32%;
}

.p-title{
  margin:8px 0 10px;
  font-size:14px;
  font-weight:900;
  line-height:1.25;
}
.p-title a{
  color: var(--text);
  text-decoration:none;
}
.p-title a:hover{ color: rgba(255,255,255,.92); }

.p-bottom{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:12px;
}
.p-price{
  display:flex;
  align-items:baseline;
  gap:6px;
}
.p-price .price{
  font-size:16px;
  font-weight:950;
}
.p-price .cur{
  font-size:12px;
  color: var(--muted2);
}

.p-stock{
  font-size:12px;
  color: rgba(255,255,255,.80);
}
.p-stock .stock{
  font-weight:850;
  margin-left:6px;
}

/* actions */
.p-actions{
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.qty{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.qty-btn{
  width:40px;
  height:38px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.90);
  cursor:pointer;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.qty-btn:hover{
  transform: translateY(-1px);
  border-color: var(--accentLine);
  background: rgba(255,255,255,.07);
}
.qty-input{
  width: 100%;
  height: 38px;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  text-align:center;
  outline:none;
}

.cta{
  display:flex;
  align-items:center;
  gap:10px;
}
.btn-cart{
  flex:1;
  height: 40px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--text);
  cursor:pointer;
  font-weight:850;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.btn-cart:hover{
  transform: translateY(-2px);
  border-color: var(--accentLine);
  box-shadow: 0 0 0 1px var(--accentIn) inset;
}
.btn-cart.is-in-cart{
  background: rgba(255,138,0,.14);
  border-color: rgba(255,138,0,.55);
}
.btn-cart.is-oos{
  opacity:.65;
  cursor:not-allowed;
}

.icon-btn{
  width:40px;
  height:40px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.92);
  cursor:pointer;
  transition: transform .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.icon-btn:hover{
  transform: translateY(-2px);
  border-color: var(--accentLine);
  box-shadow: 0 0 0 1px var(--accentIn) inset;
}

/* responsive */
@media(max-width:1200px){
  .layout{ grid-template-columns: 300px 1fr; }
  .grid.grid-4{ grid-template-columns: repeat(3, minmax(0,1fr)); }
  .title{ font-size:46px; }
}
@media(max-width:980px){
  .container{ padding:0 24px; }
  .catalog-top{ padding-top: 86px; }
  .catalog-head{ flex-direction:column; align-items:flex-start; }
  .toolbar{ justify-content:flex-start; }
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ position:relative; top:auto; }
  .grid.grid-4{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media(max-width:560px){
  .grid.grid-4,.grid.grid-3,.grid.grid-2{ grid-template-columns: 1fr; }
  .title{ font-size:34px; }
}
