/* =============================================================
   MEGA MENU — CSS
   Adjust the variables below to match your brand.
============================================================= */
:root {
  --mm-accent: #e21e31;
  --mm-text: #000;
  --mm-muted: #666;
  --mm-border: rgba(0, 0, 0, 0.07);
  --mm-bg: #ffffff;
  --mm-sidebar-bg: #f5f5f5;
  --mm-radius: 8px;
}

.hgermenu-icon::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('/wp-content/themes/electres-child/assets/images/hgericon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-right: 4px;
}

/* ---------- Top bar nav ── */
.electres-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.electres-nav__item {
  position: static;
  display: flex;
  /* so the mega panel can span full page width */
}

.electres-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 8px 14px;
  color: #1a1a1a;
  text-decoration: none;
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  border-radius: 8px;
  transition: color 0.22s ease, background 0.18s ease;
}



.electres-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, opacity 0.18s ease;
  margin-left: 2px;
}


/* ---------- Dropdown shell — premium animated ── */
@keyframes megaReveal {
  from {
    opacity: 0;
    transform: translateY(-6px) scaleY(0.97);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: blur(0px);
  }
}

.electres-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #ffffff;
  border-radius: 0 0 20px 20px;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.06),
    0 2px 6px rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  clip-path: inset(0px -100px -100px -100px);
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
  z-index: 100;
  overflow: hidden;
  white-space: normal;
  /* Fix inheritance from .header-menu */
}

.electres-mega ul {
  display: block !important;
  /* Fix inheritance from #main-header ul */
}

/* .electres-nav__item.has-mega:hover .electres-mega {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
} */

.is-open .electres-mega {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.2s ease;
}

.electres-mega__inner {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  /* Individual layouts control their own internal padding */
}

/* Products layout gets no extra inner padding — sidebar & panels handle it */
.electres-mega__inner:has(.mega-products) {
  padding: 0;
}

/* =============================================================
   LAYOUT 1 — PRODUCTS
   Matches: sidebar left | product column panels right
============================================================= */
.mega-products {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 420px;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.mega-products__sidebar {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 32px 32px 32px 32px;
  display: flex;
  flex-direction: column;
}

.mega-products__sidebar ul {
  list-style: none;
  margin: 0 0 auto;
  padding: 0;
  flex: 1;
}

.mega-sidebar-item {
  margin-bottom: 6px;
}

.mega-sidebar-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 6px;
  color: #111;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
  gap: 12px;
}

.mega-sidebar-item a span {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  transition: transform 0.2s ease;
}

.mega-sidebar-item a:hover {
  background: #f5f5f5;
  color: #111;
}

.mega-sidebar-item a:hover span {
  transform: translateX(4px);
}

.mega-sidebar-item.is-active a {
  background: #f4f4f4;
  color: #111;
  font-weight: 600;
}

/* View All button */
.mega-products__view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #e21e31;
  color: #e21e31;
  background: #ffffff;
  border-radius: 999px;
  padding: 10px 24px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  margin-top: 32px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  align-self: flex-start;
}

.mega-products__view-all:hover {
  background: rgba(226, 30, 49, 0.05);
  transform: translateY(-1px);
}

/* ── Product panels ───────────────────────────────────────── */
.mega-products__panels {
  padding: 32px clamp(24px, 1.75vw, 40px);
  overflow: hidden;
}

