/* =============================================
   MEGA MENU STYLES
   ============================================= */

/* GLOBAL RESET */
.mega-menu-box,
.mega-menu-box * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* MEGA MENU BOX */
.mega-menu-box {
  width: 750px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e3e6e8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  display: none;
}

.menu-item-has-mega-menu {
  position: relative;
}

.menu-item-has-mega-menu:hover .mega-menu-box {
  display: block;
}

.mega-menu {
  display: flex;
  height: 320px;
}

/* LEFT COLUMN */
.parent-column {
  width: 250px;
  background: #f1f3f5;
  border-right: 1px solid #e8eaed;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}

.parent-title {
  padding: 0 24px 16px;
  margin-bottom: 8px;
}

.parent-title h3 {
  font-size: 14px;
  font-weight: 600;
  color: #95a3b3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.parent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #2c3345;
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.parent-item:hover {
  background: #f0f2f5;
  color: #0a1551;
}

.parent-item.active {
  background: #fff;
  color: #0a1551;
  border-left-color: #ff6100;
}

/* RIGHT COLUMN */
.child-column {
  flex: 1;
  padding: 24px;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.right-heading {
  font-size: 14px;
  font-weight: 600;
  color: #95a3b3;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.child-groups-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
}

.child-groups-container::-webkit-scrollbar {
  width: 6px;
}

.child-groups-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.child-groups-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.child-group {
  display: none;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
  align-items: flex-start;
  max-width: 100%;
}

.child-group.active {
  display: flex;
}

.child-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  color: #2c3345;
  flex: 0 0 calc(50% - 6px);
  min-width: 0;
}

.child-item:hover {
  background: #f5f7fa;
  color: #0a1551;
}

.child-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 4px;
  background: #fff;
}

.child-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* =============================================
   MOBILE STYLES
   ============================================= */
@media (max-width: 768px) {
  .mega-menu-box,
  .mega-menu-box * {
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .mega-menu-box {
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    display: block !important;
  }

  .mega-menu {
    flex-direction: column !important;
    height: auto !important;
    background: #fff !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .parent-column {
    width: 100% !important;
    background: #fff !important;
    border: none !important;
    padding: 0 !important;
  }

  .parent-title {
    display: none !important;
  }

  .child-column,
  .view-all,
  .right-heading {
    display: none !important;
  }

  .parent-item {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 16px 20px !important;
    margin: 0 !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    background: #fff !important;
  }

  .parent-item::after {
    content: '' !important;
    width: 10px !important;
    height: 10px !important;
    border-right: 2px solid #6b7280 !important;
    border-bottom: 2px solid #6b7280 !important;
    transform: rotate(45deg) !important;
    transition: transform 0.3s ease !important;
  }

  .parent-item.active::after {
    transform: rotate(-135deg) !important;
  }

  .mobile-children {
    display: none;
    flex-direction: column !important;
    background: #fff !important;
    padding: 0 !important;
    width: 100% !important;
  }

  .mobile-children.active {
    display: flex !important;
    border-bottom: 1px solid #e5e7eb !important;
  }

  .mobile-children a {
    display: block !important;
    width: 100% !important;
    padding: 14px 20px 14px 40px !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    color: #1f2937 !important;
    text-decoration: none !important;
    background: #fff !important;
    border-bottom: 1px solid #f3f4f6 !important;
  }

  .mobile-children a:last-child {
    border-bottom: none !important;
  }

  .mobile-children a:hover {
    color: #ff6100 !important;
    background: #fafafa !important;
  }
}