:root{
  --cc-teal:#0b8aa0;
  --cc-teal-dark:#0b2f36;
  --cc-orange:#ff8500;
  --cc-bg:#f5f7fb;
  --cc-card:#ffffff;
  --cc-text:#0b1b2b;
  --cc-muted:#5b6b73;
}

.materials-catpage{
  background:var(--cc-bg);
  padding:44px 0 70px;
}
.materials-catpage__top{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-bottom:18px;
}
.materials-catpage__top h1{
  margin:0;
  font-family:'Inter',sans-serif;
  font-size:30px;
  font-weight:800;
  color:#0a3440;
}
.materials-catpage__top p{
  margin:0;
  color:#4b5563;
}
.materials-catpage__search{
  display:flex;
  align-items:center;
  gap:10px;
  background:#ffffff;
  border-radius:999px;
  padding:8px 16px;
  box-shadow:0 4px 16px rgba(15,23,42,.06);
  border:1px solid #e2e8f0;
  max-width:720px;
  transition:border-color .2s ease, box-shadow .2s ease;
}
.materials-catpage__search:focus-within{
  border-color:var(--cc-teal);
  box-shadow:0 4px 16px rgba(11,138,160,.12);
}
.materials-catpage__search input{
  border:none;
  outline:none;
  flex:1;
  height:38px;
  font-family:'Inter',sans-serif;
  font-size:14px;
  color:var(--cc-text);
}
.materials-catpage__search input::placeholder{
  color:#94a3b8;
}
.materials-catpage__search button{
  width:38px;
  height:38px;
  border:none;
  border-radius:999px;
  background:var(--cc-orange);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:background .2s ease;
}
.materials-catpage__search button:hover{
  background:#e67a00;
}

.materials-catpage__grid{
  display:grid;
  grid-template-columns:260px minmax(0, 1fr) 320px;
  gap:18px;
}
.materials-catpage__filters,
.materials-catpage__catalog,
.materials-catpage__summary{
  background:var(--cc-card);
  border-radius:18px;
  padding:18px;
  box-shadow:0 14px 30px rgba(15,23,42,.08);
  border:1px solid rgba(15,23,42,.06);
  display:flex;
  flex-direction:column;
}
.materials-catpage__filters,
.materials-catpage__summary{
  position:sticky;
  top:16px;
  max-height:calc(100vh - 32px);
  overflow-y:auto;
}
.materials-catpage__catalog{
  overflow:auto;
}
.materials-catpage__filters h3{
  margin:0 0 10px;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0a3440;
}
.materials-catpage__list{
  list-style:none;
  padding:0;
  margin:0 0 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:none;
  overflow:visible;
}
.materials-catpage__list li{
  padding:10px 12px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.08);
  cursor:pointer;
  font-size:13px;
}
.materials-catpage__list li.is-active{
  background:#e8f6f8;
  border-color:rgba(5,165,203,.35);
}
.materials-catpage__catTitle{
  font-weight:700;
  color:#0b1b2b;
}
.materials-catpage__subList{
  list-style:none;
  padding:8px 0 0 0;
  margin:6px 0 0 0;
  border-top:1px dashed rgba(15,23,42,.12);
  display:flex;
  flex-direction:column;
  gap:6px;
}
.materials-catpage__subList li{
  padding:8px 10px;
  border-radius:10px;
  background:#ffffff;
  border:1px solid rgba(15,23,42,.08);
  font-size:12px;
  color:#42525a;
}
.materials-catpage__subList li.is-active{
  background:#e8f6f8;
  border-color:rgba(5,165,203,.35);
  color:#0b2f36;
}