.mega-products__panel {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0 clamp(24px, 1.75vw, 40px);
  animation: panelFadeIn 0.25s ease both;
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mega-products__panel.is-active {
  display: grid;
}

/* ── Column (series group) ────────────────────────────────── */
.mega-products__column {
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding-right: clamp(24px, 1.75vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  height: auto;
}

.mega-products__column:last-child {
  border-right: none;
  padding-right: 0;
}



.mega-products__column-title {
  margin: 0 0 40px;
  color: #666;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
}

/* ── Product card ─────────────────────────────────────────── */
.mega-product-card {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: center;
  transition: opacity 0.2s ease;
  height: 100%;
}

.mega-product-card:last-child {
  margin-bottom: 0;
}

.mega-product-card:hover {
  opacity: 0.9;
}

.mega-product-card:not(:only-of-type) .mega-product-card__image {
  aspect-ratio: 7 / 4;
}

.mega-product-card:only-of-type .mega-product-card__image {
  width: 100%;
  max-height: clamp(325px, 26vw, 475px);
  aspect-ratio: 4 / 5;
  height: 100%;
}

.mega-product-card__image {
  position: relative;
  height: 100%;
  flex: 0 0 45%;
  max-width: 45%;
  border-radius: 8px;
  overflow: hidden;
  display: block;
  transition: transform 0.3s ease;
}

.mega-product-card:hover .mega-product-card__image {
  transform: scale(1.03);
}

.mega-product-card__image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

/* New badge — 3D glossy style */
.badge-new {
  position: absolute;
  top: 8px;
  right: 8px;
  background: linear-gradient(90deg, #ba161f 0%, #e16b4f 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  line-height: 1.2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.15),
    0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.mega-product-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mega-product-card__eyebrow {
  margin: 0 0 6px;
  color: #666;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
}

.mega-product-card__title {
  margin: 0 0 10px;
  color: #111;
  font-size: 16px;
  font-weight: 500;
  line-height: 140%;

}

.mega-product-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e21e31 !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: gap 0.2s ease;
}

.mega-product-card__btn svg {
  transition: transform 0.2s ease;
}

.mega-product-card__btn:hover {
  gap: 8px;
}

/* =============================================================
   LAYOUT 2 — SOLUTIONS
============================================================= */
.mega-solutions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 20px;
}

.event_status {
  display: inline-flex;
  border-radius: 6px;
  background: #17D378;
  border: 1px solid rgba(23, 211, 120, 0.20);
  color: #ffffff;
  padding: 2px 10px;
  letter-spacing: 0.01em;
  position: absolute;
  right: 12px;
  top: 12px;
  color: var(--Neutral-Black, #141211);
  font-family: "Google Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

span.event_status.live {
  color: #ffffff;
}

.event_status.upcoming {
  border-radius: 6px;
  border: 1px solid rgb(255, 255, 255);
  background: var(--White, #FFF);
}

/* Show 2 columns when there are exactly 2 cards, otherwise 3 */
@media (min-width: 992px) {

  .mega-solutions:has(> :nth-child(2):last-child),
  .mega-solutions:has(> .mega-solution-card:nth-child(2):last-child) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.mega-solution-card img {
  width: 100%;
  max-height: clamp(180px, 30%, 300px);
  object-fit: cover;
  border-radius: var(--mm-radius);
  margin-bottom: 16px;
  aspect-ratio: 6 / 3;
}

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

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

.mega-solution-card a {
  text-decoration: none;
  position: relative;
  display: block;
}

.mega-solution-card .learn_more {
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.1s ease;
  color: var(--mm-accent);
  font-weight: 500;
  text-decoration: none;
  font-size: 12px;
}

.mega-solution-card .learn_more:hover {
  gap: 8px;
  color: var(--mm-accent);
}

.mega-solution-card .learn_more svg {
  transition: all 0.2s ease;
  fill: var(--mm-text);
}

.mega-solution-card .learn_more:hover svg {
  transform: translateX(4px);
  fill: var(--mm-accent);
}

/* =============================================================
   LAYOUT 3 — DISCOVER MORE
============================================================= */
.mega-discover {
  display: grid;
  grid-template-columns: clamp(340px, 30%, 510px) 1fr;
  gap: 32px;
  padding: 32px 40px;
}

.mega-discover__columns {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--Warm-Grey, #CFCAC2);
  padding-right: 40px;
}

.mega-discover__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mega-discover__col-title {
  margin: 0 0 32px;
  color: #666;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 16px;
}

.mega-discover__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mega-discover__col li {
  margin-bottom: 12px;
}

.mega-discover__col a {
  color: var(--mm-text);
  text-decoration: none;
  font-weight: 500;
}

.mega-discover__col a:hover {
  color: var(--mm-accent);
}

.mega-discover__socials {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.mega-discover__socials .mega-discover__col-title {
  margin: 0;
}

.mega-discover__social-icons {
  display: flex;
  gap: 24px;
}

.mega-discover__social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}


.mega-discover__social-icons a svg {
  width: 20px;
  height: 20px;
  fill: #1A1A1A;
  transition: all 0.2s ease;
}

.mega-discover__social-icons a:hover svg path {
  fill: #e21e31;
  transition: all 0.2s ease;
}

.mega-discover__promo {
  position: relative;
  border-radius: var(--mm-radius);
  overflow: hidden;
  min-height: 450px;
  width: 100%;
  max-width: 650px;
  background: #0d0d0d;
  justify-self: end;
}

.mega-discover__promo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.75;
}

.mega-discover__promo-overlay {
  position: relative;
  z-index: 1;
  padding: 24px;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mega-discover__promo-overlay h3 {
  margin: 0;
  font-size: 24px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%;
  max-width: 220px;
}

.mega-discover__promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #e21e31;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid #e21e31;
  padding: 8px 20px;
  border-radius: 100px;
  align-self: flex-end;
  transition: all 0.2s ease;
}

.mega-discover__promo-btn:hover {
  background: #e21e31;
  color: #fff;
}

.mega-discover__promo-btn:hover svg path {
  stroke: #fff;
}

/* =============================================================
   RESPONSIVE — collapse to accordion below 900px
   (pair with a hamburger + mobile nav toggle in your header)
============================================================= */
@media (max-width: 900px) {
  .electres-mega {
    position: static;
    box-shadow: none;
    transform: none !important;
    filter: none !important;
    display: none;
    border-radius: 0;
    border: none;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .electres-nav__item.has-mega:hover .electres-mega {
    display: block;
  }

  .mega-products {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .mega-products__sidebar {
    border-right: none;
    border-right: 1px solid var(--Warm-Grey, #CFCAC2);
    padding: 16px;
  }

  .mega-products__panels {
    padding: 16px;
  }

  .mega-products__column {
    border-right: none;
    padding-right: 0;
  }

  .mega-product-card__image {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
  }

  .mega-discover {
    grid-template-columns: 1fr;
  }

  .mega-products__panel {
    grid-template-columns: 1fr;
  }

  .mega-solutions {
    grid-template-columns: 1fr;
  }
}

/* =============================================================
   HEADER — BASE STYLES  (premium refined)
============================================================= */

/* ── Base fixed header ── */
#main-header.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  padding: 0;
  background: transparent;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Mega menu overlay */
#main-header.header::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: -1;
  pointer-events: none;
  height: 100dvh;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

#main-header.header:has(.has-mega.is-open)::before {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}



/* Logo SVG fill on all pages */
#main-header .logo svg.site-logo path {
  fill: #e21e31;
  transition: fill 0.3s ease;
}

/* ── Keyframe: pill materialises with a gentle scale + fade from above ── */
@keyframes pillAppear {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    box-shadow: none;
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Floating Header Pill ── */
#main-header .electres-header-container {
  max-width: 1900px;
  width: 96%;
  margin: 10px auto;
  padding: 8px 8px 8px 16px;
  position: relative;
  transition: border-radius 0.2s ease;
  z-index: 50;
  border-radius: 12px;
  background: #FFF;
  box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.06);
}

/* Seamless merge when mega menu opens */
#main-header .electres-header-container:has(.has-mega.is-open) {
  border-radius: 20px 20px 0 0;
}




#main-header.header a.scrolled-logo-link,
.is-collapsed .header-wrap .header-cta-block {
  display: none;
}


.header-cta-block,
.header-menu {
  transition:
    opacity 0.4s ease,
    margin 0.4s ease,
    width 0.4s ease;
  opacity: 1;
  width: auto;
  white-space: nowrap;
}

/* After-icon arrow stroke */
#main-header .after-icon svg path {
  stroke: #111111;
  transition: stroke 0.3s ease;
}

/* Header wrap — refined height */
#main-header .header-wrap {
  display: flex;
  transition: min-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  align-items: center;
  gap: 16px;
}


#main-header .v-center {
  align-items: center;
  justify-content: space-between;
}

#main-header ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(16px, 1.2vw, 24px);
  justify-content: center;
}

#main-header a {
  text-decoration: none;
}

