/* Kobadu marketplace header — inspired by made-in-china.com */

.kobadu-marketing-strip {
    background-color: #439C0F;
    font-size: 12.5px;
    padding: 6px 0;
}

/* !important throughout: css/forked/style.css sets `.kobadu-forked a {
   color: #343a40 }`, a class+element selector (0-1-1) that beats these plain
   class selectors (0-1-0) regardless of load order — same landmine as
   .kb-secondary-link above. Both are <a> tags now, so both need it. */
.kb-marketing-tagline {
    color: #fff !important;
    text-decoration: none;
    transition: color .15s ease;
}

.kb-marketing-tagline:hover {
    color: #F3FAEF !important;
    text-decoration: none;
}

.kb-marketing-tagline strong {
    color: #fff !important;
}

.kb-marketing-cta {
    color: #fff !important;
    text-decoration: underline;
    white-space: nowrap;
}

.kb-marketing-cta:hover {
    color: #F3FAEF !important;
    text-decoration: underline;
}

.kb-marketing-cta strong {
    color: #fff !important;
}

.kobadu-secondary-nav {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
    min-height: 34px;
    display: flex;
    align-items: center;
}

.kb-secondary-nav-group {
    gap: 0;
}

.kb-secondary-link,
.kobadu-secondary-nav .nav-item.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 12.5px;
    font-weight: 600;
    text-transform: none;
    /* !important: css/forked/style.css sets `.kobadu-forked a { color:
       #343a40 }` — class+element (0-1-1) beats this plain class (0-1-0)
       regardless of load order, so these links were rendering dark grey
       instead of the intended black. */
    color: #000 !important;
    text-decoration: none;
    white-space: nowrap;
}

.kb-secondary-link:hover,
.kobadu-secondary-nav .nav-item.nav-link:hover {
    color: #439C0F;
    text-decoration: none;
}

.kobadu-header-main {
    background-color: #fff;
    border-bottom: 1px solid #eaeaea;
}

.kobadu-header-main .logo {
    cursor: pointer;
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
}

.kobadu-search-wrap {
    position: relative;
}

.kobadu-search-wrap .input-group {
    border: 2px solid #439C0F;
    border-radius: 6px;
    overflow: hidden;
}

.kobadu-search-wrap .form-control {
    border: 0;
    height: 46px;
    font-size: 14px;
    box-shadow: none;
}

.kobadu-search-wrap .custom-select {
    height: 46px !important;
    line-height: 44px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 13px;
    color: #555;
}

.kobadu-search-wrap .input-group-append .btn-search {
    background-color: #439C0F;
    border: 0;
    color: #fff;
    border-radius: 0;
    padding: 0 26px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kobadu-search-wrap .input-group-append .btn-search:hover {
    background-color: #378A0C;
}

.kobadu-header-action {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kb-post-ad-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #439C0F;
    color: #fff;
    border: 0;
    border-radius: 10px !important;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, transform .15s ease;
}

.kb-post-ad-btn:hover {
    background: #378A0C;
    color: #fff;
}

.kb-post-ad-btn i {
    font-size: 16px;
    line-height: 1;
}

.kb-post-ad-btn:active {
    transform: translateY(1px);
}

.kobadu-header-action .action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: transparent;
    border: 0;
    color: #343a40;
    font-size: 12.5px;
    cursor: pointer;
    transition: background-color .15s ease;
    border-radius: 4px;
}

.kobadu-header-action .action-btn:hover {
    background-color: #f2f2f2;
}

.kobadu-header-action .action-btn i {
    font-size: 20px;
    margin-bottom: 2px;
    color: #1c1c1c;
}

.kobadu-header-action .action-btn .action-badge {
    position: absolute;
    top: -4px;
    right: 2px;
    background-color: #439C0F;
    color: #fff;
    font-size: 10.5px;
    line-height: 1;
    padding: 3px 5px;
    border-radius: 10px;
    min-width: 17px;
    text-align: center;
}

.kb-header-action-desktop-only { display: flex; align-items: center; }

/* .kobadu-header-main's container is px-0 (no side padding), so the logo
   sits flush against the viewport edge on desktop/laptop widths — this
   margin is what keeps it off the edge. Mobile has its own row padding
   below, so it resets this back to 0 there. */
.kb-header-logo-wrap { width: 210px; margin-left: 20px; }
.kb-header-logo { width: 100%; height: 80px; }

/* ── Mobile header ──────────────────────────────────────────────
   Two rows:
     row 1 — hamburger · logo · (spacer) · account
     row 2 — search bar, full width
   Achieved by letting the header flex row wrap and pushing the search
   block to `order: 1` with a 100% basis, so it always lands on its own
   line. The marketing strip is hidden here. The secondary nav stays
   visible as one single row of 5 links (Top Deals, Verified Suppliers,
   Help, Contact us, About us), spread edge-to-edge — "All Category" is
   dropped from this row since the hamburger already covers browsing
   categories on mobile. [all-category-nav-menu-item] is an attribute,
   not a real tag — PageLessComponent replaces the placeholder with its
   own view() root (a <div> here) and marks it via setAttribute, see the
   faq-item/dropdown-menu-item notes in home-slider.css. */
