/**
 * Modwin desktop storefront header — 2026-08-09
 * Intentionally desktop-only. The existing mobile header remains unchanged.
 */

.mh-desktop-header, .mh-dh-nav-row { display: none; }

@media (min-width: 1000px) {
    #header.ct-header { display: none !important; }

    .mh-desktop-header {
        display: block;
        position: relative;
        /* Keep live-search results above the sticky navigation row. */
        z-index: 1000;
        width: 100%;
        background: #fff;
        direction: rtl;
    }

    .mh-dh-main {
        width: min(100% - 40px, 1290px);
        min-height: 86px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: clamp(22px, 3vw, 42px);
    }

    .mh-dh-logo {
        width: 150px;
        flex: 0 0 150px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    .mh-dh-logo img {
        width: 150px;
        height: auto;
        display: block;
    }

    .mh-dh-search {
        min-width: 320px;
        max-width: 650px;
        height: 52px;
        flex: 1 1 650px;
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0 12px 0 10px;
        background: #f7f5f1;
        border: 1px solid #e8e1d8;
        border-radius: 15px;
        transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    }

    .mh-dh-search:focus-within {
        background: #fff;
        border-color: rgba(223, 102, 114, .55);
        box-shadow: 0 0 0 4px rgba(223, 102, 114, .10);
    }

    .mh-dh-search button {
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: #182b4f;
        background: transparent;
        border: 0;
        border-radius: 10px;
        cursor: pointer;
    }

    .mh-dh-search button:hover { background: rgba(24, 43, 79, .07); }
    .mh-dh-search button svg { width: 21px; height: 21px; }

    .mh-dh-search input[type="search"] {
        min-width: 0;
        height: 100%;
        flex: 1 1 auto;
        padding: 0;
        color: #182b4f;
        background: transparent;
        border: 0;
        box-shadow: none;
        outline: 0;
        font-family: inherit;
        font-size: 14px;
    }

    .mh-dh-search input[type="search"]::placeholder { color: #8a909b; opacity: 1; }

    .mh-dh-search-hint {
        flex: 0 0 auto;
        padding: 6px 10px;
        color: #7c8490;
        background: rgba(255, 255, 255, .8);
        border: 1px solid #e7e1d9;
        border-radius: 8px;
        font-size: 11px;
        line-height: 1;
    }

    .mh-dh-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .mh-dh-action {
        min-height: 50px;
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 6px 10px;
        color: #182b4f;
        border: 1px solid transparent;
        border-radius: 14px;
        text-decoration: none !important;
        transition: background .2s ease, border-color .2s ease, transform .2s ease;
    }

    .mh-dh-action:hover {
        color: #182b4f;
        background: #f7f5f1;
        border-color: #e8e1d8;
        transform: translateY(-1px);
    }

    .mh-dh-action-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #182b4f;
        background: #f4f6fa;
        border-radius: 12px;
    }

    .mh-dh-cart .mh-dh-action-icon {
        color: #fff;
        background: #182b4f;
    }

    .mh-dh-action-icon svg { width: 21px; height: 21px; }

    .mh-dh-action-copy {
        display: flex;
        flex-direction: column;
        gap: 2px;
        white-space: nowrap;
        line-height: 1.25;
    }

    .mh-dh-action-copy small { color: #8a909b; font-size: 10.5px; }
    .mh-dh-action-copy strong { color: #182b4f; font-size: 12.5px; font-weight: 750; }

    .mh-dh-action .mh-cart-count {
        min-width: 18px;
        height: 18px;
        position: absolute;
        top: -5px;
        left: -5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 4px;
        color: #fff;
        background: #df6672;
        border: 2px solid #fff;
        border-radius: 999px;
        font-size: 9px;
        font-weight: 800;
        line-height: 1;
    }

    .mh-dh-nav-row {
        display: block;
        position: sticky;
        top: 0;
        z-index: 999;
        border-top: 1px solid #f1ede8;
        border-bottom: 1px solid #e9e3dc;
        background: rgba(255, 255, 255, .97);
        box-shadow: 0 9px 24px rgba(24, 43, 79, .08);
        backdrop-filter: blur(14px);
    }

    body.admin-bar .mh-dh-nav-row { top: 32px; }

    .mh-dh-nav-inner {
        width: min(100% - 40px, 1290px);
        min-height: 48px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .mh-dh-nav { align-self: stretch; display: flex; align-items: stretch; }
    .mh-dh-menu { margin: 0; padding: 0; display: flex; align-items: stretch; gap: 3px; list-style: none; }
    .mh-dh-menu > li { position: relative; display: flex; align-items: stretch; }

    .mh-dh-menu > li > a {
        min-height: 47px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 0 13px;
        color: #343d4d;
        border-radius: 10px;
        text-decoration: none !important;
        font-size: 13px;
        font-weight: 650;
        transition: color .2s ease, background .2s ease;
    }

    .mh-dh-menu > li:first-child > a {
        min-height: 34px;
        align-self: center;
        margin-left: 5px;
        padding: 0 17px;
        color: #fff;
        background: #182b4f;
        border-radius: 11px;
    }

    .mh-dh-menu > li:not(:first-child) > a:hover,
    .mh-dh-menu > li.current-menu-item > a,
    .mh-dh-menu > li.current-menu-ancestor > a {
        color: #b54f5c;
        background: rgba(223, 102, 114, .09);
    }

    .mh-dh-menu .menu-item-has-children > a::after {
        content: '';
        width: 6px;
        height: 6px;
        margin-top: -3px;
        border-left: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(-45deg);
    }

    .mh-dh-menu .sub-menu {
        min-width: 390px;
        position: absolute;
        top: calc(100% - 3px);
        right: 0;
        z-index: 20;
        display: grid;
        grid-template-columns: repeat(2, minmax(150px, 1fr));
        gap: 5px;
        margin: 0;
        padding: 14px;
        visibility: hidden;
        opacity: 0;
        transform: translateY(8px);
        color: #182b4f;
        background: rgba(255, 255, 255, .99);
        border: 1px solid #e8e1d8;
        border-radius: 16px;
        box-shadow: 0 20px 50px rgba(24, 43, 79, .14);
        list-style: none;
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .mh-dh-menu li:hover > .sub-menu,
    .mh-dh-menu li:focus-within > .sub-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .mh-dh-menu .sub-menu a {
        display: block;
        padding: 10px 12px;
        color: #4c5667;
        background: transparent;
        border-radius: 9px;
        text-decoration: none !important;
        font-size: 12.5px;
        font-weight: 550;
    }

    .mh-dh-menu .sub-menu a:hover { color: #182b4f; background: #f7f5f1; }

    .mh-dh-trust {
        margin-right: auto;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        color: #5b6472;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .mh-dh-trust:hover { color: #182b4f; }
    .mh-dh-trust-dot { width: 9px; height: 9px; background: #5eb685; border: 3px solid #e4f5eb; border-radius: 50%; box-sizing: content-box; }
    .mh-dh-trust span:last-child { display: flex; flex-direction: column; gap: 1px; }
    .mh-dh-trust strong { color: #182b4f; font-size: 11.5px; font-weight: 750; }
    .mh-dh-trust small { color: #8a909b; font-size: 9.5px; }
}

@media (min-width: 1000px) and (max-width: 1180px) {
    .mh-dh-main, .mh-dh-nav-inner { width: min(100% - 28px, 1290px); }
    .mh-dh-main { gap: 18px; }
    .mh-dh-logo, .mh-dh-logo img { width: 128px; }
    .mh-dh-logo { flex-basis: 128px; }
    .mh-dh-action-copy, .mh-dh-search-hint { display: none; }
    .mh-dh-action { padding: 5px; }
    .mh-dh-menu > li > a { padding-inline: 9px; font-size: 12px; }
    .mh-dh-trust small { display: none; }
}

/* Contextual desktop mega menus — shoes, bags and brands */
@media (min-width: 1000px) {
    .mh-mega-nav,
    .mh-mega-nav-list,
    .mh-mega-parent { position: static !important; }

    .mh-menu-order-brands { order: -3; }
    .mh-menu-order-bags { order: -2; }
    .mh-menu-order-shoes { order: -1; }

    .mh-mega-nav-list > li:first-child > a {
        min-height: 47px;
        margin-left: 0;
        padding: 0 13px;
        color: #343d4d;
        background: transparent;
        border-radius: 10px;
    }

    .mh-mega-nav-list > li > a { font-size: 14px; }

    .mh-mega-nav-list > li:first-child > a:hover {
        color: #b54f5c;
        background: rgba(223, 102, 114, .09);
    }

    .mh-mega-trigger {
        min-height: 47px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 0 13px;
        color: #343d4d;
        background: transparent;
        border: 0;
        border-radius: 10px;
        font-family: inherit;
        font-size: 14px;
        font-weight: 650;
        cursor: pointer;
        transition: color .18s ease, background .18s ease;
    }

    .mh-mega-trigger:hover,
    .mh-mega-trigger[aria-expanded="true"] {
        color: #b54f5c;
        background: rgba(223, 102, 114, .09);
    }

    .mh-mega-trigger > span {
        width: 6px;
        height: 6px;
        margin-top: -3px;
        border-left: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(-45deg);
        transition: transform .18s ease;
    }

    .mh-mega-trigger[aria-expanded="true"] > span {
        margin-top: 4px;
        transform: rotate(135deg);
    }

    .mh-installment-link { color: #343d4d !important; }

    .mh-mega-panel {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 30;
        padding-top: 0;
        visibility: hidden;
        opacity: 0;
        transform: translateY(7px);
        pointer-events: none;
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    }

    .mh-mega-panel.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .mh-mega-grid {
        width: min(100% - 40px, 1290px);
        min-height: 355px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr 1.15fr;
        overflow: hidden;
        direction: rtl;
        color: #26344c;
        background: #fff;
        border: 1px solid #ebe6df;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 26px 70px rgba(24, 43, 79, .19);
    }

    .mh-mega-col {
        padding: 27px 28px;
        border-left: 1px solid #f0ece6;
    }

    .mh-mega-col h3 {
        display: flex;
        align-items: center;
        min-height: 20px;
        margin: 0 0 17px;
        color: #182b4f;
        font-size: 15.5px;
        font-weight: 800;
    }

    .mh-mega-col h3::before {
        content: '';
        width: 4px;
        height: 18px;
        flex: 0 0 4px;
        margin-left: 9px;
        background: #df6672;
        border-radius: 9px;
    }

    .mh-mega-col h3 > a {
        min-height: 0;
        margin-right: auto;
        padding: 0;
        color: #df6672;
        background: transparent;
        font-size: 11px;
        font-weight: 650;
    }

    .mh-mega-col > a {
        min-height: 35px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        color: #526071;
        border-radius: 9px;
        font-size: 13.5px;
        font-weight: 500;
        transition: color .15s ease, background .15s ease, padding .15s ease;
    }

    .mh-mega-col > a::after {
        content: '‹';
        color: #df6672;
        font-size: 18px;
        opacity: 0;
        transform: translateX(4px);
        transition: opacity .15s ease, transform .15s ease;
    }

    .mh-mega-col > a:hover {
        padding-right: 13px;
        color: #182b4f;
        background: #f8f6f2;
    }

    .mh-mega-col > a:hover::after { opacity: 1; transform: none; }

    .mh-mega-promo { padding: 16px; background: #f6f2ed; }
    .mh-mega-promo > a {
        min-height: 321px;
        height: 100%;
        position: relative;
        isolation: isolate;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        padding: 25px;
        color: #fff;
        background: #182b4f url('/wp-content/themes/modwin-child/assets/images/modwin-mega-shoes-v2.webp') center 34% / cover no-repeat;
        border-radius: 16px;
    }

    .mh-mega-promo > a::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(180deg, rgba(24,43,79,.04) 22%, rgba(15,27,50,.96) 88%);
    }

    .mh-mega-promo span { padding: 5px 9px; background: #df6672; border-radius: 20px; font-size: 9px; font-weight: 700; }
    .mh-mega-promo strong { margin: 10px 0 5px; font-size: 19px; }
    .mh-mega-promo small { margin-bottom: 15px; color: #e7ebf3; font-size: 12px; line-height: 1.8; }
    .mh-mega-promo b { padding: 8px 12px; color: #182b4f; background: #fff; border-radius: 9px; font-size: 11px; }
    .mh-mega-promo-bag > a { background-image: url('/wp-content/themes/modwin-child/assets/images/modwin-mega-bags-v2.webp'); }
    .mh-mega-promo-brands > a { background-image: url('/wp-content/themes/modwin-child/assets/images/modwin-mega-brands-v2.webp'); }

    .mh-mega-panel-brands .mh-mega-grid {
        min-height: 355px;
        grid-template-columns: 1fr 1fr 1fr 1.15fr;
    }

    .mh-mega-brands { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
    .mh-mega-brands a {
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 5px;
        color: #4c5768;
        border: 1px solid #eee9e3;
        border-radius: 10px;
        gap: 8px;
        font-size: 12px;
        font-weight: 650;
        text-align: center;
    }
    .mh-mega-brands a:hover { color: #182b4f; border-color: #dfbdc1; background: #fff8f8; }
    .mh-mega-brands img {
        width: 24px;
        height: 24px;
        flex: 0 0 24px;
        object-fit: contain;
        filter: grayscale(1);
        transition: filter .15s ease, transform .15s ease;
    }
    .mh-mega-brands a:hover img { filter: none; transform: scale(1.06); }

    body.mh-mega-is-open::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 998;
        background: rgba(24, 43, 79, .22);
        pointer-events: none;
    }

    .mh-dh-nav-row { z-index: 999; }
}

@media (min-width: 1000px) and (max-width: 1180px) {
    .mh-mega-trigger { padding-inline: 8px; font-size: 13px; }
    .mh-mega-col { padding-inline: 18px; }
}