#main-header .item-left {
  flex: 0 0 auto;
}

#main-header .item-center {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  margin-left: 32px;
}

#main-header .item-right {
  flex: 1 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

/* Logo */
#main-header .logo {
  opacity: 1;
  transition: opacity 0.3s, transform 0.3s;
  display: flex;
}

#main-header .logo a {
  display: flex;
  align-items: center;
}

.header-logo .logo img,
.header-logo .logo svg {
  height: 36px;
  width: auto;
  max-width: 130px;
}

/* Alternate logo: slides in from above when scrolled */
#main-header .onscroll-logo {
  position: absolute;
  opacity: 0;
  transform: translateY(-8px);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}


/* ── CTA Button — premium pill style ── */
.header-cta {
  background: #e21e31;
  color: #fff;
  padding: 8px 20px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  /* box-shadow: 0 2px 12px rgba(226, 30, 49, 0.25), 0 1px 3px rgba(226, 30, 49, 0.15); */
  transition:
    background 0.22s ease,
    box-shadow 0.22s ease,
    transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
    color 0.22s ease;
  white-space: nowrap;
}

.header-cta:hover {
  background: #c41627;
  color: #fff;
  /* box-shadow: 0 4px 20px rgba(226, 30, 49, 0.35), 0 2px 6px rgba(226, 30, 49, 0.2); */

}