@media (max-width: 991.98px) {
    .kobadu-marketing-strip,
    .kb-header-action-desktop-only {
        display: none;
    }

    .kobadu-secondary-nav {
        display: flex;
    }

    .kobadu-secondary-nav .d-flex.justify-content-between {
        flex-wrap: nowrap;
        width: 100%;
    }

    .kobadu-secondary-nav [all-category-nav-menu-item] {
        display: none;
    }

    /* Flattens both .kb-secondary-nav-group wrappers out of the layout
       tree so their <a> children become direct flex items of the outer
       .justify-content-between row — otherwise each group would space
       its own links independently, bunching Verified Suppliers and Help
       together at the midpoint instead of spreading all 5 evenly. */
    .kobadu-secondary-nav .kb-secondary-nav-group {
        display: contents;
    }

    .kobadu-secondary-nav .kb-secondary-link {
        padding: 6px 4px;
        font-size: 11px;
    }

    .kobadu-header-main {
        box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
    }

    .kobadu-header-main .d-flex.align-items-center.py-2.py-md-3 {
        flex-wrap: wrap;
        gap: 0;
        padding: 8px 12px !important;
    }

    .kb-hamburger-btn {
        margin-right: 4px;
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    /* Logo sits on row 1 next to the hamburger. Drop the desktop
       px-3/mr-2 utility padding so it hugs the left edge, and drop the
       desktop-only left margin too — the row itself already carries
       12px of padding here. */
    .kb-header-logo-wrap { width: auto; margin-left: 0; }
    .kb-header-logo {
        width: auto;
        height: 38px;
        min-width: 120px;
        padding: 0 !important;
        margin-right: 0 !important;
        background-position: left center !important;
    }

    /* Search: own full-width row, below everything else. */
    .kobadu-header-main .flex-1 {
        order: 1;
        flex: 0 0 100%;
        max-width: 100%;
        min-width: 0;
        padding: 0 !important;
        margin-top: 10px;
    }

    /* Account block pinned to the right end of row 1. */
    .kobadu-header-main .col-auto {
        margin-left: auto;
        padding-right: 0 !important;
    }

    .kobadu-search-wrap form { padding: 0 !important; }

    .kobadu-search-wrap .input-group {
        border-radius: 22px;
        border-width: 1.5px;
        flex-wrap: nowrap;
    }

    .kobadu-search-wrap .form-control {
        height: 42px;
        min-width: 0;
        padding-left: 18px;
        font-size: 14px;
    }

    .kobadu-search-wrap .input-group-append .btn-search {
        height: 42px;
        padding: 0 20px;
        justify-content: center;
        border-radius: 0 22px 22px 0;
        gap: 6px;
    }

    .kobadu-header-action .action-btn { padding: 4px 6px; }
    .kobadu-header-action .action-btn span { display: none; }
    .kobadu-header-action .action-btn i { font-size: 20px; margin-bottom: 0; }
}

/* Mobile hamburger trigger — hidden on desktop, shown via header.css media query below */
.kb-hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    color: #1c1c1c;
    font-size: 22px;
    flex-shrink: 0;
    margin-right: 8px;
}

@media (max-width: 991.98px) {
    .kb-hamburger-btn { display: flex; }
}

/* Mobile off-canvas menu */
.kb-mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(17, 17, 17, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.kb-mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.kb-mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 84%;
    max-width: 320px;
    background: #fff;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .25s ease;
}

.kb-mobile-menu.open .kb-mobile-menu-panel {
    transform: translateX(0);
}

.kb-mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.kb-mobile-menu-logo {
    height: 34px;
    width: auto;
}

.kb-mobile-menu-close {
    background: transparent;
    border: 0;
    font-size: 20px;
    color: #666;
    width: 34px;
    height: 34px;
}

.kb-mobile-menu-account {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    background: #F3FAEF;
    border: 0;
    border-bottom: 1px solid #f0f0f0;
    padding: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.kb-mobile-menu-account i:first-child { font-size: 22px; color: #439C0F; }
.kb-mobile-menu-chevron { margin-left: auto; font-size: 16px; color: #999; }

.kb-mobile-menu-post-ad {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 16px;
    background: #439C0F;
    color: #fff;
    border: 0;
    border-radius: 8px !important;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
}

.kb-mobile-menu-section-label {
    padding: 14px 16px 6px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #999;
}

.kb-mobile-menu-categories {
    display: flex;
    flex-direction: column;
}

.kb-mobile-menu-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: #000;
    font-size: 13.5px;
    font-weight: 600;
}

.kb-mobile-menu-category img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #ececec;
    flex-shrink: 0;
}

.kb-mobile-menu-category:hover { background: #FAFAFA; text-decoration: none; color: #000; }

.kb-mobile-menu-category-row {
    display: flex;
    align-items: stretch;
}

.kb-mobile-menu-category-row .kb-mobile-menu-category {
    flex: 1;
    min-width: 0;
}

.kb-mobile-menu-category-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    flex-shrink: 0;
    background: none;
    border: 0;
    border-left: 1px solid #f7f7f7;
    color: #999;
    font-size: 13px;
    cursor: pointer;
}

.kb-mobile-menu-category-toggle i {
    transition: transform .2s ease;
}

.kb-mobile-menu-category-toggle-open {
    transform: rotate(180deg);
}

.kb-mobile-menu-subcategories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    background: #FAFAFA;
    padding: 10px 16px 10px 44px;
    max-height: 260px;
    overflow-y: auto;
}

.kb-mobile-menu-subcategory {
    display: block;
    padding: 7px 0;
    color: #555;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kb-mobile-menu-subcategory:hover {
    color: #439C0F;
    text-decoration: none;
}

.kb-mobile-menu-link {
    display: block;
    width: 100%;
    padding: 12px 16px;
    color: #000;
    font-size: 13.5px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    background: none;
    border: none;
    border-bottom: 1px solid #f7f7f7;
    font-family: inherit;
    cursor: pointer;
}

.kb-mobile-menu-link:hover { background: #FAFAFA; text-decoration: none; color: #000; }