/* =============================================================
   MOBILE MENU — CSS
   Uses the same --mm-* variables defined in mega-menu.css.
   Load this file AFTER mega-menu.css.
============================================================= */

/* ---------- Swap desktop bar <-> hamburger at the breakpoint ---------- */
.mobile-menu-trigger {
  display: none;
}

@media (max-width: 991px) {
  .electres-nav {
    display: none;
    /* mobile uses the drill-down panel instead */
  }

  .mobile-menu-trigger {
    display: inline-flex;
  }
}

/* ---------- Hamburger icon ---------- */
.mobile-menu-trigger {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-menu-trigger__bar {
  width: 22px;
  height: 2px;
  background: var(--mm-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-trigger.is-active .mobile-menu-trigger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-trigger.is-active .mobile-menu-trigger__bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-trigger.is-active .mobile-menu-trigger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Overlay shell ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1000;
  visibility: hidden;
  opacity: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  height: 100vh;
}

.mobile-menu.is-open {
  visibility: visible;
  opacity: 1;
}

/* ---------- Panels (stacked, one slides in at a time) ---------- */
.mobile-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  background: var(--mm-bg);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.2, 0, 0, 1);
}

.mobile-menu__panel[data-view="root"] {
  transform: translateX(100%);
}

.mobile-menu__panel.is-active {
  transform: translateX(0);
  height: 100%;
  padding-bottom: 60px
}

/* ---------- Top bars ---------- */
.mobile-menu__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  flex: 0 0 auto;
  margin-bottom: 24px;
}

.mobile-menu__back {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  color: var(--mm-text);
  padding: 4px 0;
}

.mobile-menu__back:hover {
  background: transparent;
  transform: none;
  color: var(--mm-text);
}

.mobile-menu__close {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 0;
  background: var(--mm-sidebar-bg);
  color: var(--mm-text);
  cursor: pointer;
  padding: 7px;
  transition: all 0.3s ease;
}

.mobile-menu__close:hover {
  background-color: #f0f0f0;


}

/* ---------- Root body: link list + CTA ---------- */
.mobile-menu__body {
  flex: 1 1 auto;
  padding: 0 20px 24px;
}

.mobile-menu__section-label {
  margin: 0 0 6px;
  color: #666;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px;
  display: flex;
  height: 48px;
  padding: 16px 0;
  align-items: center;
  align-self: stretch;
}

.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#main-header .mobile-menu__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 4px;
  color: var(--mm-text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 16px;
  position: relative;
}

.mobile-menu__row--indent {
  padding-left: 14px;
}

.mobile-menu__row--top {
  font-weight: 500;
}

.mobile-menu__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu__divider {
  border: 0;
  border-top: 1px solid var(--mm-border);
  margin: 12px 0;
}

.mobile-menu__cta {
  padding: 16px 20px 40px;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu__cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mm-accent);
  color: #fff;
  border-radius: 999px;
  padding: 14px;
  font-weight: 600;
  gap: 6px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.mobile-menu__cta-btn svg {
  transition: transform 0.3s ease;
}

.mobile-menu__cta-btn:hover {
  background: #c41627;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(226, 30, 49, 0.25);
}

.mobile-menu__cta-btn:hover svg {
  transform: translateX(4px);
}

/* ---------- Category tabs (Low / High Voltage pills) ---------- */
.mobile-menu__tabs {
  display: flex;
  gap: 10px;
  margin: 4px 0 20px;
}

.mobile-menu__tab {
  border: 0;
  border-radius: 999px;
  background: #E6E6E6;
  color: var(--mm-text);
  cursor: pointer;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 20px;
  display: flex;
  padding: 8px 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.mobile-menu__tab.is-active {
  background: #111;
  color: #fff;
}

.mobile-menu__series-panel {
  display: none;
}



/* ---------- Product card (image on top, text below) ---------- */
.mobile-product-card {
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 28px;
}

.mobile-product-card__image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--mm-radius);
  overflow: hidden;
  background: #0d0d0d;
  margin-bottom: 12px;
}

.mobile-product-card__image.lv-image {
  aspect-ratio: 3 / 4;
}

.mobile-product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-product-card__eyebrow {
  display: block;
  color: var(--mm-muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.mobile-product-card__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.mobile-product-card__title {
  color: var(--mm-text);
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%;
}

/* ---------- Solutions cards ---------- */
.mobile-solution-card {
  margin-bottom: 24px;
}

.mobile-solution-card img {
  width: 100%;
  height: clamp(180px, 60vw, 360px);
  object-fit: cover;
  border-radius: var(--mm-radius);
  margin-bottom: 12px;
}

.mobile-solution-card h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #000;
  font-size: 16px;
  font-weight: 500;
  line-height: 140%;
}

.mobile-solution-card p {
  margin: 0 0 8px;
  color: #666;
  font-size: 14px;
  font-weight: 400;
  line-height: 150%;
}

.mobile-solution-card__link {
  color: var(--mm-accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: block;
  position: relative;

}

.mobile-solution-card .learn_more {
  color: #e21e31;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 6px;
}

.mobile-menu__body>.mobile-menu__divider:last-child {
  display: none;
}

@media screen and (max-width: 991px) {
  .mobile-menu__series-panel.is-active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media screen and (max-width: 600px) {
  .mobile-menu__series-panel.is-active {
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
  }
}

@media screen and (max-width: 480px) {
  .mobile-menu__series-panel.is-active {
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
  }

  .mobile-menu__body {
    padding-bottom: 60px;
  }
}