.header-cta:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(226, 30, 49, 0.2);
}

/* Arrow icon inside CTA */
.header-cta .icon-wrapper {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.header-cta:hover .icon-wrapper {
  transform: translateX(2px);
}

.header-cta-block .partner-be-btn--outline-pill:hover {
  transform: translateY(0);
}

/* ── Nav items ── */
#main-header .menu>ul>li {
  display: inline-flex;
  align-items: center;
}

#main-header .menu-item {
  padding: 0;
}

/* Nav link colour */
#main-header .menu>ul>li>a {
  font-size: 14.5px;
  font-weight: 500;
  color: #1a1a1a;
  letter-spacing: 0.01em;
  text-transform: none;
  transition:
    color 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: 8px;
}

#main-header .menu>ul>li>a:hover {
  color: #e21e31;
  background: rgba(226, 30, 49, 0.05);
}

/* Active Menu Item Color */
.menu-main .current-menu-item>a,
.menu-main .current_page_item>a,
.menu-main .current-menu-ancestor>a,
.menu-main .current_page_ancestor>a {
  color: #e21e31 !important;
  /* background: rgba(226, 30, 49, 0.05); */
}

/* Caret / dropdown arrow */
.after-icon {
  display: flex;
  align-items: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.after-icon svg {
  width: 18px;
  transform-origin: center;
}

/* Also style the electres-nav caret (from mega-menu-render.php) */
.electres-nav__link {
  letter-spacing: 0.01em;
  padding: 8px 2px;
  border-radius: 8px;
  transition: color 0.25s ease, background 0.2s ease;
  color: #000;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px;
}

.electres-nav__link:hover,
.electres-nav__item.is-open .electres-nav__link {
  color: #e21e31;
  /* background: rgba(226, 30, 49, 0.05); */
}



.electres-nav__item.is-open .electres-caret {
  transform: rotate(180deg);
  opacity: 1;
}

.electres-nav__item.is-open .electres-caret svg path {
  stroke: #e21e31;
}

.partner-be-btn-header {
  color: #e21e31;
  background-color: #fff;
  padding: 8px 16px 8px 20px;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e21e31;
  border-radius: 48px;
  outline: none !important;
  box-shadow: none;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.partner-be-btn-header:hover {
  color: #e21e31;
  background-color: #fff3f5;
  border-color: #e21e31;
  transform: translateY(0);
}

.partner-be-btn-header:focus,
.partner-be-btn-header:focus-visible,
.partner-be-btn-header:active {
  outline: none !important;
  box-shadow: none !important;
  color: #e21e31;
  border-color: #e21e31;
}

.partner-be-btn-header .icon-wrapper,
.partner-be-btn-header svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.partner-be-btn-header:hover .icon-wrapper {
  transform: translateX(2px);
}

.partner-be-btn-header:hover>svg {
  transform: translateX(2px);
}


/* =============================================================
   MEGA MENU — ITEM STYLES
============================================================= */

.mega-content {
  white-space: normal;
  padding: 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mega-menu-heading {
  color: #000;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-bottom: 8px;
  transition: color 0.3s ease;
}

.mega-desc {
  color: #6d6d6d;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
}

.mega-link-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.mega-menu-icon svg {
  transform: translateY(1px);
}

a.mega-menu-links {
  color: #000;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
  text-underline-position: from-font;
  align-items: center;
  gap: 4px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  height: 100%;
  outline: none !important;
}

a.mega-menu-links:focus,
a.mega-menu-links:active,
.mega-item:focus,
.mega-item:active,
.mega-menu-dropdown *:focus,
.mega-menu-dropdown *:active {
  outline: none !important;
}

.mega-menu-icon {
  display: flex;
}

.mega-item {
  background: rgb(206 206 206 / 30%);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mega-img {
  display: flex;
  width: 100%;
}

.mega-img img {
  width: 100%;
  transition: transform 0.5s ease;
}

@media (min-width: 992px) {
  .mega-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  }

  .mega-item:hover .mega-img img {
    transform: scale(1.05);
  }

  .mega-item:hover .mega-menu-heading {
    color: #ea4636;
  }
}

#main-header .menu>ul>li .sub-menu {
  padding: 20px 0;
  border-top: none;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
  position: absolute;
  background: rgb(255, 255, 255);
  left: -1px;
  right: -1px;
  top: 110%;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s;
}

#main-header .sub-menu.mega-menu-column-4 {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

#main-header .mega-menu-column-4>.list-item {
  flex: 0 0 25%;
  padding: 0 15px;
}


#main-header .mobile-menu-head,
#main-header .mobile-menu-trigger {
  display: none;
}

