/* =========================================================
   16ITBD HEADER — DESIGN 4
   Logo + Admin Menu Builder + Wishlist/Account/Cart in one row
   ========================================================= */

.market-home .dm-header.dm-header-design4,
.market-site-shell .dm-header.dm-header-design4{
    background:#f5fffb !important;
    border:0 !important;
    border-bottom:1px solid #dcefe8 !important;
    box-shadow:0 8px 28px rgba(8,54,68,.08) !important;
}

.market-home .dm-header-design4 .dm-d4-row,
.market-site-shell .dm-header-design4 .dm-d4-row{
    min-height:104px !important;
    padding:12px 24px !important;
    display:grid !important;
    grid-template-columns:auto minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:28px !important;
    position:relative !important;
    overflow:hidden !important;
    border-radius:0 !important;
    background:
        radial-gradient(circle at 8% 115%,rgba(16,185,129,.08) 0 155px,transparent 156px),
        radial-gradient(circle at 86% 120%,rgba(16,185,129,.07) 0 180px,transparent 181px),
        linear-gradient(100deg,#f5fffb 0%,#ffffff 48%,#effcf7 100%) !important;
}

.market-home .dm-header-design4 .dm-d4-row::before,
.market-site-shell .dm-header-design4 .dm-d4-row::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:linear-gradient(110deg,rgba(255,255,255,.0) 0 72%,rgba(71,220,173,.045) 72% 100%);
}

.market-home .dm-header-design4 .dm-d4-logo,
.market-site-shell .dm-header-design4 .dm-d4-logo{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    min-width:220px !important;
    position:relative !important;
    z-index:2 !important;
    padding-right:26px !important;
    border-right:1px solid #dceae6 !important;
}

.market-home .dm-header-design4 .dm-d4-logo img,
.market-site-shell .dm-header-design4 .dm-d4-logo img{
    width:230px !important;
    max-width:230px !important;
    max-height:76px !important;
    height:auto !important;
    object-fit:contain !important;
}

/* Menu occupies the old search area */
.market-home .dm-header-design4 .dm-d4-nav,
.market-site-shell .dm-header-design4 .dm-d4-nav{
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    position:relative !important;
    z-index:3 !important;
}

.market-home .dm-header-design4 .dm-d4-menu,
.market-site-shell .dm-header-design4 .dm-d4-menu{
    width:100% !important;
    min-width:0 !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:clamp(4px,.55vw,11px) !important;
    margin:0 !important;
    padding:0 !important;
    list-style:none !important;
    overflow-x:auto !important;
    scrollbar-width:none !important;
}
.market-home .dm-header-design4 .dm-d4-menu::-webkit-scrollbar,
.market-site-shell .dm-header-design4 .dm-d4-menu::-webkit-scrollbar{display:none !important;}

.market-home .dm-header-design4 .dm-d4-menu li,
.market-site-shell .dm-header-design4 .dm-d4-menu li{margin:0 !important;flex:0 0 auto !important;}

.market-home .dm-header-design4 .dm-d4-menu a,
.market-site-shell .dm-header-design4 .dm-d4-menu a{
    min-height:44px !important;
    padding:0 15px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:999px !important;
    color:#102c3d !important;
    background:transparent !important;
    font-size:14px !important;
    line-height:1 !important;
    font-weight:700 !important;
    white-space:nowrap !important;
    text-decoration:none !important;
    transition:color .22s ease,background .22s ease,transform .22s ease,box-shadow .22s ease !important;
}

.market-home .dm-header-design4 .dm-d4-menu a::after,
.market-site-shell .dm-header-design4 .dm-d4-menu a::after{display:none !important;}

.market-home .dm-header-design4 .dm-d4-menu a:hover,
.market-site-shell .dm-header-design4 .dm-d4-menu a:hover{
    color:#078664 !important;
    background:#e7f9f2 !important;
    transform:translateY(-1px) !important;
}

