/* ============================================================
   KREP_GLAV199 · krep-glav199.css
   КРЕПИОН · 10.10.2026 · новая главная по решениям владельца
   Слева панель категорий строками, по центру: баннер услуг,
   справочник ГОСТ, наши услуги, статьи, популярные товары.
   Шапка тёмно-синяя, фон ровный светлый.
   Работает только на главной (класс g199-on ставит krep-glav199.js).
   ОТКАТ: убрать подключение krep-glav199.css и krep-glav199.js из index.html.
   ============================================================ */
@media screen {

html.g199-on{
  --g-navy:#16324a; --g-navy2:#1f4060; --g-green:#129b54; --g-green2:#16b34a;
  --g-bg:#eef3f7; --g-line:#d5dee6; --g-ink:#1c2b38; --g-mute:#5b6b78;
  --g-ban:#0f3d2a; --g-tag:#f2a93b;
}

/* ---------- фон страницы: ровный светлый вместо фото склада ---------- */
html.g199-on body{ background:#eef3f7 !important; }
html.g199-on body::before{ display:none !important; }

/* ---------- шапка: тёмно-синяя вместо чёрной ---------- */
html.g199-on.krr-on .topbar.glass{ background:var(--g-navy) !important; border-color:var(--g-navy) !important; }
html.g199-on.krr-on .nav.glass{ background:var(--g-navy2) !important; border-color:var(--g-navy2) !important; }
html.g199-on.krr-on .topbar .cart-btn{ border-color:#2d5677 !important; }
html.g199-on.krr-on .topbar .tagline{ color:#b5c8d8 !important; }
html.g199-on.krr-on .nav.glass a{ color:#d6e2ec !important; }

/* ---------- старое на главной прячем (код и данные остаются) ---------- */
html.g199-on .hero.hero-home{ display:none !important; }
html.g199-root #crumbRow,
html.g199-root #count,
html.g199-root #layout,
html.g199-root #sectionHead{ display:none !important; }

/* ---------- раскладка ---------- */
#g199{ display:none; color:var(--g-ink); }
html.g199-root #g199{
  display:grid; grid-template-columns:250px minmax(0,1fr); gap:20px;
  align-items:start; margin-top:16px;
}

/* ---------- левая панель категорий ---------- */
.g199-side{
  position:sticky; top:calc(var(--g199-top,130px) + 12px);
  max-height:calc(100vh - var(--g199-top,130px) - 24px); overflow:auto;
  background:#fff; border:1px solid var(--g-line); border-radius:12px; padding:10px 10px 6px;
  scrollbar-width:thin;
}
.g199-side-h{
  display:flex; align-items:baseline; justify-content:space-between; gap:8px;
  width:100%; background:none; border:0; padding:4px 6px 10px; margin:0;
  font:inherit; color:var(--g-ink); cursor:default; text-align:left;
}
.g199-side-h b{ font-size:16px; font-weight:700; }
.g199-side-h small{ font-size:12px; color:var(--g-mute); }
.g199-side-h i{ display:none; }
.g199-row{
  display:flex; align-items:center; gap:10px; min-height:44px; padding:5px 6px;
  border-top:1px solid #e6ecf1; color:var(--g-ink); text-decoration:none; font-size:14px; line-height:1.25;
  border-radius:0;
}
.g199-row:hover{ background:#f1f6f3; color:var(--g-green); }
.g199-row img{ width:40px; height:30px; object-fit:cover; border-radius:5px; flex:none; background:#e9eef2; }
.g199-row span{ flex:1; min-width:0; }
.g199-row em{ font-style:normal; font-size:12px; color:var(--g-mute); flex:none; }

/* ---------- центр: общие заголовки секций ---------- */
.g199-main{ min-width:0; }
.g199-h{ display:flex; align-items:center; gap:10px; margin:26px 0 12px; }
.g199-h::before{ content:""; width:4px; height:18px; background:var(--g-green2); flex:none; }
.g199-h h2{ margin:0; font-size:19px; font-weight:700; color:var(--g-ink); }
.g199-h a{ margin-left:auto; font-size:14px; color:var(--g-green); text-decoration:none; white-space:nowrap; }
.g199-h a:hover{ text-decoration:underline; }

/* ---------- баннер услуг ---------- */
.g199-ban{
  position:relative; background:var(--g-ban); border-radius:14px; overflow:hidden; height:270px;
}
.g199-sl{
  position:absolute; inset:0; display:grid; grid-template-columns:minmax(0,1fr) 46%;
  opacity:0; visibility:hidden; transition:opacity .45s ease, visibility .45s;
}
.g199-sl.on{ opacity:1; visibility:visible; }
.g199-sl-t{ padding:28px 30px 24px 64px; display:flex; flex-direction:column; justify-content:center; color:#fff; }
.g199-tag{
  align-self:flex-start; background:var(--g-tag); color:#3a2400; font-size:12.5px; font-weight:600;
  padding:3px 10px; border-radius:5px; margin-bottom:12px;
}
.g199-sl-t h3{ margin:0 0 8px; font-size:24px; line-height:1.2; font-weight:700; color:#fff; }
.g199-sl-t p{ margin:0 0 16px; font-size:14.5px; line-height:1.5; color:#cfe3d7; max-width:440px; }
.g199-btn{
  align-self:flex-start; display:inline-flex; align-items:center; min-height:44px; padding:0 20px;
  background:var(--g-green2); color:#fff; border:0; border-radius:9px; font:inherit; font-size:14.5px; font-weight:600;
  cursor:pointer; text-decoration:none;
}
.g199-btn:hover{ background:#139e41; }
.g199-sl-p{ background:#24384a center/cover no-repeat; }
.g199-ar{
  position:absolute; top:50%; transform:translateY(-50%); z-index:3;
  width:40px; height:40px; border-radius:9px; border:0; background:rgba(255,255,255,.16); color:#fff;
  font-size:18px; line-height:1; cursor:pointer; padding:0;
}
.g199-ar:hover{ background:rgba(255,255,255,.3); }
.g199-ar.l{ left:12px; } .g199-ar.r{ right:12px; }
.g199-dots{ position:absolute; left:64px; bottom:14px; display:flex; gap:6px; z-index:3; }
.g199-dots i{ width:8px; height:5px; background:rgba(255,255,255,.35); cursor:pointer; transition:width .3s; }
.g199-dots i.on{ width:24px; background:var(--g-green2); }

/* ---------- справочник ГОСТ ---------- */
.g199-gost{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.g199-g{
  display:block; background:#fff; border:1px solid var(--g-line); border-radius:10px; padding:11px 13px;
  text-decoration:none; color:var(--g-ink); min-height:44px; transition:border-color .15s, transform .15s;
}
.g199-g:hover{ border-color:var(--g-green); transform:translateY(-2px); }
.g199-g b{ display:block; font-size:14.5px; font-weight:700; color:var(--g-green); margin-bottom:3px; }
.g199-g span{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-size:12.5px; line-height:1.4; color:var(--g-mute);
}

/* ---------- наши услуги ---------- */
.g199-svc{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.g199-s{ background:#fff; border:1px solid var(--g-line); border-radius:12px; overflow:hidden; display:flex; flex-direction:column; }
.g199-s-p{ height:130px; background:#24384a center/cover no-repeat; }
.g199-s-t{ padding:11px 13px 13px; display:flex; flex-direction:column; flex:1; }
.g199-s-t b{ font-size:14.5px; line-height:1.3; margin-bottom:4px; }
.g199-s-t small{ font-size:12.5px; color:var(--g-mute); margin-bottom:10px; }
.g199-s-t .g199-btn{ margin-top:auto; min-height:40px; font-size:13.5px; padding:0 16px; }

/* ---------- статьи (переносится старый блок .krep-stat) ---------- */
#g199 .krep-stat{ max-width:none; margin:0; padding:0; }
#g199 .krep-stat > .section-head{ display:none; }
#g199 .krep-stat-grid{ grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
#g199 .krep-stat-card{
  background:#fff; border:1px solid var(--g-line); border-radius:12px; padding:0; overflow:hidden;
  display:flex; flex-direction:column;
}
#g199 .krep-stat-card:hover{ border-color:var(--g-green); }
#g199 .krep-stat-card b{ font-size:14.5px; margin:11px 13px 4px; }
#g199 .krep-stat-card span{
  font-size:12.5px; margin:0 13px 12px; opacity:1; color:var(--g-mute);
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
.g199-th{ display:block; height:104px; background:#24384a no-repeat; flex:none; }

/* ---------- популярные товары (переносится старый блок #popular) ---------- */
#g199 .popular{ margin-top:0; }
#g199 .popular > .section-head{ display:flex; align-items:center; gap:10px; margin:26px 0 12px; }
#g199 .popular > .section-head::before{ content:""; width:4px; height:18px; background:var(--g-green2); flex:none; }
#g199 .popular > .section-head h2{ margin:0; font-size:19px; font-weight:700; color:var(--g-ink); }
#g199 .popular .pop-grid{ gap:10px; }
#g199 .popular .card{ padding:10px; background:#fff !important; border:1px solid var(--g-line) !important; }
#g199 .popular .shot{ height:92px; margin-bottom:8px; }
#g199 .popular .tag{ font-size:11px; }
#g199 .popular .card h3{ font-size:13px; }
#g199 .popular > .section-head{ justify-content:flex-start; }
#g199 .popular > .section-head h2{ margin:0 !important; text-align:left; }
#g199 .popular .tag{ display:none; }
#g199 .popular .card .bottom{ flex-direction:column; align-items:stretch; gap:6px; }
#g199 .popular .card .price{ font-size:14px; white-space:nowrap; }
#g199 .popular .card .add{ width:100%; min-height:36px; }

/* ---------- планшет ---------- */
@media (max-width:1180px){
  html.g199-root #g199{ grid-template-columns:220px minmax(0,1fr); gap:16px; }
  .g199-gost, .g199-svc, #g199 .krep-stat-grid{ grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* ---------- телефон: панель становится кнопкой «Каталог» ---------- */
@media (max-width:900px){
  html.g199-root #g199{ display:block; margin-top:12px; }
  .g199-side{ position:static; max-height:none; overflow:visible; margin-bottom:14px; padding:4px 10px; }
  .g199-side-h{ cursor:pointer; padding:10px 6px; min-height:44px; align-items:center; }
  .g199-side-h i{ display:block; font-style:normal; font-size:14px; color:var(--g-green); transition:transform .2s; }
  .g199-side .g199-row{ display:none; }
  .g199-side.open .g199-row{ display:flex; }
  .g199-side.open .g199-side-h i{ transform:rotate(180deg); }
  .g199-ban{ height:auto; min-height:380px; }
  .g199-sl{ grid-template-columns:1fr; grid-template-rows:150px auto; }
  .g199-sl-p{ grid-row:1; }
  .g199-sl-t{ grid-row:2; padding:16px 18px 40px; }
  .g199-sl-t h3{ font-size:20px; }
  .g199-ar{ top:75px; }
  .g199-dots{ left:18px; }
  .g199-gost, .g199-svc, #g199 .krep-stat-grid{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:480px){
  #g199 .krep-stat-grid{ grid-template-columns:1fr; }
  .g199-s-p{ height:100px; }
  .g199-th{ height:80px; }
}

} /* @media screen */