#main-header .mobile-menu-trigger svg path {
  stroke: #000;
}

.home #main-header .mobile-menu-trigger svg path,
body:has(.banner-dark) #main-header .mobile-menu-trigger svg path {
  stroke: #ffffff;
}

/* Menu overlay backdrop */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.675);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 998;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
  height: 100dvh;
}

/* Hide desktop header block when mobile menu is open to prevent overlay bleeding */
#main-header.mobile-menu-open>.electres-header-container {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.hgermenu .electres-nav__link::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('/wp-content/themes/electres-child/assets/images/hgericon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Mobile Menu Icon (assuming HGER is the last item) */
/* a.mobile-menu__row.mobile-menu__row--top:last-child::after,
a.mobile-menu__row.mobile-menu__row--top.current-menu-item.active::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('/wp-content/themes/electres-child/assets/images/hgericon.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  margin-left: 8px;
  vertical-align: text-bottom;
  position: absolute;
  left: 110px;
} */

/* =============================================================
   HEADER — RESPONSIVE: min-width 991px (home / banner-dark nav colours)
============================================================= */
@media (min-width: 991px) and (max-width: 1180px) {
  .partner-be-btn-header {
    display: none;
  }
}


@media screen and (min-width: 991px) {

  .home #main-header .menu>ul>li>a,
  body:has(.banner-dark) #main-header .menu>ul>li>a {
    color: #fff;
  }

  .home #main-header .after-icon svg path,
  body:has(.banner-dark) #main-header .after-icon svg path {
    stroke: #ffffff;
  }

  .home #main-header .mega-open .menu>ul>li>a,
  body:has(.banner-dark) #main-header .mega-open .menu>ul>li>a {
    color: #000;
  }

  .home #main-header .mega-open .after-icon svg path,
  body:has(.banner-dark) #main-header .mega-open .after-icon svg path {
    stroke: #000000;
  }
}


