:root {
  --acr-logo-height: 44px;
}

/* Keep header stacks stable */
.topbar,
.main-header {
  position: relative;
  overflow: visible;
}

.topbar {
  z-index: 1400;
}

.main-header {
  z-index: 1200;
}

.topbar .dropdown-menus,
.top-bar-dropdown.notification .dropdown-menus,
.main-header .nabbar-nav .mainmenu li.has-droupdown .submenu {
  z-index: 1305 !important;
}

.topbar .top-bar-dropdown,
.topbar ul,
.topbar ul li,
.topbar .left-topbar,
.topbar .topbar-right,
.topbar .container,
.topbar .row {
  overflow: visible !important;
}

.topbar .dropdown-menus,
.topbar .top-bar-dropdown.notification .dropdown-menus {
  z-index: 1500 !important;
  pointer-events: auto;
}

/* Single logo sizing */
.main-header > .nabbar-nav > .container-lg > .logo-and-navbar > .nav-brand img,
.main-header .mobile-menu-header .logo img,
.acr-brand-logo img {
  max-height: var(--acr-logo-height, 44px) !important;
  width: auto;
  display: block;
}

.main-header > .nabbar-nav > .container-lg > .logo-and-navbar > .nav-brand,
.main-header .mobile-menu-header .logo,
.acr-brand-logo {
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .main-header .mobile-menu-header .logo img {
    max-height: min(36px, var(--acr-logo-height, 36px)) !important;
  }
}

/* Sale badge effect from original style */
.main-header .nabbar-nav .mainmenu > li > a > span[data-offer] {
  position: relative;
}

.main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  content: attr(data-offer);
  background: rgb(186, 230, 211);
  color: rgb(31, 32, 68);
  font-size: 12px;
  border-radius: 3px;
  padding: 2px 4px;
  line-height: 1;
  font-weight: 400;
  letter-spacing: 1px;
  position: absolute;
  top: -15px;
  right: 0;
}

/* Menu card sale label from original style */
.main-header .nabbar-nav .mainmenu li.has-droupdown .submenu .megamenu-item > li > ul > li > a > .inner > .content > .headings > .labels {
  background-color: rgb(186, 230, 211);
  color: rgb(31, 32, 68);
  align-items: center;
  border-radius: 20px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 500;
  justify-content: center;
  line-height: 16px;
  padding: 2px 10px;
  text-transform: uppercase;
}

/* Animation control with classic default */
html[data-acr-sale-animation="classic"] .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  animation: none !important;
}

html[data-acr-sale-animation="fade"] .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  animation: acrSaleFade 1.8s ease-in-out infinite;
}

html[data-acr-sale-animation="pulse"] .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  animation: acrSalePulse 2.2s ease-in-out infinite;
}

html[data-acr-sale-speed="slow"] .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  animation-duration: 3.2s !important;
}

html[data-acr-sale-speed="normal"] .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  animation-duration: 2.2s !important;
}

html[data-acr-sale-speed="fast"] .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
  animation-duration: 1.2s !important;
}

@keyframes acrSaleFade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

@keyframes acrSalePulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.04); }
}

/* Mobile badge placement (original behavior) */
@media (max-width: 991px) {
  .main-header .nabbar-nav .mainmenu > li > a > span[data-offer]:after {
    position: relative;
    top: auto;
    right: auto;
    margin-inline-start: 10px;
  }
}

/* Theme dropdown readability */
.acr-theme-dropdown {
  position: relative;
}

.acr-theme-menu {
  z-index: 1400;
}
