/* 3D Models gallery (pages/models.php) */
.mg{display:flex;flex-direction:column;gap:18px}
.mg-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px}
.mg-sum{display:flex;flex-wrap:wrap;gap:8px 20px;color:var(--muted);font-size:13.5px}
.mg-sum b{color:var(--text);font-variant-numeric:tabular-nums}
.mg-filter{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.mg-filter .input{width:auto;min-width:200px;flex:1}
.mg-body{display:grid;grid-template-columns:minmax(260px,340px) 1fr;gap:18px;align-items:start}
.mg-list{padding:8px;max-height:calc(100vh - 210px);overflow:auto;position:sticky;top:90px}
.mg-item{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;color:var(--text);text-decoration:none;transition:background .15s}
.mg-item:hover{background:rgba(255,255,255,.05)}
.mg-item.on{background:rgba(30,155,255,.14);box-shadow:inset 0 0 0 1px rgba(79,180,255,.35)}
.mg-item:focus-visible{outline:2px solid var(--blue-2);outline-offset:-2px}
.mg-ico{flex:none;width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:rgba(30,155,255,.12);color:var(--blue-2)}
.mg-ico svg{width:16px;height:16px}
.mg-txt{display:flex;flex-direction:column;min-width:0;flex:1}
.mg-txt b{font-size:13.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-txt small{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mg-amt{flex:none;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.mg-view{display:flex;flex-direction:column;gap:18px;min-width:0}
.mg-stagebox{padding:10px}
.mg-stage{position:relative;height:min(62vh,560px);min-height:320px;border-radius:14px;overflow:hidden;background:radial-gradient(120% 90% at 50% 20%,rgba(30,155,255,.10),rgba(0,0,0,.25))}
.mg-hint{margin:8px 4px 0}
.mg-info h2{font-size:17px;font-weight:600}
.mg-info-head p{margin-top:4px}
.mg-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}
.mg-facts div{padding:10px 12px;border-radius:12px;background:rgba(0,0,0,.2);box-shadow:inset 0 0 0 1px var(--line)}
.mg-facts dt{font-size:11.5px;color:var(--muted)}
.mg-facts dd{font-size:15px;font-weight:600;margin:2px 0 0;font-variant-numeric:tabular-nums}
.mg-scope{font-size:13.5px;line-height:1.55;color:var(--muted)}
.mg-sub{font-size:13px;font-weight:600;margin:14px 0 8px}
.mg-partsbox .mg-sub{margin-top:0}
.mg-jobs{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.mg-jobs li{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;font-size:13.5px}
.mg-price{color:var(--muted);font-size:12.5px;font-variant-numeric:tabular-nums}
@media (max-width:900px){
  .mg-body{grid-template-columns:1fr}
  .mg-list{position:static;max-height:300px;order:2}
  .mg-view{order:1}
  .mg-facts{grid-template-columns:repeat(2,1fr)}
  .mg-stage{height:52vh;min-height:280px}
}
