/* ─── Overlay Header ─── */
.mfg-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
}

.mfg-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 60px;
}

/* ─── Brand / Logo ─── */
.mfg-header__brand {
  flex-shrink: 0;
}

.mfg-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}

.mfg-header__logo-icon {
  width: 28px;
  height: 28px;
}

.mfg-header__logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
}

.mfg-header__logo-text sup {
  font-size: 10px;
  font-weight: 400;
  vertical-align: super;
  margin-left: 1px;
}

.mfg-header__brand .custom-logo-link {
  display: flex;
  align-items: center;
}

.mfg-header__brand .custom-logo {
  max-height: 40px;
  width: auto;
}

/* ─── Navigation ─── */
.mfg-header__nav {
  flex: 1;
  padding-left: 60px;
}

.mfg-header__nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.mfg-header__nav > ul > li {
  position: relative;
}

.mfg-header__nav > ul > li > a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: opacity 0.2s;
}

.mfg-header__nav > ul > li > a:hover,
.mfg-header__nav > ul > li.current-menu-item > a,
.mfg-header__nav > ul > li.current-menu-ancestor > a {
  opacity: 0.7;
}

/* Dropdown */
.mfg-header__nav ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ffffff;
  min-width: 200px;
  padding: 10px 0;
  list-style: none;
  margin: 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  z-index: 10;
}

.mfg-header__nav ul li:hover > ul {
  display: block;
}

.mfg-header__nav ul ul li a {
  display: block;
  padding: 9px 22px;
  font-size: 13px;
  font-weight: 500;
  color: #1e1e2d;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.mfg-header__nav ul ul li a:hover {
  color: #DF3C2A;
  background: #f8f8f8;
}

/* ─── Right Actions ─── */
.mfg-header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.mfg-header__action {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer !important;
  color: #ffffff !important;
  transition: opacity 0.2s !important;
}

.mfg-header__action:hover {
  opacity: 0.7;
}

/* Cart info text */
.mfg-header__cart {
  gap: 8px;
  text-decoration: none;
}

.mfg-header__cart-info {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
}

.mfg-header__cart-count {
  position: absolute;
  top: -6px;
  left: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #DF3C2A;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ─── Hamburger (mobile only) ─── */
.mfg-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  width: 26px;
}

.mfg-header__hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #ffffff;
  border-radius: 1px;
  transition: transform 0.3s, opacity 0.3s;
}

.mfg-header__hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mfg-header__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.mfg-header__hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Search Bar ─── */
.mfg-header__search-bar {
  display: none;
  background: rgba(19, 24, 40, 0.95);
  padding: 20px 60px;
}

.mfg-header__search-bar.active {
  display: block;
}

.mfg-header__search-bar form {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.mfg-header__search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 16px;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
}

.mfg-header__search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.mfg-header__search-bar button {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  padding: 10px;
}

/* ─── Scrolled state (sticky with dark bg) ─── */
.mfg-header.scrolled {
  position: fixed;
  background: rgba(19, 24, 40, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: headerSlideDown 0.3s ease;
}

@keyframes headerSlideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   Side Panel Overlay
   ═══════════════════════════════════════════ */
.mfg-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.mfg-panel-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mfg-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: #131828;
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: 'Inter', sans-serif;
  color: #ffffff;
}

.mfg-panel.active {
  transform: translateX(0);
}

/* Panel header */
.mfg-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 40px;
  flex-shrink: 0;
}

.mfg-panel__header .custom-logo-link .custom-logo {
    width: 80%;
}

.mfg-panel__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
}

.mfg-panel__logo-icon {
  width: 28px;
  height: 28px;
}

.mfg-panel__logo-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.mfg-panel__logo-text sup {
  font-size: 10px;
  font-weight: 400;
  vertical-align: super;
  margin-left: 1px;
}

.mfg-panel__logo .custom-logo-link {
  display: flex;
  align-items: center;
}

.mfg-panel__logo .custom-logo {
  max-height: 36px;
  width: auto;
}

