/* ===== LAYOUT FIX: REMOVE NAVBAR-HERO GAP ===== */

/* Reset body margins */
body {
  margin: 0;
  padding: 0;
}

/* Ensure navbar has no bottom margin */
header, nav, .navbar {
  margin-bottom: 0 !important;
}

/* Remove top margin from first section after navbar */
nav + section,
nav + .hero-section,
.navbar + section,
.navbar + .hero-section,
header + section,
header + .hero-section {
  margin-top: 0 !important;
}

/* Ensure hero section starts immediately */
.hero-section {
  margin-top: 0 !important;
  display: block;
}

/* Remove any spacing from content wrapper */
.content, main, [role="main"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Override any Bootstrap spacing on first elements */
section:first-child,
section:first-of-type,
.hero-section:first-child,
.hero-section:first-of-type {
  margin-top: 0 !important;
}

/* Ensure messages overlay doesn't create space */
.messages-overlay {
  position: fixed !important;
  top: 140px !important; /* Adjust for header + navbar height */
  right: 20px !important;
  z-index: 9999 !important;
  pointer-events: none;
}

.messages-overlay .toast-message {
  pointer-events: auto;
}

/* Remove any container top spacing */
.container:first-child,
.container-fluid:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Force flush layout */
body > section:first-of-type,
body > .hero-section:first-of-type {
  margin-top: 0 !important;
}/* 
===== HEADER AND NAVBAR SEPARATION FIX ===== */
/* Ensure header and navbar don't overlap */
header + nav,
header + .navbar {
  margin-top: 0 !important;
  position: relative !important;
}

/* Prevent header from overlapping navbar */
header.sticky-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 1050 !important;
}

.navbar.sticky-top {
  position: sticky !important;
  top: 80px !important; /* Height of header */
  z-index: 1040 !important;
}

/* Ensure proper stacking order */
header {
  z-index: 1050 !important;
}

.navbar {
  z-index: 1040 !important;
}

.categories-mega-menu {
  z-index: 1030 !important;
}

/* Content spacing after fixed headers */
.container.my-5 {
  margin-top: 2rem !important;
  margin-bottom: 3rem !important;
}