/* ==========================================================
   OJA EDE - Shared navbar (top bar + floating bottom nav)
   Pair with components/navbar.js

   Every class is prefixed oe- so nothing clashes with
   styles.css (.badge, .navbar, .dot, etc. are NOT used here).
   Colours come from your site variables, with fallbacks.
   ========================================================== */

.oe-topbar,
.oe-bottomnav,
.oe-pagebar,
.oe-drawer,
.oe-drawer-overlay {
  --oe-green: var(--green-main, var(--oja-green, #0f9d58));
  --oe-green-pale: var(--green-pale, #e8f5e9);
  --oe-surface: var(--white, #ffffff);
  --oe-ink: var(--gray-900, #1a1f1c);
  --oe-muted: var(--gray-500, #6b7280);
  --oe-line: var(--gray-200, #e5e7eb);
  --oe-danger: var(--danger, #e53935);
}

html[data-theme="dark"] .oe-topbar,
html[data-theme="dark"] .oe-bottomnav,
html[data-theme="dark"] .oe-pagebar,
html[data-theme="dark"] .oe-drawer,
html[data-theme="dark"] .oe-drawer-overlay {
  --oe-surface: #17211b;
  --oe-ink: #f1f5f2;
  --oe-muted: #a3b0a7;
  --oe-line: rgba(255, 255, 255, 0.12);
  --oe-green-pale: rgba(15, 157, 88, 0.2);
}

.oe-topbar *,
.oe-topbar *::before,
.oe-topbar *::after,
.oe-bottomnav *,
.oe-bottomnav *::before,
.oe-bottomnav *::after,
.oe-pagebar *,
.oe-pagebar *::before,
.oe-pagebar *::after,
.oe-drawer *,
.oe-drawer *::before,
.oe-drawer *::after {
  box-sizing: border-box;
}

.oe-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ==========================================================
   TOP BAR
   ========================================================== */

.oe-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--oe-surface);
  border-bottom: 1px solid var(--oe-line);
  color: var(--oe-ink);
}

.oe-topbar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
}

.oe-topbar a {
  color: inherit;
  text-decoration: none;
}

.oe-topbar a:focus-visible,
.oe-topbar button:focus-visible,
.oe-topbar input:focus-visible,
.oe-bottomnav a:focus-visible {
  outline: 2px solid var(--oe-green);
  outline-offset: 2px;
}

/* Logo */

.oe-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.oe-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.oe-logo-text {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--oe-ink);
}

.oe-logo-text span:last-child {
  color: var(--oe-green);
}

/* Search */

.oe-search {
  position: relative;
  flex: 1;
  max-width: 600px;
  min-width: 0;
  margin: 0;
}

.oe-search input {
  width: 100%;
  height: 42px;
  padding: 0 48px 0 16px;
  border: 1.5px solid var(--oe-line);
  border-radius: 999px;
  background: var(--oe-surface);
  color: var(--oe-ink);
  font: inherit;
  font-size: 0.9rem;
  appearance: none;
}

.oe-search input::placeholder {
  color: var(--oe-muted);
}

.oe-search input:focus {
  border-color: var(--oe-green);
  outline: none;
}

.oe-search button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--oe-green);
  color: #fff;
  cursor: pointer;
}

.oe-search button .oe-icon {
  width: 18px;
  height: 18px;
}

.oe-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--oe-surface);
  border: 1px solid var(--oe-line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.oe-search-dropdown:empty {
  display: none;
}

/* Actions */

.oe-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
  flex-shrink: 0;
}

.oe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--oe-green);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.oe-btn-primary {
  background: var(--oe-green);
  color: #fff !important;
}

.oe-btn-outline {
  background: transparent;
  color: var(--oe-green) !important;
}

.oe-btn-outline:hover {
  background: var(--oe-green-pale);
}

.oe-icon-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--oe-muted);
  cursor: pointer;
}

.oe-icon-btn:hover {
  background: var(--oe-green-pale);
  color: var(--oe-green);
}

.oe-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--oe-muted) !important;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}

.oe-action:hover {
  color: var(--oe-green) !important;
}

.oe-action-icon {
  position: relative;
  display: flex;
}

/* Badges and dot (used by cart, alerts, profile) */

.oe-badge {
  position: absolute;
  top: -7px;
  right: -9px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid var(--oe-surface);
  border-radius: 999px;
  background: var(--oe-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.oe-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--oe-surface);
  border-radius: 50%;
  background: var(--oe-danger);
  display: none;
}

.oe-dot.show {
  display: block;
}

/* User menu */

.oe-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--oe-ink);
  font: inherit;
  cursor: pointer;
}

.oe-avatar {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--oe-green-pale);
  color: var(--oe-green);
  font-weight: 700;
}

