/* SANITECH product mega menu — database-driven desktop layout */
body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2,
body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2 * { box-sizing: border-box; }

body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2 {
    float: none !important; margin: 0 !important; padding: 0 !important; min-width: 0 !important;
    list-style: none !important; background: #fff !important; text-align: left !important;
    --mm-v2-green-dark: #25575b;
    --mm-v2-green-mid: #176064;
    --mm-v2-green: #157a7d;
    --mm-v2-green-soft: #e8f2f2;
    --mm-v2-hover-start: #34787b;
    --mm-v2-hover-mid: #2b888a;
    --mm-v2-hover-end: #31999a;
}

@media (min-width: 992px) {
    body .full-width-header .rs-header .menu-area,
    body .full-width-header .rs-header .menu-area .container.custom.box-layout { overflow: visible !important; }
    body .full-width-header .rs-header .menu-area .box-layout { position: relative; overflow: visible; }
    body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2 {
        position: absolute; z-index: 1200; top: 100%; left: 50%; display: none;
        width: min(calc(100vw - 32px), 1210px); max-width: 1210px; overflow: hidden;
        border: 1px solid #dce7e8; border-top: 0; border-radius: 0 0 16px 16px;
        box-shadow: 0 18px 45px rgba(4, 40, 48, .18); transform: translateX(-50%); pointer-events: none;
    }
    body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2[hidden] { display: none !important; }
    body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2.is-open { display: block !important; pointer-events: auto; }
    body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2.is-open::before {
        content: ""; position: absolute; top: -16px; right: 0; left: 0; height: 16px;
    }
    body .full-width-header .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li.rs-mega-menu > a::before,
    body .full-width-header .rs-header .menu-area .main-menu .rs-menu ul.nav-menu > li.rs-mega-menu > a::after {
        display: none !important; content: none !important;
    }
}

