/* ============================================================
   Публичный каталог (витрина). Самостоятельные стили: НЕ наследуют
   app.css (у которого body{overflow:hidden} под админ-шелл). Палитра — та же.
   ============================================================ */
:root{
  --bg:#f4f8f8; --surface:#fff; --surface-2:#f5faf9; --text:#22424a;
  --muted:#7e99a0; --faint:#aabfc3; --border:#eef3f3; --border-2:#e7efef;
  --primary:#2bab9b; --primary-strong:#1f9082; --primary-soft:#e7f5f1;
  --green-soft:#e7f5ee; --green-ink:#2c9670;
  --radius:20px; --radius-sm:14px; --ease:cubic-bezier(.22,.61,.36,1);
  --shadow:0 1px 2px rgba(22,52,56,.03), 0 10px 28px rgba(22,52,56,.045);
  --shadow-lift:0 2px 5px rgba(22,52,56,.05), 0 22px 46px rgba(22,52,56,.09);
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,"Helvetica Neue",Arial,sans-serif;
  background:var(--bg);color:var(--text);font-size:15px;line-height:1.5;-webkit-font-smoothing:antialiased;letter-spacing:.1px}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
.muted{color:var(--muted)}

/* ===== header ===== */
.cat-head{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:18px;flex-wrap:wrap;
  padding:14px 26px;background:rgba(255,255,255,.86);backdrop-filter:blur(10px);border-bottom:1px solid var(--border)}
.cat-brand{display:flex;align-items:center;gap:12px}
.cat-logo{width:42px;height:42px;border-radius:13px;flex:none;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(140deg,var(--primary),#23a7cf);color:#fff;font-weight:800;font-size:15px;letter-spacing:.5px;
  box-shadow:0 8px 18px rgba(43,171,155,.3)}
.cat-bn b{display:block;font-size:18px;font-weight:760;letter-spacing:.2px}
.cat-bn i{display:block;font-style:normal;font-size:12px;color:var(--faint);margin-top:1px}
.cat-tabs{display:inline-flex;background:var(--surface);border:1px solid var(--border-2);border-radius:13px;padding:4px;gap:3px;box-shadow:var(--shadow)}
.cat-tabs a{padding:8px 18px;border-radius:9px;font-size:13.5px;font-weight:600;color:var(--muted);transition:all .2s var(--ease)}
.cat-tabs a:hover{color:var(--text)}
.cat-tabs a.on{background:var(--primary-soft);color:var(--primary-strong)}

/* ===== main ===== */
.cat-main{max-width:1180px;margin:0 auto;padding:30px 26px 60px}
.cat-hero{margin-bottom:26px}
.cat-hero h1{font-size:30px;font-weight:780;letter-spacing:-.3px;margin:0}
.cat-hero p{margin:8px 0 0;color:var(--muted);font-size:15px}
.cat-h1{font-size:26px;font-weight:760;margin:6px 0 22px}
.cat-crumbs{font-size:13px;color:var(--muted);margin-bottom:14px}
.cat-crumbs a:hover{color:var(--primary-strong)}
.cat-crumbs b{color:var(--text);font-weight:600}
.cat-fac-head{display:flex;align-items:center;gap:16px;margin:6px 0 22px}
.cat-fac-head img{width:64px;height:64px;object-fit:contain;border:1px solid var(--border-2);border-radius:14px;background:var(--surface-2);padding:6px}
.cat-fac-head h1{font-size:26px;font-weight:760;margin:0}
.cat-empty{padding:60px 20px;text-align:center;color:var(--muted);background:var(--surface);border:1px solid var(--border);border-radius:var(--radius)}

/* ===== grids ===== */
.cat-grid{display:grid;gap:18px}
.cat-grid.cats,.cat-grid.facs{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
.cat-grid.prods{grid-template-columns:repeat(auto-fill,minmax(216px,1fr))}

/* category / factory tiles */
.cat-tile,.fac-tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);
  padding:14px;box-shadow:var(--shadow);transition:box-shadow .25s var(--ease),transform .25s var(--ease)}
.cat-tile:hover,.fac-tile:hover,.prod-tile:hover{box-shadow:var(--shadow-lift);transform:translateY(-3px)}
.cat-tile b,.fac-tile b{display:block;margin-top:12px;font-size:15px;font-weight:680}
.cat-tile span,.fac-tile span{font-size:12.5px}
.cat-tile-img{aspect-ratio:4/3;border-radius:11px;overflow:hidden;background:var(--surface-2)}
.cat-tile-img img{width:100%;height:100%;object-fit:cover}
.fac-tile{text-align:center}
.fac-logo{height:84px;display:flex;align-items:center;justify-content:center;border-radius:11px;background:var(--surface-2);overflow:hidden}
.fac-logo img{max-width:80%;max-height:80%;object-fit:contain}
.fac-logo span{font-size:26px;font-weight:800;color:var(--primary-strong)}

/* product tile */
.prod-tile{display:block;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;
  box-shadow:var(--shadow);transition:box-shadow .25s var(--ease),transform .25s var(--ease)}
.prod-img{aspect-ratio:1/1;background:var(--surface-2)}
.prod-img img{width:100%;height:100%;object-fit:cover}
.prod-body{padding:13px 14px 15px}
.prod-body b{font-size:14.5px;font-weight:660;line-height:1.3;display:block}
.prod-spec{color:var(--muted);font-size:12.5px;margin-top:5px;min-height:16px}
.prod-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:11px;font-size:12.5px}
.prod-price{font-size:16px;font-weight:760;color:var(--text)}

/* product detail */
.prod-detail{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:34px;align-items:start}
.pg-main{aspect-ratio:1/1;border-radius:var(--radius);overflow:hidden;background:var(--surface-2);border:1px solid var(--border)}
.pg-main img{width:100%;height:100%;object-fit:cover}
.pg-thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
.pg-thumbs img{width:74px;height:74px;object-fit:cover;border-radius:11px;border:1px solid var(--border-2);background:var(--surface-2)}
.prod-info h1{font-size:26px;font-weight:760;margin:0 0 12px;letter-spacing:-.2px}
.prod-price.big,.prod-info .big{font-size:26px;font-weight:780;margin-bottom:18px}
.prod-attrs{border-collapse:collapse;width:100%;margin-bottom:20px}
.prod-attrs td{padding:9px 0;border-bottom:1px solid var(--border);font-size:14px;vertical-align:top}
.prod-attrs td:first-child{color:var(--muted);width:40%}
.prod-fac{display:inline-flex;align-items:center;gap:11px;padding:11px 16px;border:1px solid var(--border-2);border-radius:13px;background:var(--surface);transition:box-shadow .2s}
.prod-fac:hover{box-shadow:var(--shadow)}
.prod-fac img{width:38px;height:38px;object-fit:contain}
.prod-cta{margin-top:20px;color:var(--muted);font-size:13.5px}

/* footer */
.cat-foot{border-top:1px solid var(--border);padding:26px;text-align:center;color:var(--muted);font-size:13px;background:var(--surface)}
.cat-foot .muted{margin-top:4px;font-size:12px;color:var(--faint)}

@media(max-width:720px){
  .prod-detail{grid-template-columns:1fr;gap:22px}
  .cat-hero h1{font-size:25px}
}