.oe-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oe-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  padding: 8px;
  border: 1px solid var(--oe-line);
  border-radius: 16px;
  background: var(--oe-surface);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16);
  z-index: 1002;
}

.oe-dropdown a,
.oe-dropdown button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--oe-ink);
  font: inherit;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}

.oe-dropdown a:hover,
.oe-dropdown button:hover {
  background: var(--oe-green-pale);
}

.oe-dropdown hr {
  margin: 6px 0;
  border: 0;
  border-top: 1px solid var(--oe-line);
}

.oe-dropdown .oe-logout {
  color: var(--oe-danger);
}

/* ==========================================================
   FLOATING BOTTOM NAV
   ========================================================== */

.oe-bottomnav {
  position: fixed;
  left: calc(50% + var(--oe-sidebar-w, 0px) / 2);
  bottom: 20px;
  transform: translateX(-50%);
  width: min(92%, calc(100% - var(--oe-sidebar-w, 0px) - 24px));
  max-width: 520px;
  height: 78px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: color-mix(in srgb, var(--oe-surface) 92%, transparent);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-radius: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  z-index: 9999;
}

@supports (padding: max(0px)) {
  .oe-bottomnav {
    bottom: max(20px, env(safe-area-inset-bottom));
  }
}

.oe-tab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--oe-muted);
  text-decoration: none;
}

.oe-tab span {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
}

.oe-tab-icon {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.oe-tab:hover {
  color: var(--oe-green);
}

.oe-tab:hover .oe-tab-icon {
  transform: translateY(-5px);
}

.oe-tab:active .oe-tab-icon {
  transform: translateY(-5px) scale(0.92);
}

.oe-tab.active {
  color: var(--oe-green);
}

.oe-tab.active span {
  font-weight: 700;
}

.oe-tab.active .oe-tab-icon {
  background: var(--oe-green);
  color: #fff;
  transform: translateY(-12px);
  box-shadow: 0 10px 25px rgba(15, 157, 88, 0.35);
}

/* ==========================================================
   Keep floating buttons (WhatsApp chat) above the bottom nav
   ========================================================== */

body:has(.oe-bottomnav) .whatsapp-float {
  bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
}

/* styles.css adds 70px of body padding on mobile for the OLD bottom nav.
   The footer already reserves space for the floating nav, so remove it
   (only on pages that have both, so pages without a footer stay safe). */
body:has(.oe-bottomnav):has(.oe-footer) {
  padding-bottom: 0;
}

/* ==========================================================
   PAGES WITH A SIDEBAR
   ==========================================================
   navbar.js measures any fixed sidebar and sets --oe-sidebar-w
   (nav is centred in the content area). When a phone drawer covers
   most of the screen it adds .oe-nav-covered to hide the nav. */

.oe-nav-covered,
body:has(.dashboard-sidebar.open) .oe-bottomnav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(24px);
}

/* ==========================================================
   ROUND BAR BUTTONS (back + menu) - same look on every page
   ========================================================== */

.oe-bar-btn {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--oe-green-pale);
  color: var(--oe-green);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.oe-bar-btn:hover {
  background: color-mix(in srgb, var(--oe-green) 18%, var(--oe-green-pale));
}

.oe-bar-btn:active {
  transform: scale(0.92);
}

.oe-bar-btn:focus-visible {
  outline: 2px solid var(--oe-green);
  outline-offset: 2px;
}

.oe-topbar .oe-menu-btn {
  margin-right: -4px;
}

/* ==========================================================
   PAGE BAR (every page except the homepage)
   ========================================================== */

.oe-pagebar {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--oe-surface) 94%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--oe-line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
  color: var(--oe-ink);
}

.oe-pagebar a {
  color: inherit;
  text-decoration: none;
}

.oe-pagebar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  min-height: 62px;
  margin: 0 auto;
  padding: 10px 14px;
}

.oe-pagebar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.oe-pagebar-logo {
  display: flex;
  flex: 0 0 auto;
}

.oe-pagebar-logo img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px var(--oe-green-pale);
}

.oe-pagebar-title > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

/* ==========================================================
   MENU DRAWER (shared by every page, role-based content)
   ========================================================== */

html.oe-menu-open {
  overflow: hidden;
}

.oe-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 22, 13, 0.52);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.oe-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.oe-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  width: min(88vw, 340px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 26px 0 0 26px;
  background: var(--oe-surface);
  color: var(--oe-ink);
  box-shadow: -18px 0 50px rgba(0, 0, 0, 0.28);
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0.3s;
}

.oe-drawer.open {
  transform: translateX(0);
  visibility: visible;
}

.oe-drawer a {
  color: inherit;
  text-decoration: none;
}

.oe-drawer a:focus-visible,
.oe-drawer button:focus-visible {
  outline: 2px solid var(--oe-green);
  outline-offset: 2px;
}

/* ----- header ----- */

