/* ------------------------ 
        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 */
.first-header {
  background-color: #303030;
  color: ghostwhite;
}

.first-header-text {
  font-size: 0.65em;
}

/* End of First Header */

/* Second Header */
.logo {
  width: 220px;
  /* height: 140px; */
}

@media (max-width: 576px) {
  .logo {
    width: 10rem;
    /* height: 7rem; */
  }
}

/* End of Second Header */


/* Third Header */
.third-header {
  background-color: #fff;
  z-index: 10;
  position: relative;
  display: flex;
}

/* ---- Parent Category ---- */
.category-nav .category-item {
  position: static;
  padding: 10px 4px;
  /* 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; */
}

.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;
  }
}

/* Desktop Navbar Dropdown */
#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;
  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: 50vh;
  height: auto;
  /* expand smoothly */
  padding: 40px 60px;
  /* animate padding */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 18px 52px;
  /* bottom padding leaves room for View all */
  position: relative;
}

/* header text */
.mega-header {
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.mega-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}


/* grid of subcategories */
.mega-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

/* “card/chip” links */
.subcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  text-decoration: none;
  color: #111;
  background: #fff;
  transition: transform 0.2s ease;
  font-size: 14px;
  line-height: 1.1;
}

.subcard::after {
  content: "→";
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 14px;
}

.subcard:hover {
  color: #000;
  transform: scale(1.1);
}

.subcard:hover::after {
  opacity: 1;
  transform: translateX(0);
}

/* View all pinned bottom-right */
.view-all {
  position: absolute;
  right: 18px;
  bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: #111;
  opacity: 0.9;
  padding: 8px 10px;
  border-radius: 12px;
  transition: transform 160ms ease, opacity 160ms ease;
}

.view-all:hover {
  color: #000;
  transform: scale(1.1);
  opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
  .mega-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mega-subtitle {
    display: none;
  }
}

@media (max-width: 576px) {
  .mega-wrap {
    padding: 14px 14px 52px;
  }

  .mega-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subcard {
    padding: 11px 11px;
    border-radius: 12px;
  }
}

/* Mobile Side Nav */
.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 
----------------------------------*/