/* HELLODEORIA V2.5 - unified responsive navigation */
:root {
  --hd-nav-breakpoint: 900px;
  --hd-header-height: 68px;
  --hd-bottom-nav-height: 68px;
  --hd-nav-z-header: 220;
  --hd-nav-z-bottom: 230;
  --hd-nav-z-overlay: 280;
  --hd-nav-z-drawer: 300;
}

.hd-header {
  position: sticky;
  top: 0;
  z-index: var(--hd-nav-z-header);
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.hd-header-inner {
  min-height: var(--hd-header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.hd-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 850;
}

.hd-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.hd-brand-copy strong,
.hd-brand-copy small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hd-brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.hd-brand-logo,
.hd-brand-placeholder {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  object-fit: cover;
}

.hd-brand-placeholder {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #6d8ad1);
  font-weight: 900;
}

.hd-tenant-header .hd-brand-placeholder {
  background: var(--tenant-primary);
}

.hd-desktop-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 720;
}

.hd-desktop-nav > a,
.hd-desktop-nav > .hd-nav-user,
.hd-desktop-nav .hd-link-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  color: #435066;
}

.hd-desktop-nav > a:hover,
.hd-desktop-nav > a.is-active,
.hd-desktop-nav .hd-link-button:hover {
  background: #eef3fc;
  color: var(--primary);
}

.hd-desktop-nav > a.is-active {
  font-weight: 850;
}

.hd-desktop-nav > a.btn-primary {
  background: var(--primary);
  color: #fff;
}

.hd-desktop-nav > a.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.hd-nav-user {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted) !important;
}

.hd-link-button {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.hd-menu-button,
.hd-drawer-close,
.hd-bottom-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.hd-menu-button {
  display: none;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
}

.hd-nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.hd-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--hd-nav-z-overlay);
  visibility: hidden;
  opacity: 0;
  background: rgba(10, 20, 39, .58);
  transition: opacity .2s ease, visibility .2s ease;
}

.hd-nav-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.hd-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: var(--hd-nav-z-drawer);
  width: min(88vw, 380px);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  transform: translateX(105%);
  background: #fff;
  box-shadow: -22px 0 60px rgba(16, 31, 58, .24);
  transition: transform .24s ease, visibility .24s ease;
}

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

.hd-drawer-header {
  min-height: 72px;
  padding: 12px 14px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.hd-drawer-title {
  min-width: 0;
}

.hd-drawer-title strong,
.hd-drawer-title small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hd-drawer-title small {
  color: var(--muted);
}

.hd-drawer-close {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #f2f5fa;
}

.hd-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 14px calc(24px + env(safe-area-inset-bottom));
}

.hd-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hd-drawer-section + .hd-drawer-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hd-drawer-label {
  padding: 0 12px 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hd-drawer-link,
.hd-drawer-action,
.hd-drawer-section .hd-link-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 13px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #354052;
  text-align: left;
  font: inherit;
  font-weight: 740;
  cursor: pointer;
}

.hd-drawer-link:hover,
.hd-drawer-link.is-active,
.hd-drawer-action:hover,
.hd-drawer-section .hd-link-button:hover {
  background: #edf3ff;
  color: var(--primary);
}

.hd-drawer-link.is-active {
  box-shadow: inset 3px 0 0 var(--primary);
  font-weight: 860;
}

.hd-drawer-link small {
  margin-left: auto;
  color: var(--muted);
}

.hd-drawer-footer-note {
  padding: 10px 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.hd-section-nav {
  background: #15233d;
  color: #fff;
}

.hd-section-nav.vendor-section-nav {
  background: #273e70;
}

.hd-section-nav .container {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.hd-section-nav a {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 11px 13px;
  color: #d9e2f2;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 730;
  border-bottom: 3px solid transparent;
}

.hd-section-nav a:hover,
.hd-section-nav a.is-active {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.hd-section-nav a.is-active {
  border-bottom-color: #fff;
}

.hd-mobile-bottom {
  display: none;
}

.hd-mobile-bottom a,
.hd-mobile-bottom .hd-bottom-button {
  min-width: 0;
  min-height: 57px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 3px;
  color: #536075;
  font-size: 10px;
  font-weight: 760;
  line-height: 1.1;
}

.hd-mobile-bottom .hd-nav-icon {
  display: block;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  overflow: visible;
}

.hd-mobile-bottom a span:last-child,
.hd-mobile-bottom .hd-bottom-button span:last-child {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hd-mobile-bottom a.is-active,
.hd-mobile-bottom .hd-bottom-button.is-active,
.hd-mobile-bottom .hd-bottom-button[aria-expanded="true"] {
  color: var(--primary);
}

.hd-mobile-bottom a.is-active::before,
.hd-mobile-bottom .hd-bottom-button.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 24px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--primary);
}

.hd-mobile-bottom a,
.hd-mobile-bottom .hd-bottom-button {
  position: relative;
}

.hd-cart-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 7px);
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #b42318;
  color: #fff;
  font-size: 9px;
  line-height: 1;
}

.hd-drawer-open {
  overflow: hidden;
}

#businesses,
#place-overview,
#place-info {
  scroll-margin-top: calc(var(--hd-header-height) + 16px);
}

@media (max-width: 900px) {
  .hd-header-inner {
    min-height: 62px;
    gap: 12px;
  }

  .hd-brand {
    flex: 1;
  }

  .hd-brand-copy strong {
    font-size: 15px;
  }

  .hd-desktop-nav {
    display: none;
  }

  .hd-menu-button {
    display: inline-flex;
  }

  .hd-section-nav {
    display: none;
  }

  .hd-mobile-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--hd-nav-z-bottom);
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    align-items: stretch;
    min-height: var(--hd-bottom-nav-height);
    padding: 4px max(5px, env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(5px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,.98);
    box-shadow: 0 -8px 28px rgba(18,31,56,.1);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  body.hd-has-bottom-nav {
    padding-bottom: calc(var(--hd-bottom-nav-height) + env(safe-area-inset-bottom));
  }

  body.hd-has-bottom-nav .site-footer,
  body.hd-has-bottom-nav .tenant-footer {
    margin-bottom: 0;
  }
}

@media (min-width: 901px) {
  .hd-nav-overlay,
  .hd-drawer {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-drawer,
  .hd-nav-overlay {
    transition: none;
  }
}
