/* ============================================================
   ELECTRACAT — mega-menu.css  (text-only, light theme)
   ============================================================ */

/* ------ Backdrop ------ */
.mega-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  z-index: 1040;
}
.mega-backdrop.visible { display: block; }

/* ------ Mega menu container ------ */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: #fff;
  border-top: 3px solid var(--ec-blue);
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  z-index: 1050;
  display: none;
  max-height: 520px;
  overflow: hidden;
}
body.mega-open .mega-menu { display: flex; }

/* ------ Inner layout ------ */
.mm-inner {
  display: flex;
  width: 100%;
  min-height: 340px;
}

/* ------ Left: Category tabs ------ */
.mm-cats {
  width: 230px;
  flex-shrink: 0;
  background: var(--ec-gray-50);
  border-right: 1px solid var(--ec-gray-200);
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
}

.mm-cat-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ec-gray-700);
  transition: background .15s, color .15s;
  position: relative;
  width: 100%;
}
.mm-cat-tab:hover {
  background: rgba(26,111,168,.06);
  color: var(--ec-blue);
}
.mm-cat-tab.active {
  background: #fff;
  color: var(--ec-blue);
  font-weight: 600;
  border-left: 3px solid var(--ec-blue);
}

.mm-cat-icon { font-size: 15px; flex-shrink: 0; opacity: .75; }
.mm-cat-tab.active .mm-cat-icon { opacity: 1; }
.mm-cat-label { flex: 1; }
.mm-cat-count {
  font-size: 11px;
  font-family: var(--font-condensed);
  font-weight: 700;
  background: var(--ec-gray-200);
  color: var(--ec-gray-700);
  padding: 1px 6px;
  border-radius: 10px;
}
.mm-cat-tab.active .mm-cat-count {
  background: var(--ec-blue);
  color: #fff;
}
.mm-cat-arrow {
  font-size: 10px;
  opacity: .4;
  flex-shrink: 0;
}

.mm-all-link {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ec-blue);
  border-top: 1px solid var(--ec-gray-200);
  text-decoration: none;
  transition: background .15s;
}
.mm-all-link:hover { background: rgba(26,111,168,.06); }

/* ------ Right: Content panel ------ */
.mm-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.mm-panel { display: none; }
.mm-panel.active { display: flex; flex-direction: column; }

.mm-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 12px;
  font-family: var(--font-condensed);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4px;
  color: var(--ec-navy);
  text-transform: uppercase;
  border-bottom: 1px solid var(--ec-gray-200);
  background: var(--ec-gray-50);
}
.mm-panel-header i { color: var(--ec-blue); font-size: 16px; }

.mm-view-all-cat {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--ec-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-body);
}
.mm-view-all-cat:hover { text-decoration: underline; }

/* ------ Subcategory columns ------ */
.mm-subcols {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: 16px 24px 20px;
}

.mm-subcol {
  min-width: 200px;
  flex: 1;
  padding: 0 20px 16px 0;
  border-right: 1px solid var(--ec-gray-200);
  margin-right: 20px;
}
.mm-subcol:last-child {
  border-right: none;
  margin-right: 0;
  padding-right: 0;
}

.mm-sub-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.mm-sub-title {
  font-family: var(--font-condensed);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--ec-navy);
  text-decoration: none;
}
.mm-sub-title:hover { color: var(--ec-blue); }

.mm-sub-see-all {
  font-size: 11px;
  color: var(--ec-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 3px;
  font-weight: 600;
  white-space: nowrap;
}
.mm-sub-see-all:hover { text-decoration: underline; }

/* ------ Product list ------ */
.mm-prod-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-prod-item { margin: 0; }

.mm-prod-link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 4px;
  text-decoration: none;
  transition: background .12s;
  line-height: 1.4;
}
.mm-prod-link:hover {
  background: rgba(26,111,168,.06);
}

.mm-prod-ref {
  font-size: 10.5px;
  font-family: var(--font-condensed);
  font-weight: 700;
  color: var(--ec-gray-500);
  white-space: nowrap;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.mm-prod-name {
  font-size: 13px;
  color: var(--ec-text);
  transition: color .12s;
}
.mm-prod-link:hover .mm-prod-name { color: var(--ec-blue); }

.mm-prod-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-condensed);
  background: var(--ec-accent);
  color: var(--ec-navy);
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: .3px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ------ Responsive: hide on small screens ------ */
@media (max-width: 991px) {
  .mega-menu { display: none !important; }
}
