/* ------------------------ 
        Start of Header 
---------------------------*/
nav {
  box-shadow: -2px 4px 8px -3px rgba(0, 0, 0, 0.75);
  -webkit-box-shadow: -2px 4px 8px -3px rgba(0, 0, 0, 0.75);
  -moz-box-shadow: -2px 4px 8px -3px rgba(0, 0, 0, 0.75);
  z-index: 1000;
}

/* Navbar button remove outline */
.navbar-toggler {
  border: unset;
}

.navbar-toggler:focus {
  box-shadow: unset;
}

.navbar-light .navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-link:focus {
  color: rgb(255 239 239);
}

@media screen and (min-width: 1650px) {
  .navbar {
    padding: 0;
  }
}

.first-header {
  background-color: #303030;
  color: ghostwhite;
}

.first-header-text {
  font-size: 0.65em;
}

.custom-sidenav {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  z-index: 9999;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

/* When Bootstrap collapse adds "show", slide in */
.custom-sidenav.show {
  transform: translateX(0);
}

/* Third Header */
.third-header {
  background-color: #fff;
  z-index: 10;
  position: relative;
  display: flex;
}

/* ---- Parent Category ---- */
.category-item {
  position: static;
  /* Allow full width dropdown */
}

.parent-category,
.trade-application {
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 20px;
  transition: 0.2s;
  white-space: nowrap;
  font-weight: 500;
}

.parent-category:hover,
.trade-application:hover {
  background: #f2f2f2;
}

/* Full-width dropdown panel */
#megaDropdown {
  position: absolute;
  border-top: 3px solid #d4d4d4;
  left: 0;
  top: 100%;
  width: 100%;
  height: auto;
  /* let content decide height until max-height */
  max-height: 0;
  /* collapsed */
  overflow: hidden;

  background: #fff;
  padding: 0 60px;
  /* padding removed initially */
  z-index: 9999;

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);

  transition:
    opacity 0.7s ease,
    transform 0.8s ease,
    max-height 0.8s ease,
    visibility 0.8s ease,
    padding 1s ease;
}

#megaDropdown.show {
  max-height: 70vh;
  height: 60vh;
  /* expand smoothly */
  padding: 40px 60px;
  /* animate padding */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-dropdown .subcategory-item {
  padding: 10px 5px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: 0.2s ease;
}

.mega-dropdown .subcategory-item:hover {
  background: #f7f7f7;
  border-radius: 8px;
}

.mega-dropdown .subcategory-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.mega-dropdown .subcategory-image-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mega-dropdown .subcategory-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* fills space, responsive */
  border-radius: 8px;
  box-shadow: 7px 6px 7px rgba(0, 0, 0, 0.3);
}

/* Hover to show the mega menu */
.category-item:hover+#megaDropdown,
#megaDropdown:hover {
  display: grid;
}

.parent-category,
.trade-application {
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 20px;
  transition: 0.2s ease;
}

.parent-category:hover,
.trade-application:hover {
  font-weight: bold;
}

/* Arrow styling */
.category-arrow {
  margin-left: 6px;
  transition: transform 0.65s ease;
}

/* Rotate arrow up when active */
.parent-category.active .category-arrow,
.parent-category:hover .category-arrow {
  transform: rotate(180deg);
}


/* Hide category bar and show hamburger on tablet & mobile */
@media (max-width: 991px) {

  /* Bootstrap md breakpoint */
  .third-header {
    display: none !important;
  }

  #navbar-toggler-button {
    display: block !important;
  }
}

/* Hide hamburger on desktop */
@media (min-width: 992px) {
  #navbar-toggler-button {
    display: none !important;
  }
}

.mobile-side-menu {
  position: fixed;
  top: 0;
  left: -80%;
  width: 80%;
  height: 100vh;
  background: #fff;
  padding: 20px;
  z-index: 99999;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-side-menu.show {
  left: 0;
}

.mobile-menu-content .category {
  padding: 10px 0;
  font-size: 16px;
  border-bottom: 1px solid #eee;
}

.mobile-subcategory {
  padding-left: 15px;
  padding-top: 5px;
  color: #666;
}

.mobile-category-item {
  border-bottom: 1px solid #eee;
  padding: 10px 0;
}

.mobile-category-header {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mobile-category-header .arrow {
  transition: transform 0.25s ease;
}

.mobile-category-header .arrow.rotate {
  transform: rotate(180deg);
}

.mobile-subcategory-list {
  display: none;
  padding-left: 15px;
  margin-top: 8px;
}

.mobile-subcategory {
  padding: 6px 0;
  font-size: 0.95rem;
  cursor: pointer;
}

.mobile-subcategory:hover {
  color: #007bff;
}




/* -------------------------------
            End of Header 
----------------------------------*/