/* ========================================
   Header Layout 4 - Creative UI
   ======================================== */

:root {
    --h4-bg: #ffffff;
    --h4-text: var(--primary, #111827);
    --h4-muted: rgba(17, 24, 39, 0.7);
    --h4-border: rgba(17, 24, 39, 0.08);
    --h4-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --h4-radius: 10px;
}

/* Main & Sub Nav */
.header-4-main,
.header-4-sub {
    background: var(--h4-bg);
    border-bottom: 1px solid var(--h4-border);
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px 16px;
    gap: 18px;
}

.mobile-menu {
    flex: 0 0 auto;
}

.logo-box {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

.header-4-logo {
    width: 150px;
    height: 42px;
    object-fit: contain;
    object-position: left;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.header-4-logo:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.desktop-menu {
    flex-grow: 1;
    justify-content: center;
}

.desktop-menu-box-4 {
    display: flex;
    justify-content: center;
    align-items: center;
}

.desktop-menu-box-4 .header-4-ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
}

.desktop-menu-box-4 .header-4-ul > li {
    height: 46px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.desktop-menu-box-4 .header-4-ul > li > a,
.desktop-menu-box-4 .header-4-ul > li > .dropdown-toggle,
.desktop-menu-box-4 .header-4-ul > li .dropdown-toggle > a,
.desktop-menu-box-4 .header-4-ul > li > div.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.desktop-menu-box-4 .header-4-ul > li:hover {
    background: rgba(0, 0, 0, 0.04);
}

.desktop-menu-box-4 .header-4-ul > li:hover > a,
.desktop-menu-box-4 .header-4-ul > li:hover > .dropdown-toggle,
.desktop-menu-box-4 .header-4-ul > li:hover .dropdown-toggle > a {
    color: var(--h4-text);
}

/* Dropdowns */
.dropdown-menu.attribute-menu {
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--h4-border);
    border-radius: var(--h4-radius);
    box-shadow: var(--h4-shadow);
}

.dropdown-menu.attribute-menu .dropdown-item {
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    padding: 8px 10px;
}

.dropdown-menu.attribute-menu .dropdown-item:hover {
    background: #f7f7f7;
}

/* Mega Menu */
.mega_menu_body {
    visibility: hidden;
    opacity: 0;
    transform: translateY(16px);
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    z-index: 1000;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    border-radius: 12px;
    box-shadow: var(--h4-shadow);
    border: 1px solid var(--h4-border);
    pointer-events: none;
    padding: 0;
    overflow: hidden;
}

.mega_menu_body.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mega_menu_item.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.dropdown.list-inline-item::after,
.dropdown-toggle::after {
    content: none !important;
}

/* User Actions */
.user-actions {
    flex: 0 0 auto;
}

.user-action-h-4 {
    display: flex;
    align-items: center;
    gap: 14px;
}

.svg-hover-effect {
    transition: transform 0.2s ease, color 0.2s ease;
}

.svg-hover-effect:hover {
    transform: translateY(-1px) scale(1.05);
    color: var(--h4-text);
}

/* Search Dialog (Header 4) */
.header_4_search_wrap {
    position: relative;
}

/* Login Sidebar */
.user_login_sidebar {
    position: fixed;
    top: 0;
    right: -28vw;
    height: 100%;
    width: 28vw;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
    transition: right 0.25s ease;
    z-index: 11001;
}

.user_login_sidebar.open {
    right: 0;
}

.close_sidebar_search {
    font-size: 26px;
    font-weight: 400;
    background-color: #fff;
    border: 1px solid var(--h4-border);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.close_sidebar_search:hover {
    transform: rotate(90deg);
    background-color: #f7f7f7;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    visibility: hidden;
    opacity: 0;
    transition: 0.25s ease;
    z-index: 1040;
}

.sidebar-overlay.show {
    visibility: visible;
    opacity: 1;
}

.custom-p-h-4 {
    padding: 8px 16px;
}

.h-4-title {
    flex: 1 1 auto;
    font-size: 15px;
    color: #111827;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Increase overall header text size */
.header-4-main,
.header-4-sub {
    font-size: 15px;
}

/* Login Sidebar Typography */
.user_login_sidebar {
    padding-top: 6px;
}

.user_login_sidebar .form-control {
    font-size: 15px;
    height: 44px;
    border-radius: 10px !important;
}

.user_login_sidebar .ubxBtn {
    font-size: 14px;
    padding: 10px 14px;
    border-radius: 10px;
}

.user_login_sidebar label,
.user_login_sidebar .fs-12,
.search-side-bar-4 .fs-12 {
    font-size: 13px !important;
}

.user_login_sidebar .dropdown-item,
.user_login_sidebar a {
    font-size: 14px;
}

.user_login_sidebar .login_container,
.user_login_sidebar .register_container {
    padding: 12px 16px 20px;
}


@media (max-width: 1024px) {
    .nav-container {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
    }

    .logo-box a {
        width: 100%;
    }

    .header-4-logo {
        width: 120px;
        height: 48px;
        object-position: center;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .user_login_sidebar {
        right: -70vw;
        width: 70vw;
    }

    .nav-container {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
    }

    .logo-box a {
        width: 100%;
    }

    .header-4-logo {
        width: 100%;
        height: 48px;
        object-position: center;
    }

    .header-4-main,
    .header-4-sub {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    #wishlist,
    #compare_icon_4 {
        display: none !important;
    }

    .desktop-menu-box-4 {
        display: none;
    }

    .user-action-h-4 {
        gap: 10px;
    }

}

@media (min-width: 769px) {
    .mobile-menu-4 {
        display: none;
    }
}
