/* ===== Catalog page (light) ===== */
.page{padding:18px 0 26px;}
.page-title{margin:0 0 6px; font-size:28px; font-weight:950; letter-spacing:-.3px;}
.page-sub{margin:0 0 14px; color:var(--muted); line-height:1.6; font-weight:650;}

.catalog-wrap{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap:14px;
  align-items:start;
}
@media (max-width: 980px){ .catalog-wrap{grid-template-columns:1fr} }

.sidebar{
  position:sticky; top:86px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:14px;
  max-height: calc(100vh - 106px);
  overflow:auto;
}
@media (max-width: 980px){ .sidebar{position:static; max-height:none} }

.sidebar h3{margin:0 0 10px; font-size:13px; font-weight:950; letter-spacing:.2px; color:#111827;}
.field{
  width:100%;
  border:1px solid var(--border);
  background:#f9fafb;
  border-radius:12px;
  padding:12px 12px;
  font-size:14px;
  outline:none;
}
.filters{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px;}
@media (max-width: 520px){ .filters{grid-template-columns:1fr} }

.navlist{margin-top:10px;}
.navlist a{
  display:block;
  padding:8px 10px;
  border-radius:12px;
  color:var(--muted);
  font-weight:800;
}
.navlist a:hover{background:#f3f4f6; color:#111827}

.notice{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:14px;
  color:var(--muted);
  line-height:1.55;
}
.notice b{color:#111827}

.cat-section{margin:14px 0 26px;}
.cat-head{display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:10px; flex-wrap:wrap;}
.cat-title{margin:0; font-size:18px; font-weight:950; letter-spacing:-.2px;}
.cat-meta{color:var(--muted); font-weight:800}

.table-wrap{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  overflow:auto;
}
.table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  min-width: 980px;
}
@media (max-width: 1200px){
  /* на ноутбуках чуть компактнее, чтобы меньше ощущался "уезд" */
  .table{min-width: 900px;}
}
.table th, .table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
  font-size:13.5px;
}
.table th{
  font-size:12px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.4px;
  background:#f9fafb;
  position:sticky; top:0;
}
.table tr:last-child td{border-bottom:none}

.mono{
  font-variant-numeric: tabular-nums;
  font-feature-settings:"tnum";
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.badge{
  display:inline-flex;
  padding:4px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--border);
  color:var(--muted);
  font-weight:900;
  font-size:12px;
}

/* mobile cards */
.m-cards{display:none}
@media (max-width: 520px){
  .table-wrap{display:none}
  .m-cards{display:grid; gap:10px}
  .m-card{
    background:#fff;
    border:1px solid var(--border);
    border-radius:16px;
    box-shadow:var(--shadow);
    padding:12px;
  }
  .m-top{display:flex; gap:10px; align-items:flex-start; justify-content:space-between;}
  .m-title{font-weight:950; font-size:14px; line-height:1.25;}
  .m-sub{margin-top:6px; color:var(--muted); font-size:12.5px; line-height:1.4;}
  .m-prices{margin-top:10px; display:grid; grid-template-columns:1fr 1fr; gap:8px;}
  .m-price{
    border:1px solid var(--border);
    border-radius:12px;
    padding:10px;
    background:#f9fafb;
  }
  .m-price b{display:block; font-size:12px; color:var(--muted); font-weight:850}
  .m-price span{display:block; margin-top:4px; font-weight:950}
}

.add-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-weight:950;
  cursor:pointer;
}
.add-btn:hover{background:#f3f4f6}

.m-add{
  margin-top:10px;
  display:flex;
  gap:10px;
}
@media (max-width: 980px){
  .side-nav{display:none;}
}

/* ===== Product cards (catalog list) ===== */
.catalog-main{min-width:0;} /* critical for grid overflow */
.prod-list{display:grid; gap:10px;}
.prod-card{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:14px;
}
.prod-main{min-width:0;}
.prod-title{font-weight:950; font-size:15px; line-height:1.25;}
.prod-sub{margin-top:6px; color:var(--muted); font-weight:750; font-size:12.5px;}
.prod-desc{margin-top:8px; color:var(--muted); font-weight:650; line-height:1.5;}
.prod-actions{flex:0 0 auto; display:flex; align-items:center; gap:10px;}
.prod-actions .add-btn{white-space:nowrap;}

@media (max-width:520px){
  .page{padding:14px 0 22px;}
  .page-title{font-size:26px;}
  .prod-card{flex-direction:column;}
  .prod-actions{width:100%;}
  .prod-actions .add-btn{width:100%;}
  .container{padding:0 14px;}
}
