/*
 * IndoSurgicals Desktop Header + Navigation + Mega Menu — v1.0
 * Patch 24
 *
 * Desktop-only visual layer. Mobile/tablet (<=900px) remains governed by the
 * completed mobile system and site-chrome-modern.css.
 */

@media (min-width: 901px) {
    /* ---------- Utility bar ---------- */
    html body .top_bar_container.isp-topbar {
        min-height: 34px;
        border-bottom-color: rgba(255, 255, 255, .07) !important;
        background: #203746 !important;
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .025);
    }

    html body .top_bar_container .isp-topbar-inner {
        width: min(var(--isp-ds-content-max), calc(100% - (var(--isp-ds-gutter) * 2))) !important;
        min-height: 34px;
        gap: 24px;
    }

    html body .isp-topbar-contact,
    html body .isp-topbar-actions {
        gap: 0;
    }

    html body .isp-topbar-link,
    html body .isp-topbar-export,
    html body .isp-topbar-store {
        min-height: 34px;
        color: #e8eff2 !important;
        font-size: 11.5px !important;
        font-weight: 600 !important;
        letter-spacing: .005em;
    }

    html body .isp-topbar-contact .isp-topbar-link + .isp-topbar-link {
        position: relative;
        margin-left: 15px;
        padding-left: 16px;
    }

    html body .isp-topbar-contact .isp-topbar-link + .isp-topbar-link::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        width: 1px;
        height: 13px;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, .17);
    }

    html body .isp-topbar-link svg {
        width: 14px;
        height: 14px;
        fill: #70ceb8;
    }

    html body .isp-topbar-export {
        margin-right: 15px;
        padding-right: 16px;
        border-right-color: rgba(255, 255, 255, .17);
        color: #f3f7f8 !important;
    }

    html body .isp-topbar-store {
        gap: 8px;
        color: #d7e3e7 !important;
    }

    html body .isp-topbar-store img {
        width: 72px;
        max-width: 72px;
        padding: 2px 5px;
        border-radius: 5px;
        box-shadow: 0 1px 0 rgba(255,255,255,.08);
    }

    html body .isp-topbar-link:hover,
    html body .isp-topbar-link:focus-visible,
    html body .isp-topbar-export:hover,
    html body .isp-topbar-export:focus-visible,
    html body .isp-topbar-store:hover,
    html body .isp-topbar-store:focus-visible {
        color: #79d3be !important;
    }

    /* ---------- Main brand / search header ---------- */
    html body .header_container.isp-site-header {
        position: relative !important;
        z-index: 10050 !important;
        border-bottom: 1px solid #e1e9eb !important;
        background: rgba(255, 255, 255, .985) !important;
        box-shadow: none;
    }

    html body .header_container .isp-header-inner {
        width: min(var(--isp-ds-content-max), calc(100% - (var(--isp-ds-gutter) * 2))) !important;
        min-height: 94px;
        grid-template-columns: minmax(218px, .78fr) minmax(340px, 1.5fr) auto;
        gap: 28px;
    }

    html body .header_container .isp-header-logo {
        position: relative;
        min-height: 60px;
        align-items: center;
    }

    html body .isp-header-logo img {
        width: 218px;
        max-width: 100%;
        filter: saturate(.98) contrast(1.01);
    }

    html body .isp-header-search {
        position: relative;
        z-index: 10060;
    }

    html body .isp-search-form {
        height: 52px;
        overflow: hidden;
        border: 1px solid #cbd9de;
        border-radius: 13px;
        background: #fbfcfd;
        box-shadow: 0 5px 16px rgba(30, 55, 70, .055);
        transition: border-color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    background var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    box-shadow var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body .isp-search-form:hover {
        border-color: #b7cbd0;
        background: #fff;
    }

    html body .isp-search-form:focus-within {
        border-color: var(--isp-ds-teal);
        background: #fff;
        box-shadow: 0 0 0 4px rgba(0, 143, 135, .10), 0 10px 25px rgba(30, 55, 70, .08);
    }

    html body .isp-search-icon {
        left: 17px;
        width: 19px;
        height: 19px;
        fill: #6e828d;
    }

    html body .isp-search-form input {
        height: 50px !important;
        padding: 0 16px 0 47px !important;
        color: #233c4d !important;
        font-size: 13.5px !important;
        line-height: 50px !important;
        font-weight: 500;
    }

    html body .isp-search-form input::placeholder {
        color: #7d8f99;
    }

    html body .isp-search-form button {
        min-width: 94px;
        height: 50px;
        padding: 0 19px;
        border-left-color: rgba(0, 116, 111, .15);
        background: var(--isp-ds-teal) !important;
        font-size: 12.5px;
        font-weight: 750;
        letter-spacing: .01em;
        transition: background var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body .isp-search-form button:hover,
    html body .isp-search-form button:focus-visible {
        background: var(--isp-ds-teal-dark) !important;
        filter: none;
    }

    html body .isp-search-suggestions {
        top: calc(100% + 9px);
        border-color: #d7e2e5;
        border-radius: 14px;
        box-shadow: 0 22px 52px rgba(23, 48, 64, .17);
    }

    html body .isp-search-suggestion {
        grid-template-columns: 48px minmax(0, 1fr) 76px;
        gap: 12px;
        padding: 10px 13px;
        border-bottom-color: #eef2f3;
    }

    html body .isp-search-suggestion-title {
        font-size: 12.5px;
        font-weight: 700;
        color: var(--isp-ds-navy-dark);
    }

    html body .isp-search-suggestion-meta {
        color: #74858f;
        font-size: 10.5px;
    }

    html body .isp-search-suggestion:hover,
    html body .isp-search-suggestion.is-active {
        background: #f2faf8;
    }

    html body .isp-header-actions {
        gap: 12px;
    }

    html body .header_container .isp-certification {
        min-width: 166px;
        min-height: 48px;
        position: relative;
        gap: 9px;
        padding: 8px 10px 8px 37px;
        border: 1px solid #dde7e8;
        border-radius: 11px;
        background: #f8fafb;
    }

    html body .header_container .isp-certification::before {
        content: "✓";
        position: absolute;
        left: 11px;
        top: 50%;
        width: 20px;
        height: 20px;
        transform: translateY(-50%);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #e5f6f1;
        color: var(--isp-ds-teal-dark);
        font-size: 12px;
        line-height: 1;
        font-weight: 800;
    }

    html body .isp-certification-copy small {
        margin-bottom: 3px;
        color: #788994;
        font-size: 8.8px;
        font-weight: 700;
        letter-spacing: .075em;
    }

    html body .isp-certification-copy strong {
        color: #294457;
        font-size: 10.5px;
        font-weight: 750;
    }

    html body .header_container .isp-enquiry-cart {
        min-width: 158px;
        min-height: 50px;
        gap: 9px;
        padding: 7px 36px 7px 8px;
        border: 1px solid #cfe4df;
        border-radius: 11px;
        background: #f3faf8;
        box-shadow: none;
        transition: border-color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    background var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    box-shadow var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    transform var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body .header_container .isp-enquiry-cart:hover,
    html body .header_container .isp-enquiry-cart:focus-visible {
        border-color: #93c9c0;
        background: #eef9f6;
        box-shadow: 0 8px 18px rgba(20, 75, 70, .08);
        transform: translateY(-1px);
    }

    html body .isp-cart-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        background: #fff;
        box-shadow: inset 0 0 0 1px #b9ddd5;
    }

    html body .isp-cart-icon svg {
        width: 19px;
        height: 19px;
        fill: var(--isp-ds-teal-dark);
    }

    html body .isp-cart-copy small {
        color: #7a8d96;
        font-size: 9.5px;
        font-weight: 600;
    }

    html body .isp-cart-copy strong {
        color: #244052;
        font-size: 11.5px;
        font-weight: 750;
    }

    html body .isp-cart-count {
        right: 8px;
        min-width: 21px;
        height: 21px;
        background: var(--isp-ds-navy-dark);
        font-size: 10px;
    }

    /* ---------- Sticky primary navigation ---------- */
    html body #menu.isp-site-nav {
        position: sticky;
        top: 0;
        z-index: 9990;
        border-top: 0 !important;
        border-bottom: 1px solid #dce6e8 !important;
        background: rgba(255, 255, 255, .985) !important;
        box-shadow: 0 5px 16px rgba(25, 47, 62, .065);
        backdrop-filter: saturate(145%) blur(8px);
        -webkit-backdrop-filter: saturate(145%) blur(8px);
    }

    html body #menu .isp-nav-inner {
        width: min(var(--isp-ds-content-max), calc(100% - (var(--isp-ds-gutter) * 2))) !important;
    }

    html body #menu .isp-primary-menu {
        min-height: 56px;
        grid-template-columns: repeat(8, minmax(0, 1fr)) minmax(132px, 1.12fr) !important;
    }

    html body #menu .isp-primary-menu > li {
        position: relative;
    }

    html body #menu .isp-primary-menu > li > a,
    html body #menu .isp-products-main-link {
        position: relative;
        min-height: 56px;
        padding: 0 9px !important;
        background: transparent !important;
        color: #334e60 !important;
        font-size: 12.25px !important;
        font-weight: 650 !important;
        letter-spacing: .005em;
        transition: color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    background var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-primary-menu > li:not(.isp-nav-quote-item) > a::before,
    html body #menu .isp-products-trigger-wrap::before {
        content: "";
        position: absolute;
        left: 17%;
        right: 17%;
        bottom: 0;
        height: 3px;
        border-radius: 3px 3px 0 0;
        background: var(--isp-ds-teal);
        transform: scaleX(0);
        transform-origin: center;
        transition: transform var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-products-trigger-wrap {
        position: relative;
        width: 100% !important;
        justify-content: center !important;
        background: transparent !important;
        transition: background var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-products-main-link {
        color: #274a5a !important;
        font-weight: 750 !important;
    }

    html body #menu .isp-products-toggle {
        width: 27px !important;
        min-height: 56px;
        flex: 0 0 27px !important;
        justify-content: center !important;
        padding: 0 5px 0 0 !important;
        color: #527080;
    }

    html body #menu .isp-products-toggle svg {
        width: 16px;
        height: 16px;
    }

    html body #menu .isp-primary-menu > li:hover > a,
    html body #menu .isp-primary-menu > li:focus-within > a,
    html body #menu .isp-primary-menu > li.is-active > a,
    html body #menu .isp-products-menu:hover .isp-products-trigger-wrap,
    html body #menu .isp-products-menu:focus-within .isp-products-trigger-wrap,
    html body #menu .isp-products-menu.is-active .isp-products-trigger-wrap {
        background: #f6faf9 !important;
        color: var(--isp-ds-teal-dark) !important;
    }

    html body #menu .isp-primary-menu > li:not(.isp-nav-quote-item):hover > a::before,
    html body #menu .isp-primary-menu > li:not(.isp-nav-quote-item):focus-within > a::before,
    html body #menu .isp-primary-menu > li.is-active:not(.isp-nav-quote-item) > a::before,
    html body #menu .isp-products-menu:hover .isp-products-trigger-wrap::before,
    html body #menu .isp-products-menu:focus-within .isp-products-trigger-wrap::before,
    html body #menu .isp-products-menu.is-active .isp-products-trigger-wrap::before {
        transform: scaleX(1);
    }

    html body #menu .isp-products-menu:hover .isp-products-main-link,
    html body #menu .isp-products-menu:focus-within .isp-products-main-link,
    html body #menu .isp-products-menu.is-active .isp-products-main-link {
        color: var(--isp-ds-teal-dark) !important;
    }

    html body #menu .isp-nav-quote-item {
        padding: 7px 4px 7px 10px !important;
    }

    html body #menu .isp-nav-quote-item .isp-nav-quote {
        min-height: 42px !important;
        margin: 0 !important;
        padding: 0 15px !important;
        border: 1px solid var(--isp-ds-teal) !important;
        border-radius: 10px;
        background: var(--isp-ds-teal) !important;
        color: #fff !important;
        font-size: 12px !important;
        font-weight: 750 !important;
        box-shadow: 0 6px 15px rgba(0, 143, 135, .14);
        transition: background var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    border-color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    box-shadow var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    transform var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-nav-quote-item .isp-nav-quote:hover,
    html body #menu .isp-nav-quote-item .isp-nav-quote:focus-visible {
        border-color: var(--isp-ds-teal-dark) !important;
        background: var(--isp-ds-teal-dark) !important;
        box-shadow: 0 9px 20px rgba(0, 116, 111, .18);
        transform: translateY(-1px);
    }

    /* ---------- Product mega menu ---------- */
    html body #menu .isp-mega-menu {
        top: 56px !important;
        width: min(var(--isp-ds-content-max), calc(100vw - (var(--isp-ds-gutter) * 2)));
        max-height: min(72vh, 650px) !important;
        transform: translate(-50%, 10px);
        border: 1px solid #d7e1e4;
        border-top: 0;
        border-radius: 0 0 16px 16px;
        background: #fff !important;
        box-shadow: 0 25px 60px rgba(23, 43, 57, .19);
        scrollbar-color: #b8c8cd #f2f5f6;
        scrollbar-width: thin;
    }

    html body #menu .isp-products-menu:hover .isp-mega-menu,
    html body #menu .isp-products-menu:focus-within .isp-mega-menu,
    html body #menu .isp-products-menu.is-products-open .isp-mega-menu {
        transform: translate(-50%, 0);
    }

    html body .isp-mega-menu-head {
        min-height: 76px;
        padding: 17px 22px;
        border-bottom-color: #e1e8ea;
        background:
            radial-gradient(circle at 12% 0%, rgba(99, 196, 173, .12), transparent 38%),
            linear-gradient(180deg, #fbfdfd 0%, #f6faf9 100%);
    }

    html body .isp-mega-menu-head span {
        margin-bottom: 4px;
        color: var(--isp-ds-teal-dark);
        font-size: 9.5px;
        font-weight: 750;
        letter-spacing: .13em;
    }

    html body .isp-mega-menu-head strong {
        color: #233f50;
        font-size: 17px;
        font-weight: 750;
        letter-spacing: -.01em;
    }

    html body #menu .isp-mega-menu-head > a {
        min-height: 38px;
        padding: 0 14px !important;
        border: 1px solid #b9d8d2;
        border-radius: 9px;
        background: #fff !important;
        color: var(--isp-ds-teal-dark) !important;
        font-size: 11.5px !important;
        font-weight: 700 !important;
        box-shadow: 0 2px 7px rgba(28, 66, 65, .035);
        transition: border-color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    background var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    color var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-mega-menu-head > a:hover,
    html body #menu .isp-mega-menu-head > a:focus-visible {
        border-color: var(--isp-ds-teal);
        background: #eef9f6 !important;
        color: var(--isp-ds-teal-dark) !important;
    }

    html body .isp-mega-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 5px 12px;
        padding: 18px 20px 20px;
        background: #fff;
    }

    html body #menu .isp-mega-grid > a {
        min-height: 46px;
        gap: 9px;
        padding: 9px 10px !important;
        border: 1px solid transparent !important;
        border-radius: 9px;
        background: #fff !important;
        color: #3a5565 !important;
        font-size: 11.5px !important;
        line-height: 1.32 !important;
        font-weight: 650 !important;
        transition: border-color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    background var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    color var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    transform var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-mega-grid > a svg {
        width: 15px;
        height: 15px;
        fill: #5eaa9d;
        opacity: .75;
        transition: transform var(--isp-ds-duration-fast) var(--isp-ds-ease),
                    opacity var(--isp-ds-duration-fast) var(--isp-ds-ease);
    }

    html body #menu .isp-mega-grid > a:hover,
    html body #menu .isp-mega-grid > a:focus-visible {
        border-color: #d8e9e5 !important;
        background: #f3faf8 !important;
        color: var(--isp-ds-teal-dark) !important;
        transform: translateY(-1px);
    }

    html body #menu .isp-mega-grid > a:hover svg,
    html body #menu .isp-mega-grid > a:focus-visible svg {
        transform: translateX(2px);
        opacity: 1;
    }

    html body .isp-mega-menu-foot {
        min-height: 45px;
        gap: 8px;
        padding: 11px 20px;
        border-top-color: rgba(255,255,255,.06);
        background: #263f50;
        color: #dce6e9;
        font-size: 11px;
        letter-spacing: .005em;
    }

    html body #menu .isp-mega-menu-foot a {
        color: #74d0bb !important;
        font-weight: 750 !important;
    }

    html body #menu .isp-mega-menu-foot a:hover,
    html body #menu .isp-mega-menu-foot a:focus-visible {
        color: #a4e2d3 !important;
        text-decoration: underline !important;
        text-underline-offset: 3px;
    }
}

