/* ==========================================================================
   AAROGYAM INDIA - MOBILE STICKY BOTTOM NAV & MOBILE HEADER CLEAN-UP
   Inspired by modern mobile e-commerce (BigHaat, Flipkart, AgriBegri)
   ========================================================================== */

/* 1. Mobile Bottom Sticky Navigation Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1.5px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  z-index: 9990;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)) 4px;
}

.mobile-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  max-width: 600px;
  margin: 0 auto;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 12px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 52px;
  position: relative;
}

.mobile-nav-item i,
.mobile-nav-item .nav-emoji {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: transform 0.2s ease;
}

.mobile-nav-item.active {
  color: #16a34a;
}

.mobile-nav-item.active i,
.mobile-nav-item.active .nav-emoji {
  transform: scale(1.15);
}

.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 20px;
  height: 3px;
  background: #16a34a;
  border-radius: 4px;
}

.mobile-nav-item:active {
  transform: scale(0.92);
}

.mobile-nav-item .nav-badge {
  position: absolute;
  top: 1px;
  right: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 8px;
  border: 1px solid #fff;
}

/* 2. Floating Action Pill (Audio + Share + WhatsApp) */
.floating-action-pill {
  position: fixed;
  bottom: 74px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9980;
}

.floating-action-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  position: relative;
}

.floating-action-btn:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

.floating-action-btn:active {
  transform: scale(0.95);
}

.floating-btn-audio {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
}

.floating-btn-audio.playing {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  animation: pulse-audio 1.5s infinite;
}

@keyframes pulse-audio {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.floating-btn-share {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.floating-btn-whatsapp {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.floating-btn-tooltip {
  position: absolute;
  right: 54px;
  background: #0f172a;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.floating-action-btn:hover .floating-btn-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Audio Player Live Bar Indicator (Disabled / Hidden completely) */
.audio-live-pill-toast,
.audio-live-pill-toast.show {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.audio-equalizer-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.audio-equalizer-bars span {
  width: 3px;
  background: #38bdf8;
  border-radius: 2px;
  animation: equalize 0.8s infinite ease-in-out alternate;
}
.audio-equalizer-bars span:nth-child(2) { animation-delay: 0.2s; }
.audio-equalizer-bars span:nth-child(3) { animation-delay: 0.4s; }

@keyframes equalize {
  0% { height: 4px; }
  100% { height: 14px; }
}

/* 3. Universal Header Consistency & Mobile Rules (Declutter) */
header.header,
header.header-tiranga-animated {
  width: 100% !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
  overflow-x: clip !important;
}

header.header > .container,
header.header-tiranga-animated > .container {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 8px 16px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    position: relative !important;
  }

  body {
    padding-bottom: 70px !important;
  }
  
  .mobile-bottom-nav {
    display: block;
  }
  
  /* Standardize mobile container width and breathing space */
  header.header > .container,
  header.header-tiranga-animated > .container {
    padding: 6px 10px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Hide crowded secondary items in mobile header that cause page blowout */
  #header-unified-user-badge,
  .header-user-status-pill,
  .header-login-quick-btn,
  .header .header-current-page-badge,
  .header-tiranga-animated .header-current-page-badge,
  .header .btn-pwa-install,
  .header-tiranga-animated .btn-pwa-install,
  .header .header-actions .btn:not(.menu-button),
  .header-tiranga-animated .header-actions .btn:not(.menu-button) {
    display: none !important;
  }

  .brand-logo-pill,
  .header-brand-wrap {
    padding: 3px 6px !important;
    gap: 6px !important;
    max-width: 175px !important;
    overflow: hidden !important;
    flex-shrink: 1 !important;
  }

  .brand-logo-pill img,
  .header-brand-wrap img {
    height: 28px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .brand-title-text {
    font-size: 0.92rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .brand-sub-text {
    display: none !important;
  }

  .header-actions {
    gap: 6px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-actions a[href*="cart"],
  .user-notif-bell-btn {
    width: 32px !important;
    height: 32px !important;
  }

  .menu-button {
    width: 34px !important;
    height: 34px !important;
  }
}

@media (min-width: 769px) {
  .floating-action-pill {
    bottom: 24px;
  }
}