.mm-v2__layout {
    display: grid; grid-template-columns: 310px minmax(0, 1fr); min-height: 530px;
    max-height: min(660px, calc(100vh - 125px)); background: #fff;
}
.mm-v2__sidebar {
    min-width: 0; overflow-y: auto; padding: 16px 12px; border-right: 1px solid #dfe8eb;
    background: linear-gradient(180deg, #f4f8fa 0%, #eef4f6 100%); scrollbar-width: thin; scrollbar-color: #9dbbb7 transparent;
}
.mm-v2__parent-item {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 0 0 8px;
    padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; color: #071b4d;
    font: inherit; text-align: left; cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, min-height .18s ease;
}
.mm-v2__parent-item:last-child { margin-bottom: 0; }
.mm-v2__parent-item:hover, .mm-v2__parent-item.is-active {
    min-height: 64px;
    background: linear-gradient(135deg, var(--mm-v2-hover-start), var(--mm-v2-hover-mid) 48%, var(--mm-v2-hover-end)); color: #fff;
    box-shadow: 0 7px 16px rgba(43, 136, 138, .18);
}
.mm-v2__parent-icon {
    display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 34px; overflow: visible;
    padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
    transition: width .18s ease, height .18s ease, flex-basis .18s ease;
}
.mm-v2__parent-icon img {
    width: 100%; height: 100%; object-fit: contain;
    transition: none;
}
.mm-v2__parent-icon i { color: var(--mm-v2-green); font-size: 22px; transition: font-size .18s ease, color .18s ease; }
.mm-v2__parent-item:hover .mm-v2__parent-icon i, .mm-v2__parent-item.is-active .mm-v2__parent-icon i { color: #fff; font-size: 28px; }
.mm-v2__parent-item:hover .mm-v2__parent-icon,
.mm-v2__parent-item.is-active .mm-v2__parent-icon {
    flex-basis: 58px;
    width: 58px;
    height: 48px;
    background: transparent;
    box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
    .mm-v2__parent-item,
    .mm-v2__parent-icon,
    .mm-v2__parent-icon i {
        transition: none;
    }
}
.mm-v2__parent-copy { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; }
.mm-v2__parent-copy strong { color: inherit; font-size: 14px; font-weight: 750; line-height: 1.35; }
.mm-v2__parent-copy small {
    overflow: hidden; color: #657985; font-size: 13px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap;
}
.mm-v2__parent-item:hover .mm-v2__parent-copy small, .mm-v2__parent-item.is-active .mm-v2__parent-copy small { color: rgba(255, 255, 255, .88); }
.mm-v2__parent-chevron { flex: 0 0 auto; color: #63808c; font-size: 20px; }
.mm-v2__parent-item:hover .mm-v2__parent-chevron, .mm-v2__parent-item.is-active .mm-v2__parent-chevron { color: #fff; }

.mm-v2__content {
    min-width: 0; overflow-x: hidden; overflow-y: auto; padding: 18px 22px 12px; background: #fff;
    scrollbar-width: thin; scrollbar-color: #9dbbb7 transparent;
}
.mm-v2__detail-panel { display: none; min-height: 100%; }
.mm-v2__detail-panel.is-active { display: flex; flex-direction: column; }
.mm-v2__detail-head {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 48px; margin-bottom: 14px;
}
body .mega-menu.mm-v2 .mm-v2__detail-head h3 {
    margin: 0 !important; color: #071b4d !important; font-size: 23px !important; font-weight: 800 !important; line-height: 1.3 !important;
}
body .mega-menu.mm-v2 .mm-v2__detail-head > a {
    display: inline-flex !important; align-items: center; gap: 7px; height: auto !important; padding: 6px 0 !important;
    color: var(--mm-v2-green) !important; font-size: 14px; font-weight: 750; line-height: 1.4 !important;
    text-decoration: none; white-space: nowrap;
}
.mm-v2__category-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 28px; align-items: start;
}
.mm-v2__category-card { min-width: 0; max-width: 100%; overflow: hidden; }
body .mega-menu.mm-v2 a.mm-v2__category-head {
    display: grid !important; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; align-items: center;
    min-height: 82px; padding: 0 0 9px !important; border-bottom: 1px solid #cad7dc;
    color: #071b4d !important; text-decoration: none !important;
}
.mm-v2__category-media { display: grid; place-items: center; width: 82px; height: 72px; overflow: hidden; }
.mm-v2__category-media img { width: 100%; height: 100%; object-fit: contain; }
.mm-v2__category-media i { color: var(--mm-v2-green); font-size: 38px; }
.mm-v2__category-title { display: flex; flex-direction: column; min-width: 0; }
.mm-v2__category-title strong {
    display: -webkit-box; overflow: hidden; color: #071b4d; font-size: 18px; font-weight: 800;
    line-height: 1.3; overflow-wrap: anywhere; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
.mm-v2__category-title small { margin-top: 2px; color: #60737e; font-size: 13px; line-height: 1.3; }
.mm-v2__product-list { display: grid; width: 100%; min-width: 0; gap: 3px; margin: 8px 0 0; padding: 0; list-style: none; }
.mm-v2__product-list li { width: 100%; min-width: 0; margin: 0; padding: 0; overflow: hidden; }
body .mega-menu.mm-v2 .mm-v2__product-list a {
    display: -webkit-box !important; width: 100%; min-width: 0; overflow: hidden; height: auto !important; padding: 2px 0 !important;
    color: #294550 !important; font-size: 13px; font-weight: 500; line-height: 1.4 !important;
    text-decoration: none !important; white-space: normal; overflow-wrap: anywhere; word-break: normal;
    -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}
body .mega-menu.mm-v2 .mm-v2__product-list a:hover,
body .mega-menu.mm-v2 a.mm-v2__category-head:hover .mm-v2__category-title strong { color: var(--mm-v2-green) !important; }
.mm-v2__category-empty { margin: 9px 0 0; color: #71848e; font-size: 13px; line-height: 1.4; }

body .mega-menu.mm-v2 a.mm-v2__catalog-bar {
    display: flex !important; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 48px;
    margin-top: auto; padding: 10px 18px !important; border-radius: 9px; background: linear-gradient(90deg, #f0f5f5, var(--mm-v2-green-soft));
    color: var(--mm-v2-green-mid) !important; font-size: 16px; font-weight: 800; line-height: 1.3 !important; text-decoration: none !important;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
body .mega-menu.mm-v2 a.mm-v2__catalog-bar:hover {
    background: linear-gradient(90deg, var(--mm-v2-hover-start), var(--mm-v2-hover-mid) 48%, var(--mm-v2-hover-end)) !important;
    color: #fff !important;
    box-shadow: 0 7px 16px rgba(43, 136, 138, .18);
}
.mm-v2__catalog-bar span { display: inline-flex; align-items: center; gap: 12px; }
.mm-v2__catalog-bar i { font-size: 22px; }
.mm-v2__catalog-bar.is-disabled { opacity: .72; }

@media (max-width: 1199.98px) and (min-width: 992px) {
    .mm-v2__layout { grid-template-columns: 270px minmax(0, 1fr); }
    .mm-v2__category-grid { gap: 18px; }
    .mm-v2__category-title strong { font-size: 16px; }
}
@media (max-width: 991.98px) {
    body .full-width-header .rs-header .menu-area .box-layout > .mega-menu.mm-v2 { display: none !important; }
}