@media screen and (min-width: 992px) and (max-width: 1199px) {
  .mega-products__panels {
    padding: 24px;
  }

  .mega-products__panel {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 20px;
  }

  .mega-products__column {
    padding-right: 20px;
  }

  .mega-product-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .mega-product-card .mega-product-card__image,
  .mega-product-card:only-of-type .mega-product-card__image {
    flex: 0 0 auto;
    max-width: 100%;
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
  }

  .mega-product-card:only-of-type .mega-product-card__image {
    width: 100%;
    max-height: 375px;
  }

  .mega-product-card:last-child {
    margin-bottom: 0;
    max-width: 350px;
  }

  .mega-products__sidebar {
    padding: 24px;
  }
}

/* =============================================================
   HEADER — RESPONSIVE: min-width 992px (desktop layout & glass pill)
============================================================= */


@media (min-width: 992px) {

  .header-logo {
    flex: 0 0 auto;
    min-width: 140px;
  }

  .header-cta-block {
    flex: 0 0 auto;
    min-width: 160px;
    justify-content: flex-end;
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .header-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }

  .header-menu.desktop-hide-nav {
    display: none;
  }

  li.hide_mega_menu {
    display: none !important;
  }

  #main-header .sub-menu .electres-header-container {
    max-width: 1200px;
  }

  #main-header .menu-item:hover .after-icon {
    transform: rotate(180deg);
  }



  /* Mega-open: pill merges seamlessly with dropdown */
  #main-header>.electres-header-container.mega-open {
    border-radius: 16px 16px 0 0;
    border-bottom: none;
  }

  .main-navigation {
    position: static;
  }

  .inside-header {
    overflow: visible !important;
  }

  .menu-item {
    position: static;
  }

  #main-header .menu>ul>li.menu-item.mega-active:hover .sub-menu {
    visibility: visible;
    opacity: 1;
  }

  .mega-menu-dropdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  #main-header .mb-hd-cta {
    display: none !important;
  }

  /* Electres nav list spacing on desktop */
  .electres-nav__list {
    gap: 2px;
  }
}

