/* ===== MODERN MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 999;
  padding: 0px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: var(--sh-2);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 500px;
  margin: 0 auto;
  padding: 0 4px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #64748B;
  padding: 6px 8px;
  border-radius: 16px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-width: 56px;
}

.nav-item.active {
  color: #E97C43;
}

.nav-item.active .nav-icon-container {
  background: rgba(233, 124, 67, 0.12);
  transform: scale(1.05);
}

.nav-item.active .nav-icon {
  color: #E97C43;
  transform: translateY(-1px);
}

.nav-icon-container {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(0, 0, 0, 0.02);
  position: relative;
}

.nav-icon {
  font-size: 20px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #E97C43;
  color: white;
  font-size: 9px;
  font-weight: 800;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  box-shadow: var(--sh-1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* (the page loader was removed: a skeleton of the next page is shown instead, see em-ux.php) */
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 991px) {
  .mobile-bottom-nav {
    display: block;
  }
}


/* ===== EffortMart bottom bar: every tab always shows icon + name, the open one is highlighted ===== */
:root {
  --emn-soft:color-mix(in srgb,var(--primary,#E97C43) 7%,#fff);
  --emn-hover:color-mix(in srgb,var(--primary,#E97C43) 15%,#fff);
  --emn-line:color-mix(in srgb,var(--primary,#E97C43) 22%,#fff);
  --emn-grad:linear-gradient(135deg,var(--primary,#E97C43),var(--primary-dark,#D96A32));
  --emn-glow:color-mix(in srgb,var(--primary,#E97C43) 32%,transparent);
}

.mobile-bottom-nav {
  background:#fff;
  border-top:1px solid #ececf0;
  box-shadow:var(--sh-2);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  padding:0 0 env(safe-area-inset-bottom,0px);
  pointer-events:auto;
  border-radius:18px 18px 0 0;
}

.mobile-bottom-nav .nav-container {
  max-width:520px;
  gap:0;
  padding:6px 6px 5px;
  background:none;
  border-radius:0;
  box-shadow:none;
  justify-content:space-between;
}

.mobile-bottom-nav .nav-item {
  flex:1 1 0;
  min-width:0;
  flex-direction:column;
  justify-content:center;
  height:auto;
  padding:0;
  border-radius:12px;
  color:#6B7280;
  gap:2px;
}

.mobile-bottom-nav .nav-icon-container {
  width:46px;
  height:28px;
  margin:0 auto;
  background:none!important;
  transform:none!important;
  border-radius:14px;
  transition:background .2s ease;
}

.mobile-bottom-nav .nav-icon {
  font-size:19px;
  transform:none!important;
}

.mobile-bottom-nav .nav-text {
  position:static;
  width:auto;
  height:auto;
  clip:auto;
  overflow:visible;
  display:block;
  margin:0;
  font-size:10.5px;
  font-weight:600;
  letter-spacing:.1px;
  white-space:nowrap;
}

.mobile-bottom-nav .nav-item.active {
  flex:1 1 0;
  background:none;
  box-shadow:none;
  color:var(--primary-dark,#D96A32);
  --emacc:currentColor;
}

.mobile-bottom-nav .nav-item.active .nav-icon-container {
  background:var(--emn-hover)!important;
}

.mobile-bottom-nav .nav-item.active .nav-icon {
  color:var(--primary-dark,#D96A32);
}

.mobile-bottom-nav .nav-item.active .nav-text {
  font-weight:800;
  color:var(--primary-dark,#D96A32);
}

.mobile-bottom-nav .cart-badge {
  top:-3px;
  right:2px;
  min-width:16px;
  width:auto;
  padding:0 4px;
  height:16px;
  border-width:1.5px;
}

@media (max-width:991px) {
  body:not(.em-native-app) {
    padding-bottom:calc(64px + env(safe-area-inset-bottom,0px));
  }
  /* cart: its checkout bar sits right above the tab bar */
  .cart-checkout-bar {
    bottom:calc(60px + env(safe-area-inset-bottom,0px))!important;
    padding-bottom:10px!important;
    z-index:998;
  }
  body:not(.em-native-app):has(.cart-checkout-bar) {
    padding-bottom:calc(132px + env(safe-area-inset-bottom,0px));
  }
  /* product page: the buy bar replaces the tab bar */
  body:not(.em-native-app):has(.mobile-sticky-bar) {
    padding-bottom:calc(76px + env(safe-area-inset-bottom,0px));
  }
}
