/* Catalog page clean layout: same product style as home + useful zero-stock button placement */
.catalog-top{
  min-height:72px;
}
.catalog-top h1{
  margin:0;
  font-size:32px;
  line-height:1.1;
}
.catalog-top #zeroNotice{
  box-shadow:none;
  border:1px solid var(--line, #e5e7eb);
  background:#fff;
  white-space:nowrap;
}
.catalog-top #zeroNotice:hover{
  background:var(--green, #34e21f);
  color:#071009;
}
.catalog-filters #zeroNotice{
  display:none!important;
}
.catalog-card{
  min-height:100%;
  display:flex;
  flex-direction:column;
}
.catalog-card-link{
  display:block;
  flex:1;
}
.catalog-cart-btn{
  margin-top:auto;
}
@media(max-width:700px){
  .catalog-top{
    align-items:flex-start;
    flex-direction:column;
  }
  .catalog-top #zeroNotice{
    width:100%;
  }
}

/* Final catalog polish: calm layout, aligned prices, two-column categories */
.catalog-page{
  align-items:start;
}
.catalog-filters{
  padding:22px!important;
  border:1px solid #e6ebf1!important;
  box-shadow:0 10px 28px rgba(16,24,40,.055)!important;
}
.catalog-filters h2{
  margin:0 0 18px!important;
  font-size:26px!important;
}
.catalog-filters .field{
  margin-bottom:14px!important;
}
.catalog-filters .field input,
.catalog-filters .field select{
  height:50px!important;
  border-radius:16px!important;
  background:#fff!important;
  border:1px solid #dde4ee!important;
  font-weight:800!important;
}
.catalog-filters .field input:focus,
.catalog-filters .field select:focus{
  border-color:#34e21f!important;
  box-shadow:0 0 0 4px rgba(52,226,31,.12)!important;
}
.price-filter-row input{
  min-width:0;
}
.category-tree-filter{
  margin:14px 0 16px;
  border:1px solid #dde4ee;
  border-radius:20px;
  background:#fff;
  overflow:hidden;
}
.cat-filter-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px;
  border-bottom:1px solid #e9edf3;
}
.cat-filter-head b{
  font-size:16px;
}
.cat-filter-head button{
  border:0;
  background:#eef3fa;
  color:#1d4ed8;
  border-radius:999px;
  padding:8px 11px;
  font-weight:900;
  cursor:pointer;
}
.cat-tree-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  min-height:280px;
}
.cat-tree-parents,
.cat-tree-children{
  max-height:440px;
  overflow:auto;
  padding:10px;
  display:grid;
  align-content:start;
  gap:8px;
}
.cat-tree-parents{
  border-right:1px solid #e9edf3;
  background:#f7f9fc;
}
.cat-tree-parent,
.cat-tree-child{
  border:1px solid transparent;
  border-radius:13px;
  background:transparent;
  padding:11px 12px;
  text-align:left;
  font-weight:900;
  cursor:pointer;
  line-height:1.15;
}
.cat-tree-parent:hover,
.cat-tree-child:hover{
  background:#fff;
  border-color:#dfe6ef;
}
.cat-tree-parent.active,
.cat-tree-child.active{
  background:#34e21f;
  color:#061009;
  border-color:#34e21f;
}
.catalog-card{
  display:flex!important;
  flex-direction:column!important;
  height:100%!important;
}
.catalog-card-link{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  min-height:0!important;
}
.catalog-card-body{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  padding:12px 4px 8px!important;
}
.catalog-card h3{
  min-height:58px!important;
  margin:0 0 8px!important;
}
.catalog-card-category{
  min-height:18px!important;
  margin-bottom:8px!important;
}
.price-row-card{
  margin-top:auto!important;
  min-height:34px!important;
  display:flex!important;
  align-items:flex-end!important;
}
.catalog-card-stock{
  min-height:18px!important;
}
.catalog-cart-btn{
  margin-top:10px!important;
}
.catalog-popup.mega-catalog{
  width:min(1040px,calc(100vw - 90px))!important;
  grid-template-columns:280px minmax(0,1fr)!important;
}
.mega-parent-list{
  max-height:560px!important;
  overflow:auto!important;
}
.mega-child-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  max-height:560px!important;
  overflow:auto!important;
}
.mega-child b{
  white-space:normal!important;
}
@media(max-width:980px){
  .cat-tree-grid{grid-template-columns:1fr;}
  .cat-tree-parents{border-right:0;border-bottom:1px solid #e9edf3;max-height:220px;}
  .cat-tree-children{max-height:260px;}
  .catalog-popup.mega-catalog{width:calc(100vw - 28px)!important;grid-template-columns:1fr!important;}
  .mega-child-grid{grid-template-columns:1fr!important;}
}

/* Left catalog filter refinement: compact, readable, no ugly overflow */
.catalog-page{
  grid-template-columns:340px minmax(0,1fr)!important;
}
.catalog-filters{
  overflow:hidden!important;
}
.category-tree-filter{
  border-radius:22px!important;
  box-shadow:0 8px 22px rgba(16,24,40,.045)!important;
}
.cat-filter-head{
  padding:13px 14px!important;
  background:#fff!important;
}
.cat-filter-head button{
  min-width:max-content!important;
  font-size:12px!important;
}
.cat-tree-grid{
  display:grid!important;
  grid-template-columns:46% 54%!important;
  min-height:360px!important;
  background:#fff!important;
  overflow:hidden!important;
}
.cat-tree-col{
  min-width:0!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.cat-tree-col-parent{
  border-right:1px solid #e8edf4!important;
  background:#f7f9fc!important;
}
.cat-tree-title{
  padding:10px 12px 8px!important;
  font-size:11px!important;
  line-height:1!important;
  text-transform:uppercase!important;
  letter-spacing:.04em!important;
  color:#748094!important;
  font-weight:950!important;
  background:inherit!important;
  flex:0 0 auto!important;
}
.cat-tree-parents,
.cat-tree-children{
  max-height:390px!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  padding:6px 8px 10px!important;
  gap:6px!important;
}
.cat-tree-parents{
  border-right:0!important;
  background:transparent!important;
}
.cat-tree-parent,
.cat-tree-child{
  width:100%!important;
  min-width:0!important;
  border-radius:12px!important;
  padding:10px 11px!important;
  font-size:13px!important;
  line-height:1.18!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.cat-tree-parent{
  color:#111827!important;
}
.cat-tree-child{
  background:#fff!important;
  border-color:#eef2f7!important;
  color:#111827!important;
}
.cat-tree-parent:hover,
.cat-tree-child:hover{
  background:#eef3fa!important;
  border-color:#dde6f0!important;
}
.cat-tree-parent.active,
.cat-tree-child.active{
  background:#34e21f!important;
  color:#061009!important;
  border-color:#34e21f!important;
  box-shadow:none!important;
}
.cat-tree-parents::-webkit-scrollbar,
.cat-tree-children::-webkit-scrollbar,
.mega-parent-list::-webkit-scrollbar,
.mega-child-grid::-webkit-scrollbar{
  width:6px!important;
}
.cat-tree-parents::-webkit-scrollbar-thumb,
.cat-tree-children::-webkit-scrollbar-thumb,
.mega-parent-list::-webkit-scrollbar-thumb,
.mega-child-grid::-webkit-scrollbar-thumb{
  background:#d9e0ea!important;
  border-radius:999px!important;
}
.catalog-filters .field input,
.catalog-filters .field select{
  box-shadow:none!important;
}
.catalog-filters h2{
  font-size:24px!important;
}
@media(max-width:1200px){
  .catalog-page{grid-template-columns:320px minmax(0,1fr)!important;}
  .cat-tree-parent,.cat-tree-child{font-size:12px!important;padding:9px 10px!important;}
}
@media(max-width:980px){
  .catalog-page{grid-template-columns:1fr!important;}
  .cat-tree-grid{grid-template-columns:1fr!important;}
  .cat-tree-col-parent{border-right:0!important;border-bottom:1px solid #e8edf4!important;}
  .cat-tree-parents{max-height:220px!important;}
  .cat-tree-children{max-height:260px!important;}
}