/* Compact desktop/laptop tuning without entering the protected mobile range. */
@media (min-width: 901px) and (max-width: 1180px) {
    html body .header_container .isp-header-inner {
        grid-template-columns: minmax(190px, .72fr) minmax(300px, 1.45fr) auto;
        gap: 18px;
    }

    html body .isp-header-logo img {
        width: 198px;
    }

    html body .header_container .isp-certification {
        display: none;
    }

    html body #menu .isp-primary-menu {
        grid-template-columns: repeat(8, minmax(0, 1fr)) minmax(116px, 1.1fr) !important;
    }

    html body #menu .isp-primary-menu > li > a,
    html body #menu .isp-products-main-link {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 11.25px !important;
    }

    html body .isp-mega-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 901px) and (max-width: 1020px) {
    html body .header_container .isp-header-inner {
        grid-template-columns: 175px minmax(280px, 1fr) auto;
        gap: 14px;
    }

    html body .isp-header-logo img {
        width: 175px;
    }

    html body .header_container .isp-enquiry-cart {
        min-width: 52px;
        width: 52px;
        padding: 7px;
        justify-content: center;
    }

    html body .isp-cart-copy {
        display: none;
    }

    html body .isp-cart-count {
        right: -5px;
        top: 3px;
        transform: none;
    }

    html body #menu .isp-primary-menu > li > a,
    html body #menu .isp-products-main-link {
        font-size: 10.5px !important;
    }
}

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
    html body .isp-search-form,
    html body .isp-enquiry-cart,
    html body #menu .isp-primary-menu > li > a,
    html body #menu .isp-products-trigger-wrap,
    html body #menu .isp-primary-menu > li:not(.isp-nav-quote-item) > a::before,
    html body #menu .isp-products-trigger-wrap::before,
    html body #menu .isp-nav-quote-item .isp-nav-quote,
    html body #menu .isp-mega-menu,
    html body #menu .isp-mega-grid > a,
    html body #menu .isp-mega-grid > a svg {
        transition: none;
    }
}