.mfg-panel__close {
  background: none;
  border: none !important;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 6px 0;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

.mfg-panel__close:hover {
  color: #ffffff;
}

/* Panel navigation */
.mfg-panel__nav {
  padding: 10px 40px 30px;
  flex-shrink: 0;
}

.mfg-panel__menu,
.mfg-panel__nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mfg-panel__menu > li,
.mfg-panel__nav > ul > li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mfg-panel__menu > li > a,
.mfg-panel__nav > ul > li > a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}

.mfg-panel__menu > li > a:hover,
.mfg-panel__nav > ul > li > a:hover {
  color: rgba(255, 255, 255, 0.6);
}

/* Panel sub-menus */
.mfg-panel__menu ul,
.mfg-panel__nav > ul ul {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 20px;
}

.mfg-panel__menu ul li a,
.mfg-panel__nav > ul ul li a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.mfg-panel__menu ul li a:hover,
.mfg-panel__nav > ul ul li a:hover {
  color: #ffffff;
}

/* Panel social links */
.mfg-panel__social {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 40px 30px;
  flex-shrink: 0;
}

.mfg-panel__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s;
}

.mfg-panel__social a:hover {
  color: #ffffff;
}

/* Panel info blocks */
.mfg-panel__info {
  padding: 0 40px 40px;
  margin-top: auto;
  flex-shrink: 0;
}

.mfg-panel__info-block {
  margin-bottom: 24px;
}

.mfg-panel__info-block:last-child {
  margin-bottom: 0;
}

.mfg-panel__info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0 0 8px;
}

.mfg-panel__info-link {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.mfg-panel__info-link:hover {
  color: #ffffff;
}

.mfg-panel__info-action {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 2px solid #DF3C2A;
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.mfg-panel__info-action:hover {
  opacity: 0.7;
}

/* Prevent body scroll when panel is open */
body.mfg-panel-open {
  overflow: hidden;
}

/* ─── Tablet ─── */
@media (max-width: 1024px) {
  .mfg-header__inner {
    padding: 22px 40px;
  }

  .mfg-header__nav {
    padding-left: 30px;
  }

  .mfg-header__nav > ul > li > a {
    padding: 8px 12px;
    font-size: 13px;
  }

  .mfg-header__cart-info {
    display: none;
  }

  .mfg-panel {
    width: 400px;
  }

  .mfg-panel__header,
  .mfg-panel__nav,
  .mfg-panel__social,
  .mfg-panel__info {
    padding-left: 30px;
    padding-right: 30px;
  }
}

/* ─── Mobile ─── */
@media (max-width: 767px) {
  .mfg-header__inner {
    padding: 18px 25px;
    flex-wrap: wrap;
  }

  .mfg-header__hamburger {
    display: flex;
  }

  .mfg-header__grid-toggle {
    display: none;
  }

  .mfg-header__cart-info {
    display: none;
  }

  .mfg-header__nav {
    display: none;
    width: 100%;
    order: 10;
    padding: 20px 0 10px;
  }

  .mfg-header__nav.open {
    display: block;
  }

  .mfg-header__nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .mfg-header__nav > ul > li > a {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 15px;
  }

  .mfg-header__nav ul ul {
    position: static;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.05);
    padding: 0;
  }

  .mfg-header__nav ul ul li a {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    font-size: 14px;
  }

  .mfg-header__nav ul ul li a:hover {
    color: #DF3C2A;
    background: rgba(255, 255, 255, 0.05);
  }

  .mfg-header__search-bar {
    padding: 16px 25px;
  }

  .mfg-panel {
    width: 100%;
    max-width: 100vw;
  }

  .mfg-panel__header,
  .mfg-panel__nav,
  .mfg-panel__social,
  .mfg-panel__info {
    padding-left: 25px;
    padding-right: 25px;
  }
}

/* ─── Hide parent theme default header styles ─── */
.site-header:not(.mfg-header) {
  display: none !important;
}
