/* R49: centred, stable three-level catalogue with uncropped visual preview. */
@media (min-width:1200px) {
  .site-header .has-product-mega { position:relative !important; }
  .site-header .product-mega-menu[data-product-mega-menu] {
    position:absolute !important;
    left:var(--product-mega-left,0px) !important;
    top:var(--product-mega-top,100%) !important;
    width:min(1020px,calc(100vw - 44px)) !important;
    padding:0 !important; overflow:hidden !important;
    border:1px solid rgba(10,67,101,.14) !important; border-radius:17px !important;
    background:#fff !important; box-shadow:0 24px 65px rgba(5,35,55,.19) !important;
    transform:none !important;
    transform-origin:top center !important;
    transition:opacity .2s ease,transform .24s ease,visibility .2s !important;
  }
  .site-header .has-product-mega:hover .product-mega-menu[data-product-mega-menu],
  .site-header .has-product-mega:focus-within .product-mega-menu[data-product-mega-menu],
  .site-header .has-product-mega.is-mega-open .product-mega-menu[data-product-mega-menu] { transform:none !important; }
  .site-header .product-mega-head {
    min-height:54px !important; padding:10px 18px !important; margin:0 !important;
    border-bottom:1px solid #e4edf2 !important; background:linear-gradient(180deg,#fbfdfe,#f6fafc) !important;
  }
  .site-header .product-mega-head > div > span { display:none !important; }
  .site-header .product-mega-head strong { font-size:16px !important; letter-spacing:-.01em !important; }
  .site-header .product-mega-all { min-height:32px !important; padding-inline:12px !important; font-size:11px !important; }
  .site-header .product-mega-body {
    display:block !important; min-height:352px !important;
    max-height:min(470px,calc(var(--product-mega-max-height,calc(100dvh - 110px)) - 54px)) !important;
    overflow:hidden !important; background:#fff !important;
  }
  .site-header .product-mega-cascade {
    position:relative; display:grid; grid-template-columns:250px 230px 230px minmax(0,1fr); min-height:352px;
  }
  .site-header .product-mega-level1-list {
    position:relative; z-index:4; grid-column:1; min-height:352px; padding:12px;
    border-right:1px solid #e4edf2; background:#fff;
  }
  .site-header .product-mega-column {
    position:static !important; margin:0 !important; padding:0 !important; border:0 !important;
    border-radius:0 !important; background:transparent !important; box-shadow:none !important; transform:none !important;
  }
  .site-header .product-mega-root {
    display:grid !important; grid-template-columns:34px minmax(0,1fr) 18px !important;
    align-items:center !important; gap:10px !important; width:100% !important; min-height:54px !important;
    padding:7px 9px !important; border:0 !important; border-radius:10px !important;
    color:#163d52 !important; background:transparent !important;
    transition:background .18s ease,color .18s ease,transform .18s ease !important;
  }
  .site-header .product-mega-column:hover > .product-mega-root,
  .site-header .product-mega-column:focus-within > .product-mega-root,
  .site-header .product-mega-column.is-preview-active > .product-mega-root {
    color:#0875a5 !important; background:#eaf5f9 !important; transform:translateX(2px) !important;
  }
  .site-header .product-mega-industry-icon {
    display:grid; place-items:center; width:34px; height:34px; border-radius:9px; color:#16789d;
    background:#f0f7f9; box-shadow:inset 0 0 0 1px rgba(18,107,142,.12);
  }
  .site-header .product-mega-industry-icon--pump { color:#397587; background:#f2f7f8; }
  .site-header .product-mega-industry-icon--electric { color:#9a781e; background:#fbf8ed; }
  .site-header .product-mega-industry-icon--valve { color:#87664b; background:#f8f4f0; }
  .site-header .product-mega-industry-icon svg {
    width:18px !important; height:18px !important; fill:none; stroke:currentColor; stroke-width:1.65; stroke-linecap:round; stroke-linejoin:round;
  }
  .site-header .product-mega-root__copy { min-width:0 !important; }
  .site-header .product-mega-root__copy strong {
    display:block !important; overflow:hidden !important; font-size:13.5px !important; font-weight:800 !important;
    line-height:1.35 !important; text-overflow:ellipsis !important; white-space:nowrap !important;
  }
  .site-header .product-mega-arrow { width:18px !important; height:18px !important; fill:none; stroke:currentColor; stroke-width:1.8; }
  .site-header .product-mega-children {
    position:absolute !important; z-index:3; left:250px; top:0; display:none !important;
    width:230px; height:100%; max-height:100%; padding:12px; overflow:visible !important;
    border-right:1px solid #e4edf2; background:#fbfdfe;
  }
  .site-header .product-mega-column:hover > .product-mega-children,
  .site-header .product-mega-column:focus-within > .product-mega-children,
  .site-header .product-mega-column.is-menu-active > .product-mega-children { display:block !important; }
  .site-header .product-mega-branch { position:static !important; margin:0 !important; padding:0 !important; border:0 !important; background:transparent !important; }
  .site-header .product-mega-branch-link,
  .site-header .product-mega-level3 > a {
    display:grid !important; grid-template-columns:24px minmax(0,1fr) 16px; align-items:center; gap:8px;
    width:100%; min-height:45px; padding:7px 8px !important; overflow:hidden; border-radius:8px;
    color:#2c4b5b !important; font-size:12.5px !important; font-weight:750 !important;
    line-height:1.3 !important; white-space:nowrap !important; text-overflow:ellipsis;
  }
  .site-header .product-mega-branch-link > span:nth-child(2),
  .site-header .product-mega-level3 > a > span:nth-child(2) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .site-header .product-mega-branch-link svg { width:16px !important; height:16px !important; fill:none; stroke:currentColor; stroke-width:1.8; }
  .site-header .product-mega-node-icon {
    position:relative; display:grid; place-items:center; width:24px; height:24px; overflow:hidden;
    border-radius:7px; color:transparent; background:#edf5f7; font-size:0;
  }
  .site-header .product-mega-node-icon::before {
    content:""; width:7px; height:7px; border:1.5px solid #2781a2; border-radius:50%; background:#fff;
  }
  .site-header .product-mega-branch:hover > .product-mega-branch-link,
  .site-header .product-mega-branch:focus-within > .product-mega-branch-link,
  .site-header .product-mega-branch.is-preview-active > .product-mega-branch-link,
  .site-header .product-mega-level3 > a:hover,
  .site-header .product-mega-level3 > a:focus-visible,
  .site-header .product-mega-level3 > a.is-preview-active { color:#076f9c !important; background:#e8f4f8 !important; }
  .site-header .product-mega-level3 {
    position:absolute !important; z-index:2; left:230px; top:0; display:none !important;
    width:230px; height:100%; max-height:100%; padding:12px; overflow:auto; overscroll-behavior:contain;
    border-right:1px solid #e4edf2; background:#fff;
  }
  .site-header .product-mega-branch:hover > .product-mega-level3,
  .site-header .product-mega-branch:focus-within > .product-mega-level3,
  .site-header .product-mega-branch.is-menu-active > .product-mega-level3 { display:block !important; }
  .site-header .product-mega-level3 > a { grid-template-columns:24px minmax(0,1fr); min-height:43px; }
  .site-header .product-mega-level3 .product-mega-node-icon { color:transparent; background:#f0f4f5; }
  .site-header .product-mega-level3 .product-mega-node-icon::before { width:6px; height:6px; border-color:#718c98; border-radius:2px; }
  .site-header .product-mega-preview {
    position:absolute !important; z-index:1; right:0; top:0; display:grid !important;
    grid-template-rows:205px minmax(0,1fr) !important; width:310px; height:100%; min-height:0 !important;
    overflow:hidden; border:0 !important; border-radius:0 !important; background:#f5f9fb !important;
    opacity:0; transform:translateX(8px); transition:opacity .18s ease,transform .18s ease;
  }
  .site-header .product-mega-cascade:has(.product-mega-column:hover) .product-mega-preview,
  .site-header .product-mega-cascade:has(.product-mega-column:focus-within) .product-mega-preview,
  .site-header .product-mega-menu.is-cascade-expanded .product-mega-preview { opacity:1; transform:none; }
  .site-header .product-mega-preview__media {
    position:relative !important; inset:auto !important; height:205px !important; padding:8px !important; overflow:hidden; background:#fff !important;
  }
  .site-header .product-mega-preview__media::after {
    content:"" !important; display:block !important; position:absolute; inset:0;
    background:linear-gradient(180deg,rgba(7,40,55,0) 72%,rgba(7,40,55,.08)); pointer-events:none;
  }
  .site-header .product-mega-preview__media img {
    display:block; width:100%; height:100%; padding:0 !important; object-fit:contain !important; object-position:center !important;
    transition:opacity .2s ease,transform .45s ease !important;
  }
  .site-header .product-mega-preview__media img.is-switching { opacity:.24 !important; transform:scale(1.025) !important; }
  .site-header .product-mega-preview__copy {
    display:grid !important; align-content:start !important; gap:7px !important; padding:17px 18px 18px !important;
    border:0 !important; background:#f5f9fb !important; color:#163d52 !important;
  }
  .site-header .product-mega-preview__copy small { color:#1681ac !important; font-size:8.5px !important; font-weight:900 !important; letter-spacing:.14em !important; }
  .site-header .product-mega-preview__copy strong { overflow:hidden; color:#103a50 !important; font-size:17px !important; line-height:1.22 !important; text-overflow:ellipsis; white-space:nowrap; }
  .site-header .product-mega-preview__copy p {
    display:-webkit-box !important; margin:0 !important; overflow:hidden; color:#617985 !important;
    font-size:11px !important; line-height:1.55 !important; -webkit-box-orient:vertical; -webkit-line-clamp:2; line-clamp:2;
  }
  .site-header .product-mega-preview__copy > span { margin-top:1px !important; color:#0876a4 !important; font-size:10px !important; font-weight:800 !important; }
}

@media (min-width:1200px) and (max-width:1439px) {
  .site-header .product-mega-menu[data-product-mega-menu] { width:min(970px,calc(100vw - 30px)) !important; }
  .site-header .product-mega-cascade { grid-template-columns:246px 218px 218px minmax(0,1fr); }
  .site-header .product-mega-children { left:246px; width:218px; }
  .site-header .product-mega-level3 { left:218px; width:218px; }
  .site-header .product-mega-preview { width:288px; }
  .site-header .product-mega-root { grid-template-columns:34px minmax(0,1fr) 17px !important; gap:8px !important; }
  .site-header .product-mega-industry-icon { width:34px; height:34px; }
  .site-header .product-mega-root__copy strong { font-size:13px !important; }
}

/* V32 - configurable level-1 product category icons */
@media (min-width:901px){
  .site-header .product-mega-industry-icon.has-custom-image{background:#fff!important;color:inherit!important;overflow:hidden;padding:0}
  .site-header .product-mega-industry-icon.has-custom-image img{display:block;width:18px!important;height:18px!important;max-width:18px!important;max-height:18px!important;object-fit:contain;border-radius:4px}
  .site-header .product-mega-industry-icon--pipe{color:#3c6e8b;background:#eef6fa}
  .site-header .product-mega-industry-icon--gear{color:#506b7b;background:#f0f5f7}
  .site-header .product-mega-industry-icon--shield{color:#2f7b68;background:#eef8f4}
}