.market-home .dm-header-design4 .dm-d4-menu a.active,
.market-site-shell .dm-header-design4 .dm-d4-menu a.active{
    color:#fff !important;
    background:linear-gradient(135deg,#16c98d,#07996f) !important;
    box-shadow:0 8px 20px rgba(9,155,113,.20) !important;
}

/* Right actions */
.market-home .dm-header-design4 .dm-d4-actions,
.market-site-shell .dm-header-design4 .dm-d4-actions{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:10px !important;
    position:relative !important;
    z-index:3 !important;
    white-space:nowrap !important;
}

.market-home .dm-header-design4 .dm-d4-action,
.market-site-shell .dm-header-design4 .dm-d4-action{
    width:auto !important;
    min-width:auto !important;
    height:58px !important;
    padding:0 17px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:9px !important;
    border:1px solid #dcebe6 !important;
    border-radius:16px !important;
    background:rgba(255,255,255,.88) !important;
    box-shadow:0 8px 22px rgba(8,54,68,.075) !important;
    color:#12384a !important;
    text-decoration:none !important;
    transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease,background .2s ease !important;
}

.market-home .dm-header-design4 .dm-d4-action:hover,
.market-site-shell .dm-header-design4 .dm-d4-action:hover{
    transform:translateY(-2px) !important;
    border-color:#a9dfcf !important;
    box-shadow:0 13px 28px rgba(8,54,68,.12) !important;
}

.market-home .dm-header-design4 .dm-d4-action .dm-action-icon,
.market-site-shell .dm-header-design4 .dm-d4-action .dm-action-icon{
    position:relative !important;
    width:auto !important;
    height:auto !important;
    flex:0 0 auto !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    color:#0d7f65 !important;
    font-size:23px !important;
}

.market-home .dm-header-design4 .dm-d4-action .dm-action-copy,
.market-site-shell .dm-header-design4 .dm-d4-action .dm-action-copy{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
}

.market-home .dm-header-design4 .dm-d4-action .dm-action-copy strong,
.market-site-shell .dm-header-design4 .dm-d4-action .dm-action-copy strong{
    color:#17384a !important;
    font-size:13px !important;
    font-weight:800 !important;
    line-height:1 !important;
}

.market-home .dm-header-design4 .dm-d4-account-arrow,
.market-site-shell .dm-header-design4 .dm-d4-account-arrow{
    margin-left:2px !important;
    color:#526c78 !important;
    font-size:10px !important;
}

.market-home .dm-header-design4 .dm-d4-cart,
.market-site-shell .dm-header-design4 .dm-d4-cart{
    border-color:#079d72 !important;
    background:linear-gradient(135deg,#12ba82,#078e68) !important;
    color:#fff !important;
    box-shadow:0 10px 24px rgba(8,155,113,.20) !important;
}
.market-home .dm-header-design4 .dm-d4-cart .dm-action-icon,
.market-home .dm-header-design4 .dm-d4-cart .dm-action-copy strong,
.market-site-shell .dm-header-design4 .dm-d4-cart .dm-action-icon,
.market-site-shell .dm-header-design4 .dm-d4-cart .dm-action-copy strong{color:#fff !important;}
.market-home .dm-header-design4 .dm-d4-cart:hover,
.market-site-shell .dm-header-design4 .dm-d4-cart:hover{background:linear-gradient(135deg,#10ad79,#087c5e) !important;}

.market-home .dm-header-design4 .dm-cart-badge,
.market-site-shell .dm-header-design4 .dm-cart-badge{
    position:absolute !important;
    top:-12px !important;
    right:-12px !important;
    left:auto !important;
    min-width:20px !important;
    height:20px !important;
    padding:0 5px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:2px solid #fff !important;
    border-radius:999px !important;
    background:#08a371 !important;
    color:#fff !important;
    font-size:9px !important;
    font-weight:900 !important;
    box-shadow:0 4px 10px rgba(8,163,113,.22) !important;
}

/* Remove the old second menu row completely if it survives in cache/markup. */
.market-home .dm-header-design4 > .dm-nav,
.market-site-shell .dm-header-design4 > .dm-nav{display:none !important;}

.market-home .dm-header-design4 .dm-d4-toggle,
.market-site-shell .dm-header-design4 .dm-d4-toggle{display:none !important;}

/* Fixed header now has only one row below topbar. */
.market-home,
.market-site-shell{
    --dm-topbar-fixed-h:34px;
    --dm-header-fixed-h:104px;
}

@media (max-width:1399px){
    .market-home .dm-header-design4 .dm-d4-row,
    .market-site-shell .dm-header-design4 .dm-d4-row{gap:16px !important;padding-left:18px !important;padding-right:18px !important;}
    .market-home .dm-header-design4 .dm-d4-logo,
    .market-site-shell .dm-header-design4 .dm-d4-logo{min-width:185px !important;padding-right:18px !important;}
    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{width:195px !important;max-width:195px !important;}
    .market-home .dm-header-design4 .dm-d4-menu a,
    .market-site-shell .dm-header-design4 .dm-d4-menu a{padding:0 10px !important;font-size:13px !important;}
    .market-home .dm-header-design4 .dm-d4-action,
    .market-site-shell .dm-header-design4 .dm-d4-action{padding:0 12px !important;height:54px !important;}
}

@media (max-width:1199px){
    .market-home .dm-header-design4 .dm-d4-logo,
    .market-site-shell .dm-header-design4 .dm-d4-logo{min-width:155px !important;}
    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{width:165px !important;max-width:165px !important;}
    .market-home .dm-header-design4 .dm-d4-action,
    .market-site-shell .dm-header-design4 .dm-d4-action{width:48px !important;min-width:48px !important;height:48px !important;padding:0 !important;border-radius:14px !important;}
    .market-home .dm-header-design4 .dm-d4-action .dm-action-copy,
    .market-home .dm-header-design4 .dm-d4-account-arrow,
    .market-site-shell .dm-header-design4 .dm-d4-action .dm-action-copy,
    .market-site-shell .dm-header-design4 .dm-d4-account-arrow{display:none !important;}
}

/* Tablet/mobile: compact header + smooth dropdown menu */
@media (max-width:991px){
    .market-home,
    .market-site-shell{--dm-header-fixed-h:82px;}

    .market-home .dm-header-design4 .dm-d4-row,
    .market-site-shell .dm-header-design4 .dm-d4-row{
        min-height:82px !important;
        padding:10px 14px !important;
        grid-template-columns:minmax(130px,1fr) auto auto !important;
        gap:9px !important;
        overflow:visible !important;
    }

    .market-home .dm-header-design4 .dm-d4-logo,
    .market-site-shell .dm-header-design4 .dm-d4-logo{
        min-width:0 !important;
        padding-right:0 !important;
        border-right:0 !important;
    }
    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{width:155px !important;max-width:155px !important;max-height:56px !important;}

    .market-home .dm-header-design4 .dm-d4-actions,
    .market-site-shell .dm-header-design4 .dm-d4-actions{grid-column:2;grid-row:1;gap:6px !important;}

    .market-home .dm-header-design4 .dm-d4-nav,
    .market-site-shell .dm-header-design4 .dm-d4-nav{grid-column:3;grid-row:1;justify-self:end !important;position:static !important;}

    .market-home .dm-header-design4 .dm-d4-toggle,
    .market-site-shell .dm-header-design4 .dm-d4-toggle{
        width:46px !important;
        height:46px !important;
        display:flex !important;
        align-items:center !important;
        justify-content:center !important;
        border:1px solid #cfe9df !important;
        border-radius:14px !important;
        background:#eafaf4 !important;
        color:#078664 !important;
        font-size:20px !important;
        cursor:pointer !important;
    }

    .market-home .dm-header-design4 .dm-d4-menu,
    .market-site-shell .dm-header-design4 .dm-d4-menu{
        position:absolute !important;
        left:14px !important;
        right:14px !important;
        top:calc(100% + 8px) !important;
        width:auto !important;
        max-height:0 !important;
        padding:0 12px !important;
        display:flex !important;
        flex-direction:column !important;
        align-items:stretch !important;
        justify-content:flex-start !important;
        gap:4px !important;
        overflow:hidden !important;
        opacity:0 !important;
        visibility:hidden !important;
        pointer-events:none !important;
        transform:translateY(-10px) scale(.985) !important;
        transform-origin:top center !important;
        border:1px solid #d9eee6 !important;
        border-radius:18px !important;
        background:rgba(255,255,255,.985) !important;
        box-shadow:0 20px 46px rgba(8,54,68,.16) !important;
        transition:max-height .36s ease,opacity .22s ease,transform .30s ease,visibility .22s ease,padding .30s ease !important;
        z-index:10020 !important;
    }

    .market-home .dm-header-design4 .dm-d4-menu.show,
    .market-site-shell .dm-header-design4 .dm-d4-menu.show{
        max-height:70vh !important;
        padding:12px !important;
        overflow-y:auto !important;
        opacity:1 !important;
        visibility:visible !important;
        pointer-events:auto !important;
        transform:translateY(0) scale(1) !important;
    }

    .market-home .dm-header-design4 .dm-d4-menu li,
    .market-site-shell .dm-header-design4 .dm-d4-menu li{width:100% !important;}
    .market-home .dm-header-design4 .dm-d4-menu a,
    .market-site-shell .dm-header-design4 .dm-d4-menu a{
        width:100% !important;
        min-height:44px !important;
        padding:0 14px !important;
        justify-content:flex-start !important;
        border-radius:11px !important;
    }
}

@media (max-width:600px){
    .market-home .dm-header-design4 .dm-d4-row,
    .market-site-shell .dm-header-design4 .dm-d4-row{grid-template-columns:minmax(112px,1fr) auto auto !important;padding-left:10px !important;padding-right:10px !important;}
    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{width:132px !important;max-width:132px !important;}
    .market-home .dm-header-design4 .dm-d4-action,
    .market-site-shell .dm-header-design4 .dm-d4-action{width:42px !important;min-width:42px !important;height:42px !important;border-radius:12px !important;}
    .market-home .dm-header-design4 .dm-d4-action .dm-action-icon,
    .market-site-shell .dm-header-design4 .dm-d4-action .dm-action-icon{font-size:19px !important;}
    .market-home .dm-header-design4 .dm-d4-toggle,
    .market-site-shell .dm-header-design4 .dm-d4-toggle{width:42px !important;height:42px !important;border-radius:12px !important;}
}

@media (max-width:430px){
    .market-home .dm-header-design4 .dm-d4-wishlist,
    .market-site-shell .dm-header-design4 .dm-d4-wishlist{display:none !important;}
    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{width:125px !important;max-width:125px !important;}
}

/* =========================================================
   DESIGN 4 — FINAL SIZE TUNE
   Smaller header height + larger logo
   ========================================================= */
@media (min-width: 992px){
    .market-home,
    .market-site-shell{
        --dm-header-fixed-h:88px !important;
    }

    .market-home .dm-header-design4 .dm-d4-row,
    .market-site-shell .dm-header-design4 .dm-d4-row{
        min-height:88px !important;
        padding:7px 22px !important;
        gap:24px !important;
    }

    .market-home .dm-header-design4 .dm-d4-logo,
    .market-site-shell .dm-header-design4 .dm-d4-logo{
        min-width:245px !important;
        padding-right:22px !important;
    }

    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{
        width:270px !important;
        max-width:270px !important;
        max-height:74px !important;
    }

    .market-home .dm-header-design4 .dm-d4-menu a,
    .market-site-shell .dm-header-design4 .dm-d4-menu a{
        min-height:40px !important;
        padding-left:14px !important;
        padding-right:14px !important;
    }

    .market-home .dm-header-design4 .dm-d4-action,
    .market-site-shell .dm-header-design4 .dm-d4-action{
        height:52px !important;
        border-radius:15px !important;
    }
}

@media (min-width: 992px) and (max-width: 1399px){
    .market-home .dm-header-design4 .dm-d4-row,
    .market-site-shell .dm-header-design4 .dm-d4-row{
        min-height:84px !important;
        padding:6px 16px !important;
        gap:14px !important;
    }

    .market-home,
    .market-site-shell{
        --dm-header-fixed-h:84px !important;
    }

    .market-home .dm-header-design4 .dm-d4-logo,
    .market-site-shell .dm-header-design4 .dm-d4-logo{
        min-width:205px !important;
        padding-right:15px !important;
    }

    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{
        width:225px !important;
        max-width:225px !important;
        max-height:68px !important;
    }

    .market-home .dm-header-design4 .dm-d4-action,
    .market-site-shell .dm-header-design4 .dm-d4-action{
        height:50px !important;
    }
}

@media (max-width: 991px){
    .market-home,
    .market-site-shell{
        --dm-header-fixed-h:74px !important;
    }

    .market-home .dm-header-design4 .dm-d4-row,
    .market-site-shell .dm-header-design4 .dm-d4-row{
        min-height:74px !important;
        padding-top:6px !important;
        padding-bottom:6px !important;
    }

    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{
        width:165px !important;
        max-width:165px !important;
        max-height:60px !important;
    }
}

@media (max-width: 575px){
    .market-home .dm-header-design4 .dm-d4-logo img,
    .market-site-shell .dm-header-design4 .dm-d4-logo img{
        width:138px !important;
        max-width:138px !important;
    }
}
