/* Madhunk Header */

*, *::before, *::after { box-sizing: border-box; }

/* ── HIDE THEME DEFAULT HEADER ── */
header.site-header,
.site-header,
#masthead,
#header,
.header-main,
.main-header,
nav.navbar,
.navbar,
#main-header,
.header-area,
.top-header,
.primary-header,
#site-header,
.elementor-location-header,
[data-elementor-type="header"],
.ast-above-header-wrap,
.ast-primary-header-bar,
.ast-below-header-wrap,
.ast-desktop-header,
.hfg-header,
.site-branding,
.main-navigation,
#primary-menu,
.primary-menu-container,
nav[role="navigation"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

.mh-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.mh-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Push below WP admin bar when logged in */
.admin-bar .mh-header { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .mh-header { top: 46px; }
}

/* TOP BAR */
.mh-topbar {
    background: #000;
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 16px;
    letter-spacing: 0.04em;
}

/* MAIN ROW */
.mh-main {
    display: flex;
    align-items: center;
    height: 72px;
    padding: 0 40px;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* LOGO */
.mh-logo {
    text-decoration: none;
    flex-shrink: 0;
}
.mh-logo img {
    height: 44px;
    width: auto;
    display: block;
}
.mh-logo-text {
    font-size: 24px;
    font-weight: 900;
    color: #000;
    letter-spacing: 0.06em;
}

/* TABS */
.mh-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.mh-tab {
    display: block;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #666;
    text-decoration: none;
    border-bottom: 2.5px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    line-height: 1;
}
.mh-tab:hover { color: #000; }
.mh-tab.mh-active {
    color: #000;
    border-bottom-color: #000;
}

/* ICONS */
.mh-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.mh-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: none;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.mh-icon-btn:hover { background: #f5f5f5; color: #000; }

.mh-cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* HAMBURGER */
.mh-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}
.mh-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: all 0.25s;
}
.mh-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mh-hamburger.open span:nth-child(2) { opacity: 0; }
.mh-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* SEARCH BAR */
.mh-search-bar {
    border-top: 1px solid #f0f0f0;
    padding: 10px 32px;
}
.mh-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}
.mh-search-input {
    flex: 1;
    padding: 9px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 100px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}
.mh-search-input:focus { border-color: #000; }
.mh-search-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #777;
    padding: 6px;
    border-radius: 6px;
}
.mh-search-close:hover { background: #f5f5f5; }

/* MOBILE MENU */
.mh-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background: #fff;
    z-index: 99998;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.mh-mobile-menu.open {
    display: block;
    transform: translateX(0);
}
.mh-mobile-inner { padding: 80px 0 40px; }
.mh-mobile-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f5f5f5;
    transition: color 0.15s;
}
.mh-mobile-tab.mh-active { color: #000; }
.mh-mobile-tab:hover { color: #000; background: #fafafa; }
.mh-mobile-arrow { font-size: 18px; color: #aaa; }
.mh-mobile-links { background: #fafafa; }
.mh-mobile-link {
    display: block;
    padding: 10px 32px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
}
.mh-mobile-link:hover { color: #000; }

/* OVERLAY */
.mh-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99997;
}
.mh-overlay.open { display: block; }

/* SPACER */
.mh-spacer { height: 108px; } /* 36px topbar + 72px main */
.admin-bar .mh-spacer { height: 140px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .mh-tabs { display: none; }
    .mh-hamburger { display: flex; }
    .mh-main { padding: 0 16px; gap: 12px; height: 60px; }
    .mh-spacer { height: 96px; }
    .admin-bar .mh-spacer { height: 142px; }
    .mh-icons .mh-icon-btn:not(.mh-cart-btn):not(.mh-search-btn) { display: none; }
}