.materials-catpage__catalog h2{
  margin:0 0 4px;
  font-family:'Inter',sans-serif;
  font-weight:800;
  color:#0a3440;
}
.materials-catpage__meta{
  margin:0 0 12px;
  color:#6b7280;
  font-size:12px;
}
.materials-catpage__products{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(220px, 1fr));
  gap:12px;
  overflow:auto;
  flex:1;
  min-height:0;
  align-content:start;
  align-items:start;
}
.materials-product{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:150px;
  align-self:start;
  transition:box-shadow .2s ease, transform .2s ease;
}
.materials-product:hover{
  box-shadow:0 4px 12px rgba(0,0,0,.08);
  transform:translateY(-2px);
}
.materials-product__title{
  font-weight:700;
  color:#0b1b2b;
  font-size:13px;
}
.materials-product__sub{
  font-size:12px;
  color:#6b7280;
}
.materials-product__unit{
  font-size:12px;
  color:#6b7280;
}
.materials-product__badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:#ffffff;
  border:1px solid rgba(15,23,42,.12);
  color:#42525a;
  font-weight:700;
  font-size:11px;
}
.materials-product__options{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.materials-product__select{
  flex:1;
  min-width:0;
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  padding:0 8px;
  background:#fff;
  font-size:13px;
  color:#42525a;
}
.materials-product__range{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:8px;
}
.materials-product__rangeLabel{
  font-size:12px;
  color:#42525a;
  font-weight:700;
}
.materials-product__range input[type="range"]{
  width:100%;
}
.materials-product__rangeInput{
  width:72px;
  height:32px;
  border-radius:8px;
  border:1px solid rgba(15,23,42,.12);
  padding:0 8px;
  font-size:12px;
}
.materials-product__rangeValue{
  font-size:11px;
  color:#6b7280;
  font-weight:700;
}
.materials-product__unitNote{
  margin-top:6px;
  font-size:11px;
  color:#6b7280;
  font-weight:700;
}
.materials-product__opt{
  border:1px solid rgba(15,23,42,.12);
  background:#fff;
  color:#42525a;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  cursor:pointer;
}
.materials-product__opt.is-active{
  background:#e8f6f8;
  border-color:rgba(5,165,203,.35);
  color:#0b2f36;
}
.materials-product__actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.materials-product__qty{
  width:56px;
  height:36px;
  border:1px solid #e2e8f0;
  border-radius:8px;
  text-align:center;
  font-size:14px;
  padding:0;
}
.materials-product__add{
  height:36px;
  padding:0 16px;
  background:#0b8aa0;
  color:#fff;
  border:none;
  border-radius:8px;
  font-weight:600;
  font-size:13px;
  cursor:pointer;
  white-space:nowrap;
}
.materials-product__add:hover{
  background:#0a7a8e;
}

.materials-catpage__summary h2{
  margin:0 0 12px;
  font-family:'Inter',sans-serif;
  font-weight:800;
  color:#0a3440;
  font-size:18px;
}
.materials-catpage__summary .materials-list{
  overflow:auto;
  flex:1;
  min-height:0;
}
.materials-catpage__summary .materials-btn{
  margin-top:12px;
}
.materials-btn{
  background:#0b8aa0;
  color:#fff;
  border:none;
  border-radius:10px;
  height:46px;
  font-family:'Inter',sans-serif;
  font-weight:800;
  font-size:14px;
  cursor:pointer;
  width:100%;
  transition:background .2s ease, box-shadow .2s ease;
}
.materials-btn--secondary{
  background:#0b2f36;
}
.materials-btn--primary{
  background:#ff8500;
  box-shadow:0 4px 12px rgba(255,133,0,.25);
}
.materials-btn--primary:hover:not(:disabled){
  background:#e67a00;
  box-shadow:0 6px 16px rgba(255,133,0,.3);
}
.materials-btn:disabled{
  opacity:.6;
  cursor:not-allowed;
}
.materials-btn--ghost{
  background:transparent;
  color:#0b2f36;
  border:1px dashed rgba(15,23,42,.25);
}
.materials-empty{
  color:#94a3b8;
  margin-bottom:10px;
}
.materials-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.materials-item{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.06);
  border-radius:12px;
  padding:10px 12px;
}
.materials-item__meta{
  flex:1;
}
.materials-item__title{
  font-weight:700;
  color:#0b1b2b;
  margin-bottom:2px;
}
.materials-item__sub{
  font-size:12px;
  color:#6b7280;
}
.materials-item__notes{
  width:100%;
  margin-top:8px;
  height:34px;
  border-radius:8px;
  border:1px solid rgba(15,23,42,.12);
  padding:0 10px;
  font-size:12px;
}
.materials-item__actions{
  display:flex;
  align-items:center;
  gap:8px;
}
.materials-item__qty{
  width:70px;
  height:36px;
  border-radius:8px;
  border:1px solid rgba(15,23,42,.12);
  padding:0 8px;
}
.materials-item__remove{
  background:#ffe1e1;
  color:#b42318;
  border:none;
  border-radius:8px;
  height:36px;
  padding:0 10px;
  cursor:pointer;
  font-weight:700;
}
.materials-total{
  margin-top:12px;
  display:flex;
  justify-content:space-between;
  padding-top:10px;
  border-top:1px dashed rgba(15,23,42,.15);
  font-weight:700;
}
.materials-summaryActions{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}
.materials-catpage__summaryNote{
  margin:0 0 12px;
  font-size:12px;
  color:#64748b;
}
.materials-catalogHead{
  margin-bottom:12px;
}

@media (max-width:1200px){
  .materials-catpage__grid{
    grid-template-columns:220px minmax(0, 1fr) 300px;
  }
}
@media (max-width:960px){
  .materials-catpage__grid{
    grid-template-columns:1fr;
  }
  .materials-catpage__filters{
    order:1;
  }
  .materials-catpage__catalog{
    order:2;
  }
  .materials-catpage__summary{
    order:3;
  }
}
