.custom-header {
    --ch-navbar-bg: #FFF;
    --ch-dropdown-bg: #FFF;
    --ch-text-color: #00285a;
    --ch-transition: 0.3s ease;
    --ch-mobile-width: 320px;
    --ch-border-color: #e0e0e0;
    --ch-primary-color: #2370f4;
}

/* Header Content */
.header-content {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.brand img {
    width: 270px;
    height: auto;
}

/* Search Section */
.search_form{
    flex: 1 1 auto;
}
.search-section {
    flex: 1 1 auto;
    display: flex;
    height: 46px;
}

.category-dropdown {
    position: relative;
}

.dropdown-trigger {
    height: 100%;
    padding: 0.75rem 2rem;
    border: 1px solid var(--ch-border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    /*background: #f5f5f5;*/
    background-color: rgb(248 248 248);
    color: #747474;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.category-list {
    position: absolute;
    top: 100%;
    left: 1.5rem;
    width: 300px;
    background: var(--ch-dropdown-bg);
    border: 1px solid var(--ch-border-color);
    border-top: none;
    display: none;
    z-index: 100;
    padding: 0;
    margin: 0;
    list-style: none;
}

.category-dropdown.active .category-list {
    display: block;
}

.category-list li a {
    padding: 0.75rem 1rem;
    display: block;
    color: var(--ch-text-color);
    text-decoration: none;
}

.category-list li:hover {
    background: #f5f5f5;
}

.search-input-wrapper {
    flex: 1;
    display: flex;
}

.search-input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--ch-border-color);
    outline: none;
    background-color: rgb(248 248 248);
    color: #747474;
}
.search-input-wrapper input:focus{
    background-color: #fff;
}

.search-btn {
    padding: 0.75rem 1.5rem;
    background: #297F3A;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-btn i {
    margin: auto;
}

/* User Actions */
.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon, .profile-icon {
    position: relative;
    font-size: 1.25rem;
    color: var(--ch-text-color);
    text-decoration: none;
}

.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
    padding: 0;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: auto; /* This will push the button to the right */
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--ch-text-color);
    margin: 5px 0;
    transition: var(--ch-transition);
}

/* Mobile Navigation */
.mobile-nav-wrapper {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--ch-mobile-width);
    height: 100vh;
    background: var(--ch-navbar-bg);
    z-index: 1000;
    transition: var(--ch-transition);
    overflow-y: auto;
}

.mobile-nav-wrapper.active {
    left: 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.mobile-nav-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--ch-border-color);
}

.close-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu .menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--ch-border-color);
}

.mobile-nav-menu a {
    color: var(--ch-text-color);
    text-decoration: none;
}
.submenu li a{
    padding: 10px;
    display: block;
}

.submenu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.submenu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f5f5f5;
}

.submenu.active {
    display: block;
}

.submenu .menu-item {
    padding-left: 2rem;
}

/* Mega Menu */
.mega-menu {
    background: var(--ch-navbar-bg);
    /*border-bottom: 1px solid var(--ch-border-color);*/
}

.mega-content {
    position: absolute;
    left: 0;
    right: 0;
    background: var(--ch-navbar-bg);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
}

.nav-item:hover .mega-content {
    display: block;
}

.category-list li a.active {
    background-color: #f0f0f0;
    color: #007bff;
    font-weight: bold;
}

.category-list.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }

    .search-section {
        order: 1;
        width: 100%;
        margin-top: 1rem;
    }

    .header-content {
        flex-wrap: wrap;
    }
}

/* Overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.nav-overlay.active {
    display: block;
}

.top-header{
    border-color: rgba(232, 232, 232, 1);
    border-bottom-width: 1px;
    border-bottom-style: solid;
}
.mega-menu {
    background: #0C6C02;
    /*border-bottom: 1px solid var(--ch-border-color);*/
    position: relative;
    border-color: rgba(232, 232, 232, 1);
    /*border-bottom-width: 1px;*/
    /*border-bottom-style: solid;*/
}

.mega-menu .container {
    position: relative;
}

.mega-menu .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.mega-menu .nav-item {
    position: static;
}

.mega-menu .nav-link {
    padding: 1rem 0;
    display: block;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.mega-menu .nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #F2AD2B;
    transition: width 0.3s ease;
}

.mega-menu .nav-item:hover .nav-link:after {
    width: 100%;
}

.mega-menu .mega-content {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--ch-navbar-bg);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 100;
}

.mega-menu .nav-item:hover .mega-content {
    display: block;
}

.mega-menu .mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.mega-menu .mega-column h4 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.mega-menu .mega-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu .mega-column li {
    margin-bottom: 0.75rem;
}

.mega-menu .mega-column a {
    color: var(--ch-text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.mega-menu .mega-column a:hover {
}

.mega-menu .mega-column img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.mega-menu .mega-column p {
    margin: 0;
    color: var(--ch-text-color);
    font-size: 0.9rem;
}




.search-input-wrapper {
    flex: 1;
    display: flex;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--ch-border-color);
    outline: none;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--ch-border-color);
    border-top: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

.search-suggestions.active {
    display: block;
}

.suggestion-group h4 {
    padding: 0.75rem 1rem;
    margin: 0;
    color: var(--ch-text-color);
    font-size: 0.9rem;
    background: #f5f5f5;
}

.suggestion-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ch-border-color);
    cursor: pointer;
}

.suggestion-item:hover {
    background: #f9f9f9;
}

.suggestion-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    margin-right: 1rem;
}

.suggestion-item-content {
    flex: 1;
}

.suggestion-item-name {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    color: var(--ch-text-color);
}

.suggestion-item-price {
    color: var(--ch-primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}