.oe-drawer-head {
  flex: 0 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.16), transparent 55%),
    linear-gradient(160deg, var(--oe-green), color-mix(in srgb, var(--oe-green) 52%, #03261a));
  color: #ffffff;
}

.oe-drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.oe-drawer-brand img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.oe-drawer-brand-text {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.oe-drawer-brand-text span:last-child {
  opacity: 0.8;
}

.oe-drawer-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease;
}

.oe-drawer-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.oe-drawer-close .oe-icon {
  width: 20px;
  height: 20px;
}

.oe-drawer-user {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.oe-drawer-avatar {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ffffff;
  color: var(--oe-green);
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.oe-drawer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oe-drawer-who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.oe-drawer-who strong {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.05rem;
  font-weight: 750;
}

.oe-role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.oe-role-chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.oe-drawer-guest {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.oe-drawer-guest strong {
  font-size: 1.05rem;
  font-weight: 750;
}

.oe-drawer-guest span {
  font-size: 0.82rem;
  line-height: 1.45;
  opacity: 0.85;
}

/* ----- links ----- */

.oe-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 6px;
  overscroll-behavior: contain;
}

.oe-drawer-section {
  padding-top: 8px;
}

.oe-drawer-section + .oe-drawer-section {
  margin-top: 6px;
  border-top: 1px solid var(--oe-line);
}

.oe-drawer-section-title {
  padding: 8px 12px 6px;
  color: var(--oe-muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.oe-drawer-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 0.93rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.oe-drawer-link:hover {
  background: var(--oe-green-pale);
}

.oe-link-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--oe-green-pale);
  color: var(--oe-green);
  transition: background 0.15s ease, color 0.15s ease;
}

.oe-link-icon .oe-icon {
  width: 20px;
  height: 20px;
}

.oe-link-label {
  flex: 1;
  min-width: 0;
}

.oe-chevron {
  display: flex;
  color: var(--oe-muted);
  opacity: 0.7;
}

.oe-chevron .oe-icon {
  width: 17px;
  height: 17px;
}

.oe-drawer-link.active {
  background: var(--oe-green-pale);
  color: var(--oe-green);
  font-weight: 750;
}

.oe-drawer-link.active .oe-link-icon {
  background: var(--oe-green);
  color: #ffffff;
}

.oe-drawer-link.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--oe-green);
}

/* ----- footer ----- */

.oe-drawer-foot {
  flex: 0 0 auto;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--oe-line);
}

