/* Kugula navbar: shown on every page on screens 1200px and wider (the theme's phone/tablet header is used below that). */
.kh-topbar {
	--kh-navy: #233a95;
	--kh-blue: #2bbef9;
	--kh-blue-soft: #f0faff;
	--kh-text: #202435;
	--kh-body: #3e445a;
	--kh-muted: #71778e;
	--kh-line: #e9eaf1;
	--kh-bg: #f5f6fa;
	--kh-pink: #ed174a;
	--kh-shadow: 0 1px 2px rgba(32, 36, 53, .04), 0 6px 18px rgba(32, 36, 53, .05);
	display: none;
	font-family: 'Inter', sans-serif;
}
.kh-topbar *, .kh-topbar *::before, .kh-topbar *::after { box-sizing: border-box; }
.kh-topbar a { text-decoration: none; }

@media (min-width: 1200px) {
	.kh-topbar { display: block; position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 999; padding: 14px 0; background: rgba(245, 246, 250, .94); -webkit-backdrop-filter: saturate(160%) blur(10px); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
	.kh-topbar.is-scrolled { border-bottom-color: var(--kh-line); box-shadow: 0 6px 16px rgba(32, 36, 53, .05); }
	/* The theme's top strip and logo/search/cart row are replaced by this navbar; its category + menu row stays on inner pages. */
	.store-notice, .site-header .header-top, .site-header .header-main { display: none !important; }
	body:not(.kugula-home-tpl) .site-header .header-nav { border-top: 0; }
}

.kh-topbar-inner { display: grid; grid-template-columns: 220px minmax(0, 1fr) 320px; gap: 20px; align-items: center; max-width: 1440px; margin: 0 auto; padding: 0 20px; }
body:not(.kugula-home-tpl) .kh-topbar-inner { max-width: 1230px; padding: 0 15px; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 28px; }

.kh-brand { display: flex; align-items: center; height: 44px; }
.kh-brand img { height: 40px; width: auto; max-width: 100%; object-fit: contain; }
.kh-brand span { font-family: 'Dosis', 'Inter', sans-serif; font-weight: 700; font-size: 24px; color: var(--kh-navy); }

.kh-topbar .kh-search { position: relative; display: flex; align-items: center; margin: 0; width: 100%; }
.kh-topbar .kh-search input[type=search] { width: 100%; height: 48px; margin: 0; padding: 0 56px 0 22px; border-radius: 999px; border: 1px solid var(--kh-line); background: #fff; font-size: 14px; font-family: inherit; color: var(--kh-text); box-shadow: var(--kh-shadow); transition: border-color .2s, box-shadow .2s; }
.kh-topbar .kh-search input[type=search]::placeholder { color: #9b9bb4; }
.kh-topbar .kh-search input[type=search]:focus { outline: none; border-color: var(--kh-blue); box-shadow: 0 0 0 4px rgba(43, 190, 249, .15); }
.kh-topbar .kh-search button { position: absolute; right: 5px; top: 5px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--kh-navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; cursor: pointer; padding: 0; transition: background .2s; }
.kh-topbar .kh-search button:hover { background: var(--kh-blue); }
.kh-topbar .screen-reader-text { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }

.kh-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.kh-action { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px; border-radius: 12px; color: var(--kh-text) !important; font-size: 14px; font-weight: 500; transition: background .15s; }
.kh-action:hover { background: #fff; }
.kh-action i { font-size: 19px; color: var(--kh-text); }
.kh-action-ico { position: relative; display: inline-flex; }
.kh-tb-count { position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--kh-pink); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--kh-bg); }
.kh-tb-count.is-empty { display: none; }

.kh-user { position: relative; flex-shrink: 0; }
.kh-user-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; color: var(--kh-text); font-size: 14px; font-weight: 600; font-family: inherit; transition: background .15s; }
.kh-user-btn:hover, .kh-user.is-open .kh-user-btn { background: #fff; }
.kh-user-btn .kh-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.kh-user-btn i { font-size: 10px; color: var(--kh-muted); transition: transform .2s; }
.kh-user.is-open .kh-user-btn i { transform: rotate(180deg); }
.kh-user-name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kh-user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 200px; list-style: none; margin: 0; padding: 8px; background: #fff; border: 1px solid var(--kh-line); border-radius: 14px; box-shadow: 0 16px 36px rgba(32, 36, 53, .12); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; z-index: 1000; }
.kh-user.is-open .kh-user-menu, .kh-user:focus-within .kh-user-menu { opacity: 1; visibility: visible; transform: none; }
.kh-user-menu li { margin: 0; padding: 0; }
.kh-user-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--kh-body) !important; font-size: 13.5px; }
.kh-user-menu a:hover { background: var(--kh-blue-soft); color: var(--kh-navy) !important; }
.kh-user-menu li:last-child { border-top: 1px solid var(--kh-line); margin-top: 6px; padding-top: 6px; }

