/* =========================================================
   Jarabay public menu: dark top bar, main-colour header, main-colour
   category bar. Every colour comes from the admin Colours page
   (CSS variables printed by Setting::marketVars()).
   Used by every public page (home, category, product, store, cart).
   ========================================================= */
.jb-nav { font-family: 'Inter', sans-serif; --_p: var(--navy,#0A2540); --_pd: var(--navy-dark,#061626); --_a: var(--orange,#F59E0B); }
.jb-nav .jb-wrap { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.jb-nav a { text-decoration: none; }

.jb-topbar { background: var(--_pd); color: #94A3B8; font-size: 12.5px; }
.jb-topbar .jb-wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.jb-topbar .grp { display: flex; align-items: center; flex-wrap: wrap; }
.jb-topbar a { color: #CBD5E1; margin-right: 14px; }
.jb-topbar a:hover { color: #fff; }
.jb-topbar .jb-ev { color: var(--_a); font-weight: 700; }

.jb-header { background: var(--_p); position: sticky; top: 0; z-index: 100; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1); }
.jb-header .jb-wrap { display: flex; align-items: center; gap: 20px; min-height: 66px; }
.jb-nav .jb-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 22px; color: #fff; white-space: nowrap; letter-spacing: -.02em; }
.jb-nav .jb-logo .mk { border-radius: 9px; background: var(--_a); color: var(--_p); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; min-width: 38px; height: 38px; overflow: visible; }
.jb-nav .jb-logo .mk:has(img) { background: none; min-width: 0; height: auto; }
.jb-nav .jb-logo .mk img { width: auto; height: var(--logo-h-nav, 40px); max-width: 260px; object-fit: contain; display: block; }
.jb-nav .jb-logo b { color: var(--_a); }

.jb-locsel { position: relative; flex: none; }
.jb-locsel > summary { list-style: none; display: flex; align-items: center; gap: 6px; color: #CBD5E1; font-size: 13.5px; cursor: pointer; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.08); white-space: nowrap; max-width: 180px; }
.jb-locsel > summary::-webkit-details-marker { display: none; }
.jb-locsel > summary span { overflow: hidden; text-overflow: ellipsis; }
.jb-locsel[open] > summary { color: #fff; }
.jb-locpop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 120; width: 280px; background: #fff; color: #111827; border-radius: 12px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.2); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.jb-locpop strong { font-size: 14px; }
.jb-locpop .btn-gps { background: var(--_a); color: var(--_p); border: 0; border-radius: 8px; padding: 10px; font-weight: 700; cursor: pointer; }
.jb-locpop select { width: 100%; padding: 10px; border: 1px solid #E5E7EB; border-radius: 8px; }
.jb-locpop .lnk { background: none; border: 0; color: #4B5563; text-decoration: underline; font-size: 12.5px; cursor: pointer; padding: 0; text-align: left; }

.jb-search { flex: 1; display: flex; background: #fff; border-radius: 8px; overflow: hidden; height: 46px; min-width: 120px; }
.jb-search input { flex: 1; border: 0; outline: 0; padding: 0 18px; font: inherit; font-size: 15px; color: #111827; background: #fff; min-width: 0; }
.jb-search button { border: 0; background: var(--_a); color: var(--_p); font-weight: 800; padding: 0 26px; cursor: pointer; font-family: inherit; }
.jb-search button:hover { background: var(--orange-hover,#D97706); }

.jb-actions { display: flex; align-items: center; gap: 18px; }
.jb-actions a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #CBD5E1; font-size: 12px; font-weight: 600; position: relative; }
.jb-actions a:hover { color: #fff; }
.jb-actions svg { width: 22px; height: 22px; }
.jb-badge { position: absolute; top: -6px; right: -8px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--_a); color: var(--_p); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

.jb-catbar { background: var(--_p); border-top: 1px solid rgba(255,255,255,.07); }
.jb-catbar .jb-wrap { display: flex; align-items: stretch; gap: 2px; }
.jb-allcats { position: relative; flex: none; }
.jb-allcats > button { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; font-size: 13.5px; padding: 12px 14px; border: 0; background: rgba(0,0,0,.2); cursor: pointer; font-family: inherit; white-space: nowrap; }
.jb-allcats > button:hover { background: rgba(0,0,0,.32); }
.jb-catdrop { display: none; position: absolute; top: 100%; left: 0; z-index: 120; width: 280px; background: #fff; border-radius: 0 0 12px 12px; box-shadow: 0 10px 15px -3px rgba(0,0,0,.2); padding: 6px; max-height: 70vh; overflow-y: auto; }
.jb-allcats.open .jb-catdrop { display: block; }
.jb-catdrop a { display: flex; align-items: center; gap: 10px; color: #111827; padding: 9px 12px; border-radius: 8px; font-weight: 500; font-size: 14px; }
.jb-catdrop a:hover { background: #F1F5F9; }
.jb-cats { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.jb-cats::-webkit-scrollbar { display: none; }
.jb-cats a { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; font-size: 13.5px; padding: 12px 12px; white-space: nowrap; }
.jb-cats a:hover { background: rgba(255,255,255,.08); }
.jb-cats a.on { color: var(--_a); }

.jb-bottom { display: none; }
@media (max-width: 768px) {
    .jb-topbar { display: none; }
    .jb-header .jb-wrap { flex-wrap: wrap; gap: 10px; min-height: 0; padding-top: 10px; padding-bottom: 10px; }
    .jb-search { order: 3; width: 100%; height: 42px; flex: none; }
    .jb-locsel { display: none; }
    .jb-actions { margin-left: auto; }
    .jb-actions a span { display: none; }
    .jb-allcats { display: none; }
    .jb-bottom { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000; background: #fff; border-top: 1px solid #E2E8F0; box-shadow: 0 -4px 10px rgba(0,0,0,.05); padding: 6px 0; justify-content: space-around; }
    .jb-bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; color: #64748B; font-size: 11px; font-weight: 600; position: relative; padding: 2px 10px; }
    .jb-bottom a.on { color: var(--_p); }
    .jb-bottom svg { width: 22px; height: 22px; }
    .jb-bottom .jb-badge { top: -2px; right: 6px; }
    body { padding-bottom: 64px; }
}

/* Keep the menu colours above any page-level `a{color:inherit}` rule. */
.jb-nav .jb-topbar a { color: #CBD5E1; }
.jb-nav .jb-topbar a:hover { color: #fff; }
.jb-nav .jb-topbar .jb-ev { color: var(--_a); }
.jb-nav .jb-logo { color: #fff; }
.jb-nav .jb-actions a { color: #CBD5E1; }
.jb-nav .jb-actions a:hover { color: #fff; }
.jb-nav .jb-locsel > summary { color: #CBD5E1; }
.jb-nav .jb-allcats > button { color: #fff; }
.jb-nav .jb-cats a { color: #fff; }
.jb-nav .jb-cats a.on { color: var(--_a); }
.jb-nav .jb-catdrop a { color: #111827; }
.jb-nav .jb-bottom a { color: #64748B; }
.jb-nav .jb-bottom a.on { color: var(--_p); }

/* ---------- Landing menu (used on public pages when marketplace is off and guest is not signed in) ---------- */
/* ---------- Landing-only header (lp-nav) ---------- */
/* Loaded only on /sell, so these classes never touch the marketplace header. */
.lp-nav {
    position: sticky; top: 0; z-index: 60;
    background: var(--navy,#0A2540);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.lp-wrap {
    max-width: 1200px; margin: 0 auto; padding: 14px 20px;
    display: flex; align-items: center; gap: 24px;
}
.lp-logo {
    display: inline-flex; align-items: center; gap: 10px;
    color: #fff; text-decoration: none; font-weight: 800; font-size: 20px;
    letter-spacing: -.2px;
}
.lp-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: #FF9E1B; color: var(--navy,#0A2540); font-weight: 900; font-size: 18px;
}
.lp-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.lp-name b { color: #FF9E1B; }

.lp-links {
    margin-left: auto;
    display: flex; align-items: center; gap: 26px;
}
.lp-links a {
    color: #cfd8e3; text-decoration: none; font-weight: 500; font-size: 15px;
    transition: color .15s;
}
.lp-links a:hover { color: #fff; }

.lp-cta {
    display: inline-block; padding: 11px 20px; border-radius: 10px;
    background: #FF9E1B; color: var(--navy,#0A2540); font-weight: 700; font-size: 15px;
    text-decoration: none; white-space: nowrap;
    box-shadow: 0 6px 18px rgba(255,158,27,.28);
    transition: transform .15s, box-shadow .15s;
}
.lp-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255,158,27,.35); }

/* Mobile-only pieces are hidden on desktop */
.lp-signin-m, .lp-burger, .lp-drawer { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
    .lp-wrap { gap: 12px; padding: 12px 16px; }
    .lp-links, .lp-cta { display: none; }

    /* Sign-in moved to top-right */
    .lp-signin-m {
        display: inline-block; margin-left: auto;
        color: #FF9E1B; font-weight: 600; font-size: 15px; text-decoration: none;
        padding: 6px 4px;
    }

    /* Hamburger button */
    .lp-burger {
        display: inline-flex; flex-direction: column; justify-content: center;
        gap: 4px; width: 36px; height: 36px; padding: 6px;
        background: transparent; border: 0; cursor: pointer;
    }
    .lp-burger span {
        display: block; height: 2px; width: 100%;
        background: #fff; border-radius: 2px;
    }

    /* Drawer that opens below */
    .lp-drawer {
        display: block;
        background: #071d33;
        border-top: 1px solid rgba(255,255,255,.06);
        padding: 8px 0 12px;
    }
    .lp-drawer[hidden] { display: none; }
    .lp-drawer a {
        display: block; padding: 12px 20px;
        color: #cfd8e3; text-decoration: none; font-weight: 500; font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,.05);
    }
    .lp-drawer a:last-child { border-bottom: 0; }
    .lp-drawer .lp-cta-m {
        margin: 10px 20px 4px; padding: 12px 20px;
        background: #FF9E1B; color: var(--navy,#0A2540); border-radius: 10px;
        text-align: center; font-weight: 700; border-bottom: 0;
    }
}

/* uniform-menu: sign-in pages sit under the site menu */
.jb-header ~ .auth { min-height: calc(100vh - 78px); }