/* =============================================================
   HEADER — RESPONSIVE: max-width 991px (mobile menu slide-in)
============================================================= */
@media (max-width: 991px) {
  .hgermenu-icon::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url(/wp-content/themes/electres-child/assets/images/hgericon.svg);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    left: 0;
    top: 48%;
    position: absolute;
    transform: translateY(-50%);
  }

  .hgermenu-icon {
    padding-left: 24px !important;
  }

  .header-cta,
  .header-menu.mobile-hide-nav {
    display: none;
  }

  .mega-menu-dropdown {
    display: flex;
    flex-direction: column;
    row-gap: 20px;
    padding-bottom: 40px;
  }

  #main-header .menu .header-cta-mb.menu-item a {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 8px 24px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    height: 48px;
    width: 100%;
    justify-content: center;
  }

  #main-header .menu>ul>li.header-cta-mb {
    padding: 40px 12px;
    border-bottom: none;
  }

  #main-header .menu>ul>li.header-cta-mb>a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  .mobile-menu-icon svg {
    border-radius: 8px;
    background: #E6E6E6;
    border: none;
    box-shadow: none;
    display: flex;
    width: 38px;
    height: 38px;
    padding: 7px;
    justify-content: center;
    align-items: center;
  }


  #main-header ul {
    flex-direction: column;
    gap: 0;
  }

  .header .menu>ul>li>a .after-icon svg {
    width: 24px;
    height: 24px;
  }

  .mobile-menu-close {
    height: 50px;
    width: 50px;
    cursor: pointer;
    line-height: 50px;
    text-align: center;
    color: #000;
    font-size: 25px;
  }




  .header-logo .logo .site-logo {
    max-width: 150px;
  }


  /* Temp CSS For Header Sticky Product Page Nav */
  .single-product .product-nav-section {
    width: 100%;
    position: sticky;
    margin-inline: auto;
  }





  .mobile-menu-icon {
    display: flex;
  }

  .header-cta-block {
    position: absolute;
    left: 20px;
  }


  #main-header .item-left,
  #main-header .item-right {
    flex: auto;
  }

  #main-header .v-center {
    justify-content: center;
  }

  #main-header .mobile-menu-trigger {
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
  }

  #main-header .menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 550px;
    height: 100%;
    background: #fff;
    transform: translateX(-100%);
    transition: 0.4s;
    z-index: 1099;
    overflow: hidden;
  }

  #main-header .menu.active {
    transform: translateX(0);
    height: 100dvh;
  }

  #main-header .menu>ul>li {
    display: block;
    margin: 0;
    border-bottom: 1px solid var(--Warm-Grey, #cfcac280);
    padding: 12px 0;
  }

  #main-header .menu>ul>li>a {
    display: block;
    height: 50px;
    line-height: 50px;
    padding: 0 50px 0 15px;
    color: #000;
  }

  #main-header .menu .mobile-menu-head {
    display: flex !important;
    height: 60px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 501;
    opacity: 1 !important;
    visibility: visible !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
  }

  #main-header .menu .mobile-menu-head .go-back {
    visibility: hidden;
    opacity: 0;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    font-size: 24px;
  }

  #main-header .menu .mobile-menu-head.active .go-back {
    visibility: visible;
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 500;
    color: #1A1A1A;
    text-decoration: none;
  }

  #main-header .menu .menu-main {
    height: 100%;
    overflow-y: auto;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
  }

  .current-menu-title {
    color: #000;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

  #main-header.header .menu>ul>li .sub-menu,
  #main-header.header .menu>ul>li .sub-menu.mega-menu {
    visibility: visible;
    opacity: 1;
    position: absolute;
    box-shadow: none;
    margin: 0;
    padding: 65px 0 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    min-width: auto;
    display: none;
    transform: translateX(0);
    overflow-y: auto;
  }

  #main-header.header .menu>ul>li .sub-menu.active {
    display: block;
    z-index: 6;
  }

  #main-header.header .menu>ul>li .sub-menu.active .electres-header-container {
    background: #f5f5f5;
  }

  .current-menu-title a {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .current-menu-title a.site-logo-link .site-logo path {
    fill: red;
  }

  .current-menu-title a.site-logo-link .site-logo {
    width: 150px;
  }



  .header .menu>ul>li>a {
    font-size: 15px;
    font-weight: 500;
    color: #000;
    position: relative;
    text-transform: capitalize;
    transition: color 0.3s;
  }

  .header .menu>ul>li>a .after-icon {
    position: absolute;
    height: 50px;
    width: 50px;
    top: 0;
    right: 0;
    text-align: center;
    line-height: 50px;
    transform: rotate(-90deg);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header .menu>ul>li>a .after-icon svg path {
    stroke: #000000;
  }

  .header .menu>ul>li .sub-menu.active {
    display: block;
  }

  @keyframes slideLeft {
    0% {
      opacity: 0;
      transform: translateX(40px);
    }

    100% {
      opacity: 1;
      transform: translateX(0);
    }
  }

  @keyframes slideRight {
    0% {
      opacity: 1;
      transform: translateX(0);
    }

    100% {
      opacity: 0;
      transform: translateX(40px);
    }
  }

  .header .menu .menu-main {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }
}

/* =============================================================
   HEADER — RESPONSIVE: max-width 600px
============================================================= */
@media (max-width: 600px) {
  .header-logo .logo .site-logo {
    max-width: 130px;
  }
}

/* =============================================================
   MOBILE MENU NEW DESIGN (Matches Screenshot)
============================================================= */
@media (max-width: 991px) {

  /* --- 1. Pill shape Header --- */
  #main-header.header {
    background: transparent !important;
    border: none;
    box-shadow: none;
  }



  /* Make logo red always on mobile */
  #main-header .logo svg.site-logo path {
    fill: #e21e31 !important;
  }



  /* Right side Mobile Menu Trigger */
  .header-cta-block {
    position: static !important;
    margin-left: auto;
    display: none !important;
  }

  #main-header .header-wrap {
    display: flex;
    transition: min-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-menu-icon {
    background: transparent;
    padding: 0;
  }


  #main-header .mobile-menu-trigger svg path,
  .home #main-header .mobile-menu-trigger svg path,
  body:has(.banner-dark) #main-header .mobile-menu-trigger svg path {
    stroke: #000000;
  }


  /* --- 2. Mobile Menu Panel Overlay --- */
  #main-header .menu {
    border-radius: 0;
  }

  /* Header of the mobile menu */
  #main-header .menu .mobile-menu-head {
    height: 70px !important;
    padding: 16px !important;
    border-bottom: none !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end !important;
    /* Close on right */
  }

  #main-header .menu .mobile-menu-head.active {
    justify-content: space-between !important;
    /* Back on left, close on right */
  }

  /* Hide the site logo from the mobile menu header */
  .current-menu-title a.site-logo-link {
    display: none !important;
  }

  /* Style for submenu titles if any */
  .current-menu-title {
    flex-grow: 1;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
  }

  /* Close button styling */
  .mobile-menu-close {
    width: 36px;
    height: 36px;
    line-height: 36px;
    background: #EAEAEA;
    border-radius: 8px;
    color: #1A1A1A;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Back button styling */
  #main-header .menu .mobile-menu-head.active .go-back {
    width: auto;
    height: 36px;
    line-height: 36px;
    background: transparent;
    color: #1A1A1A;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  /* --- 3. Menu List Styling --- */
  #main-header .menu>ul {
    padding: 0 20px;
  }

  #main-header .menu>ul>li {
    border-bottom: 1px solid #EAEAEA;
    padding: 16px 0;
  }

  #main-header .menu>ul>li:last-child {
    border-bottom: none;
  }

  #main-header .menu>ul>li>a {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    padding: 0;
    height: auto;
    line-height: 1.5;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Rotate the down arrow to point right */
  .header .menu>ul>li>a .after-icon {
    position: static;
    height: 24px;
    width: 24px;
    transform: rotate(-90deg);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Custom styling if 'Our Products' is a top-level parent without link */
  #main-header .menu>ul>li.menu-item-has-children>a[href="#"],
  #main-header .menu>ul>li>a:empty,
  #main-header .menu>ul>li.nav-label>a {
    font-size: 14px;
    font-weight: 500;
    color: #666;
  }

  #main-header .menu>ul>li.menu-item-has-children>a[href="#"] .after-icon {
    display: none;
  }

  /* --- 4. Submenu / Products Layout --- */
  /* Hide desktop-specific mega menu styles on mobile */
  .mega-menu-dropdown {
    padding: 0;
    gap: 16px;
  }


  /* Mobile Product Card */
  .mega-product-card {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    margin-bottom: 20px;
  }

  .mega-product-card__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    aspect-ratio: 5 / 3;
  }

  .mega-product-card__image img {
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

  .mega-product-card__body {
    padding: 0 4px;
  }

  .mega-product-card__title {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .mega-product-card__desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
  }

  /* Contact Us CTA */
  #main-header .menu>ul>li.header-cta-mb {
    border-bottom: none;
    padding: 24px 0;
    margin-top: auto;
  }

  #main-header .menu .header-cta-mb.menu-item a {
    background-color: #e21e31;
    color: #ffffff;
    border-radius: 100px;
    height: 48px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .mega-products__view-all {
    margin-top: 16px;
    margin-bottom: 16px;
    width: 100%;
  }
}