/* Стройоптторг · Catalog Mega Menu V1.1 · simplified labels and maximum 3 category levels. */
.sf-header{position:relative;z-index:65}
.sf-catalog-panel.sf-mega[hidden],
.sf-mega-view[hidden],
.sf-mobile-screen[hidden]{display:none!important}
.sf-catalog-panel.sf-mega{
  position:absolute;top:calc(100% + 14px);left:0;
  width:min(1020px,calc(100vw - 284px));
  max-height:min(78vh,760px);overflow:hidden;
  z-index:90;padding:0;display:flex;flex-direction:column;
  background:#fff;border:1px solid #e4eaf2;border-radius:14px;
  box-shadow:0 26px 75px rgba(13,43,94,.19),0 3px 12px rgba(13,43,94,.06);
  color:#142a49;text-align:left;
}
.sf-mega-top{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 25px;border-bottom:1px solid #e8edf4}
.sf-mega-top b{font-size:20px;letter-spacing:-.035em;color:#0d2b5e;line-height:1.25}
.sf-mega-close{display:grid;place-items:center;width:38px;height:38px;flex:none;border:1px solid #e3e9f1;border-radius:10px;background:#fff;color:#17335a;transition:background .15s}
.sf-mega-close:hover{background:#f3f7fc}
.sf-mega-layout{display:grid;grid-template-columns:minmax(210px,28%) minmax(0,1fr);min-height:310px;overflow:hidden;flex:1}
.sf-mega-sidebar{overflow:auto;overscroll-behavior:contain;padding:12px 9px 16px 13px;background:#f7f9fc;border-right:1px solid #e8edf4}
.sf-mega-parent{display:flex;align-items:stretch;margin-bottom:2px;border-radius:9px;min-height:43px;transition:background .12s}
.sf-mega-parent a{display:flex;align-items:center;flex:1;min-width:0;padding:10px 6px 10px 12px;color:#263c56;font-size:13px;line-height:1.36;text-decoration:none;font-weight:560;overflow-wrap:anywhere}
.sf-mega-parent button{display:grid;place-items:center;flex:0 0 36px;align-self:stretch;background:transparent;border:0;border-radius:9px;color:#6c7c91;font-size:12px}
.sf-mega-parent.is-active{background:#e8f1fb}
.sf-mega-parent.is-active a{color:var(--brand-blue,#012f91);font-weight:700}
.sf-mega-parent.is-active button{color:var(--brand-blue,#012f91)}
.sf-mega-parent:hover:not(.is-active){background:#edf2f8}
.sf-mega-detail{overflow-y:auto;overscroll-behavior:contain;min-width:0;padding:24px 29px 22px}
.sf-mega-section-head{display:flex;flex-direction:column;align-items:flex-start;gap:9px;margin-bottom:18px}
.sf-mega-root-title{display:inline-flex;align-items:baseline;gap:12px;color:#0d2b5e;text-decoration:none;font-size:clamp(20px,2vw,25px);font-weight:750;letter-spacing:-.04em;line-height:1.22}
.sf-mega-root-title:hover{color:var(--brand-blue,#012f91)}
.sf-mega-root-title i{font-size:15px}
.sf-mega-columns{column-count:3;column-gap:29px}
.sf-mega-group{break-inside:avoid;display:block;padding-bottom:21px}
.sf-mega-subtitle{display:block;color:#14355e;font-size:13.5px;font-weight:720;line-height:1.35;text-decoration:none;margin-bottom:10px;overflow-wrap:anywhere}
.sf-mega-subtitle:hover{color:var(--brand-blue,#012f91)}
.sf-mega-links{padding:0;margin:0;list-style:none}
.sf-mega-links li{padding:0;margin:0 0 9px;font-size:12.5px;line-height:1.43;overflow-wrap:anywhere}
.sf-mega-links a{color:#52647a;text-decoration:none}
.sf-mega-links a:hover{text-decoration:underline;text-underline-offset:3px;color:var(--brand-blue,#012f91)}
.sf-mega-no-children{color:#687991;font-size:13px}
/* Mobile category drill-down lives in the existing accessible drawer. */
.sf-mobile-categories{width:100%;margin:10px 0 12px}
.sf-mobile-label{color:#72839a;letter-spacing:.09em;text-transform:uppercase;font-size:10px;font-weight:700;margin:18px 0 5px}
.sf-mobile-category-list{display:grid;gap:0}
.sf-mobile-category-row{display:flex;align-items:stretch;gap:0;border-bottom:1px solid #e7edf4;min-height:51px}
.sf-mobile-category-row>a{display:flex;align-items:center;flex:1;min-width:0;padding:12px 10px 12px 0;color:#183557;font-size:14px;font-weight:550;line-height:1.35;text-decoration:none;overflow-wrap:anywhere}
.sf-mobile-category-row button{flex:none;width:45px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--brand-blue,#012f91);font-size:12px}
.sf-mobile-category-row button:hover,.sf-mobile-category-row button:focus-visible{background:#edf4fc}
.sf-mobile-back{display:inline-flex;align-items:center;gap:9px;margin:4px 0 18px;padding:9px 0;border:0;background:transparent;color:var(--brand-blue,#012f91);font-size:13px;font-weight:650}
.sf-mobile-title{margin:0 0 12px;color:#102c52;font-size:22px;font-weight:750;line-height:1.23;letter-spacing:-.03em;overflow-wrap:anywhere}
.sf-mobile-view-all{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 13px;border-radius:9px;background:#edf4fc;color:var(--brand-blue,#012f91);text-decoration:none;font-size:13px;font-weight:700;margin-bottom:8px}
.sf-drawer.sf-drawer-in-categories .sf-drawer-catalog,.sf-drawer.sf-drawer-in-categories .sf-drawer-secondary,.sf-drawer.sf-drawer-in-categories .sf-drawer-phone{display:none!important}
@media(min-width:992px) and (max-width:1199px){
  .sf-mega-columns{column-count:2;column-gap:23px}
  .sf-mega-detail{padding:20px 23px}
}
@media(max-width:991px){
  .sf-catalog-panel.sf-mega{display:none!important}
  .sf-drawer{scroll-behavior:auto}
  .sf-mobile-categories{margin-top:8px}
}
@media(min-width:992px){
  /* On desktop the drawer is not used; avoid duplicate visible category trees. */
  .sf-mobile-categories{display:none}
}
@media(prefers-reduced-motion:reduce){
  .sf-mega-parent,.sf-mega-close{transition:none}
}
