/* Shared CarHub public header. Keep this file as the single source of truth. */
.site-header-shell {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

.site-header {
  margin-top: 16px;
  background: var(--bg2, #fff);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  position: relative;
  z-index: 120;
}

.site-header-inner {
  padding: 0 20px;
  height: 100px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.site-header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.site-header-logo img {
  height: 100px;
  width: auto;
  object-fit: contain;
  display: block;
}

.site-header-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.site-header .nav-link {
  padding: 0 20px;
  height: 40px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text2, #6B7280);
  cursor: pointer;
  border: none;
  background: none;
  transition: background .14s, color .14s;
  font-family: var(--font, Inter, system-ui, -apple-system, sans-serif);
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  background: var(--bg3, #F3F4F6);
  color: var(--text, #111827);
  text-decoration: none;
}

.site-header .nav-link.active {
  font-weight: 600;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
}

.site-header .btn-connect {
  background: var(--accent, #DC2626);
  color: #fff;
  border: none;
  padding: 0 20px;
  height: 40px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font, Inter, system-ui, -apple-system, sans-serif);
  transition: background .14s, color .14s, box-shadow .14s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
}

.site-header .btn-connect:hover {
  background: var(--accent2, #B91C1C);
  text-decoration: none;
}

.site-header .btn-connect.active {
  background: rgba(220,38,38,.1);
  color: var(--accent, #DC2626);
}

.site-header .fav-heart {
  font-size: 1.08em;
  line-height: 1;
  transform: translateY(-.02em);
}

.site-header .hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background .14s;
}

.site-header .hamburger:hover {
  background: var(--bg3, #F3F4F6);
}

.site-header .hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text, #111827);
  border-radius: 2px;
  transition: all .22s;
}

.site-header .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header .hamburger.open span:nth-child(2) { opacity: 0; }
.site-header .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-header-mobile-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg2, #fff);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: 12px 16px 16px;
  z-index: 100;
  flex-direction: column;
  gap: 4px;
}

.site-header-mobile-nav.open {
  display: flex;
}

.site-header .site-header-mobile-nav .nav-link {
  width: 100%;
  justify-content: flex-start;
  border-radius: 8px;
  padding: 10px 14px;
  height: auto;
}

@media (max-width: 768px) {
  .site-header-shell {
    max-width: 100vw;
    padding: 0 12px;
    overflow: visible;
  }
  .site-header {
    margin-top: 10px;
  }
  .site-header-inner {
    padding: 0 12px;
    gap: 8px;
    height: 58px;
  }
  .site-header-nav {
    display: none;
  }
  .site-header-actions {
    margin-left: auto;
  }
  .site-header-logo {
    flex: 1 1 auto;
  }
  .site-header-logo img {
    height: 58px;
    max-width: min(190px, 52vw);
  }
  .site-header .btn-connect {
    display: none;
  }
  .site-header .hamburger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .site-header-shell {
    padding: 0 10px;
  }
  .site-header-inner {
    padding: 0 10px;
  }
  .site-header-logo img {
    max-width: min(176px, 56vw);
  }
}