.kh-signin { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px; background: var(--kh-navy); color: #fff !important; font-size: 14px; font-weight: 600; transition: background .2s; }
.kh-signin:hover { background: var(--kh-blue); }

@media (min-width: 1200px) and (max-width: 1279px) {
	.kugula-home-tpl .kh-topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto; }
}
/* v1.2.1: mobile money logos (footer + checkout) */
.site-payments img { height: 36px; width: auto; }
.kugula-gw-logos { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; vertical-align: middle; }
.woocommerce-checkout #payment ul.payment_methods li .kugula-gw-logos img, .kugula-gw-logos img { width: 28px; height: 28px; max-height: none; margin: 0 !important; border-radius: 6px; display: block; }
/* v1.4.0: the same navbar on phones and tablets (replaces the theme's mobile header) */
.kh-menu-btn { display: none; }
@media (max-width: 1199px) {
	.kh-topbar { display: block; position: sticky; top: 0; z-index: 999; padding: 8px 0 10px; background: #fff; border-bottom: 1px solid var(--kh-line); }
	.kh-topbar.is-scrolled { box-shadow: 0 6px 16px rgba(32, 36, 53, .06); }
	body .kh-topbar .kh-topbar-inner { max-width: 100%; padding: 0 12px; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "menu brand actions" "search search search"; gap: 6px 4px; }
	.kh-menu-btn { grid-area: menu; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -6px; border: 0; border-radius: 10px; background: transparent; color: var(--kh-text); font-size: 22px; padding: 0; cursor: pointer; }
	.kh-menu-btn:hover { background: var(--kh-bg); }
	.kh-brand { grid-area: brand; height: 40px; }
	.kh-brand img { height: 32px; }
	.kh-topbar .kh-search { grid-area: search; }
	.kh-topbar .kh-search input[type=search] { height: 44px; padding-left: 18px; background: var(--kh-bg); border-color: var(--kh-bg); box-shadow: none; font-size: 14px; }
	.kh-topbar .kh-search input[type=search]:focus { background: #fff; }
	.kh-topbar .kh-search button { width: 36px; height: 36px; top: 4px; right: 4px; }
	.kh-actions { grid-area: actions; gap: 0; }
	.kh-action { padding: 0 9px; height: 40px; }
	.kh-action-label, .kh-user-name, .kh-user-btn > i { display: none; }
	.kh-user-btn { padding: 2px; height: 40px; }
	.kh-user-btn .kh-avatar { width: 32px; height: 32px; }
	.kh-signin { width: 40px; height: 40px; padding: 0; justify-content: center; background: transparent; color: var(--kh-text) !important; }
	.kh-signin i { font-size: 20px; }
	.kh-signin span { display: none; }
	.kh-signin:hover { background: var(--kh-bg); }
	/* The theme's own phone header and welcome strip are replaced by the navbar; its bottom tab bar stays. */
	.store-notice, .site-header .header-main, .site-header .header-top, .kugula-msearch { display: none !important; }
	.site-header { background: transparent !important; box-shadow: none !important; border: 0 !important; }
	/* Bottom tab bar */
	.site-header .header-mobile-nav { background: #fff; border-top: 1px solid var(--kh-line); box-shadow: 0 -6px 18px rgba(32, 36, 53, .06); }
	.site-header .header-mobile-nav a { color: var(--kh-muted) !important; font-family: 'Inter', sans-serif; }
	.site-header .header-mobile-nav a i { font-size: 20px; color: inherit !important; }
	.site-header .header-mobile-nav a span { font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; color: inherit !important; }
	.site-header .header-mobile-nav a:hover, .site-header .header-mobile-nav a:focus { color: var(--kh-navy) !important; }
}
@media (max-width: 420px) {
	.kh-actions .kh-action:not(.kh-action--cart) { display: none; }
}
/* v1.4.1: slide-out menu and phone icon spacing */
.site-canvas .canvas-main .all-categories > a { background: var(--kh-navy, #233a95) !important; border-radius: 10px; font-family: 'Inter', sans-serif; font-weight: 600; text-transform: none; letter-spacing: 0; }
.site-canvas .canvas-main .all-categories > a .description { display: none; }
@media (max-width: 1199px) {
	.kh-actions { gap: 8px; }
	.kh-action--cart { padding-right: 12px; }
}