.oe-drawer-logout,
.oe-drawer-login {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.oe-drawer-logout {
  border: 1.5px solid color-mix(in srgb, var(--oe-danger) 38%, transparent);
  background: transparent;
  color: var(--oe-danger);
}

.oe-drawer-logout:hover {
  background: color-mix(in srgb, var(--oe-danger) 10%, transparent);
}

.oe-drawer-login {
  border: 0;
  background: var(--oe-green);
  color: #ffffff !important;
}

.oe-drawer-logout .oe-icon,
.oe-drawer-login .oe-icon {
  width: 20px;
  height: 20px;
}

.oe-drawer-tag {
  margin-top: 12px;
  text-align: center;
  color: var(--oe-green);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

@media (prefers-reduced-motion: reduce) {
  .oe-drawer,
  .oe-drawer-overlay,
  .oe-bar-btn,
  .oe-drawer-link {
    transition: none;
  }
}

@media print {
  .oe-pagebar,
  .oe-drawer,
  .oe-drawer-overlay {
    display: none !important;
  }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (min-width: 768px) {
  .oe-bottomnav {
    max-width: 560px;
  }

  .oe-tab span {
    font-size: 12px;
  }
}

@media (max-width: 768px) {
  .oe-hide-md {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .oe-topbar-inner {
    gap: 10px;
    padding: 8px 12px;
  }

  .oe-actions {
    gap: 8px;
  }

  /* The bottom nav already has Cart on small screens */
  .oe-cart {
    display: none !important;
  }

  .oe-user-name {
    display: none;
  }

  .oe-action-label {
    display: none;
  }
}

@media (max-width: 430px) {
  .oe-logo-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .oe-tab-icon {
    transition: none;
  }
}

@media print {
  .oe-topbar,
  .oe-bottomnav {
    display: none !important;
  }
}

/* ==========================================================
   OJA EDE — CONSISTENT SHARED BRANDING
   Logo on the left, wordmark centred as one brand unit.
   ========================================================== */

:root {
  --oe-brand-deep-green: #064E3B;
  --oe-brand-lemon: #C6F000;
}

/* Shared wordmark */

.oe-brand-wordmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.035em;
}

.oe-brand-oja {
  color: var(--oe-brand-deep-green) !important;
}

.oe-brand-ede {
  color: var(--oe-brand-lemon) !important;
}

/* ==========================================================
   STANDARD PAGE BAR
   ========================================================== */

.oe-pagebar-inner {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  min-height: 62px;
}

.oe-pagebar-side {
  display: flex;
  align-items: center;
  min-width: 0;
  z-index: 2;
}

.oe-pagebar-left {
  justify-content: flex-start;
}

.oe-pagebar-right {
  justify-content: flex-end;
}

.oe-pagebar-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: calc(100% - 116px);
  min-width: 0;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.oe-pagebar-brand img {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
}

.oe-pagebar-brand .oe-brand-wordmark {
  font-size: 1.12rem;
}

.oe-pagebar-title {
  display: none !important;
}

/* ==========================================================
   HOMEPAGE TOP BAR
   ========================================================== */

.oe-topbar-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
}

.oe-topbar-left {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.oe-topbar-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.oe-topbar-brand img {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
}

.oe-topbar-brand .oe-brand-wordmark {
  font-size: 1.1rem;
}

/* Keep search and actions in the existing desktop layout */

.oe-topbar-inner > .oe-search {
  flex: 1 1 auto;
  min-width: 0;
}

.oe-topbar-inner > .oe-actions {
  flex: 0 0 auto;
}

/* Dark mode: keep the brand colours consistent */

html[data-theme="dark"] .oe-brand-oja {
  color: #55C99A !important;
}

html[data-theme="dark"] .oe-brand-ede {
  color: #C6F000 !important;
}

/* ==========================================================
   RESPONSIVE BRANDING
   ========================================================== */

@media (max-width: 768px) {
  .oe-pagebar-inner {
    gap: 6px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .oe-pagebar-brand {
    gap: 7px;
  }

  .oe-pagebar-brand img,
  .oe-topbar-brand img {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .oe-pagebar-brand .oe-brand-wordmark,
  .oe-topbar-brand .oe-brand-wordmark {
    font-size: 1rem;
  }
}

@media (max-width: 640px) {
  .oe-topbar-inner {
    gap: 8px;
  }

  .oe-topbar-brand {
    gap: 5px;
  }

  .oe-topbar-brand img {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .oe-topbar-brand .oe-brand-wordmark {
    font-size: 0.88rem;
    letter-spacing: 0.015em;
  }

  .oe-pagebar-brand {
    max-width: calc(100% - 104px);
    gap: 5px;
  }

  .oe-pagebar-brand img {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .oe-pagebar-brand .oe-brand-wordmark {
    font-size: 0.9rem;
    letter-spacing: 0.015em;
  }
}

/* Very narrow phones */

@media (max-width: 360px) {
  .oe-pagebar-brand,
  .oe-topbar-brand {
    gap: 4px;
  }

  .oe-pagebar-brand img,
  .oe-topbar-brand img {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }

  .oe-pagebar-brand .oe-brand-wordmark,
  .oe-topbar-brand .oe-brand-wordmark {
    font-size: 0.78rem;
  }
}

/* Homepage: keep the shared header focused on search and controls. */
.oe-topbar-brand {
  display: none !important;
}


/* ==========================================================
   OJA EDE — REFINED CENTRED PAGE BRAND
   ========================================================== */
.oe-pagebar {
  min-height: 76px;
}

.oe-pagebar-inner {
  min-height: 76px;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
}

.oe-pagebar-brand {
  gap: 10px;
  max-width: calc(100% - 96px);
  padding: 5px 10px;
  border-radius: 18px;
  transition: transform .2s ease, background .2s ease;
}

.oe-pagebar-brand:hover {
  background: var(--oe-green-pale);
  transform: translate(-50%, -50%) scale(1.025);
}

.oe-pagebar-brand img {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  filter: drop-shadow(0 3px 5px rgba(6, 78, 59, .12));
}

.oe-pagebar-brand .oe-brand-wordmark {
  gap: 5px;
  font-size: clamp(1.2rem, 4.4vw, 1.55rem);
  font-weight: 950;
  letter-spacing: .055em;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .04);
}

.oe-pagebar .oe-bar-btn {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  box-shadow: 0 4px 12px rgba(6, 78, 59, .08);
}

@media (max-width: 420px) {
  .oe-pagebar,
  .oe-pagebar-inner {
    min-height: 70px;
  }

  .oe-pagebar-brand {
    gap: 6px;
    max-width: calc(100% - 78px);
    padding: 4px 5px;
  }

  .oe-pagebar-brand img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .oe-pagebar-brand .oe-brand-wordmark {
    gap: 3px;
    font-size: clamp(1.05rem, 5vw, 1.28rem);
    letter-spacing: .025em;
  }
}


/* ==========================================================
   FIX: sticky bars inside #navbar-container
   The page bar / top bar are rendered inside the container. Letting the
   container "disappear" from layout lets position:sticky work against the
   page, so the bar stays at the top while scrolling.
   ========================================================== */

#navbar-container {
  display: contents;
}
