/* ============================================================
   LUXE MART — Ultra Premium Universal Navbar
   Works on ALL pages identically
   ============================================================ */

/* ── NAVBAR VARIABLES ─────────────────────────── */
:root {
  --nav-h: 72px;
  --nav-top-h: 36px;
  --nav-total: calc(var(--nav-h) + var(--nav-top-h));
  --nav-bg: rgba(8, 8, 18, 0.85);
  --nav-border: rgba(255, 255, 255, 0.07);
  --nav-scrolled: rgba(6, 6, 16, 0.97);
}

/* ── ANNOUNCEMENT BAR ─────────────────────────── */
.lx-announce {
  height: var(--nav-top-h);
  background: linear-gradient(90deg, #6d28d9, #7c3aed 30%, #ec4899 70%, #f59e0b);
  background-size: 300% 100%;
  animation: announceGrad 6s ease infinite;
  display: flex; align-items: center; overflow: hidden;
  position: relative; z-index: 1;
}
@keyframes announceGrad {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
.lx-announce-track {
  display: flex; gap: 80px; width: max-content;
  animation: announceTicker 22s linear infinite;
  white-space: nowrap;
}
.lx-announce:hover .lx-announce-track { animation-play-state: paused; }
@keyframes announceTicker { to { transform: translateX(-50%); } }
.lx-announce-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.76rem; font-weight: 600; color: rgba(255,255,255,0.95);
  letter-spacing: 0.3px;
}
.lx-announce-item i { font-size: 0.7rem; opacity: 0.85; }
.lx-announce-sep { color: rgba(255,255,255,0.35); }

/* ── MAIN NAV WRAPPER ─────────────────────────── */
.lx-nav-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 999;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lx-nav-wrap.scrolled .lx-navbar {
  background: var(--nav-scrolled);
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(124,58,237,0.2);
  backdrop-filter: blur(30px) saturate(1.8);
}
.lx-nav-wrap.scrolled .lx-announce {
  height: 0; overflow: hidden; transition: height 0.4s ease;
}

/* ── NAVBAR ───────────────────────────────────── */
.lx-navbar {
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--nav-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Glowing bottom line on scroll */
.lx-navbar::after {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.6), rgba(236,72,153,0.5), transparent);
  opacity: 0; transition: opacity 0.4s ease;
  background-size: 200% 100%;
  animation: navLineGlow 4s ease infinite;
}
.lx-nav-wrap.scrolled .lx-navbar::after { opacity: 1; }
@keyframes navLineGlow {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

.lx-navbar-inner {
  display: flex; align-items: center;
  height: 100%; gap: 28px;
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
}

/* ── LOGO ─────────────────────────────────────── */
.lx-logo {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none; flex-shrink: 0;
  position: relative;
}
.lx-logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
  box-shadow: 0 4px 20px rgba(124,58,237,0.5), 0 0 0 1px rgba(255,255,255,0.1) inset;
  transition: all 0.3s ease;
  position: relative; overflow: hidden;
}
.lx-logo-icon::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent);
  border-radius: inherit;
}
.lx-logo:hover .lx-logo-icon {
  transform: rotate(-8deg) scale(1.1);
  box-shadow: 0 6px 28px rgba(124,58,237,0.7), 0 0 0 1px rgba(255,255,255,0.15) inset;
}
.lx-logo-text {
  font-size: 1.35rem; font-weight: 900; letter-spacing: 1.5px;
  color: #f0f0ff; line-height: 1;
  text-shadow: 0 0 30px rgba(124,58,237,0.3);
}
.lx-logo-text span { color: #f59e0b; }

/* Subtle pulse ring on logo */
.lx-logo::after {
  content: ''; position: absolute; left: -4px; top: -4px;
  width: 48px; height: 48px; border-radius: 14px;
  border: 1.5px solid rgba(124,58,237,0.4);
  opacity: 0; transform: scale(0.8);
  transition: all 0.3s ease;
}
.lx-logo:hover::after { opacity: 1; transform: scale(1); }

/* ── NAV LINKS ────────────────────────────────── */
.lx-nav-links {
  display: flex; align-items: center; gap: 4px;
  flex: 1; justify-content: center; list-style: none;
  margin: 0; padding: 0;
}
.lx-nav-links li { position: relative; }

.lx-nav-link {
  display: flex; align-items: center; gap: 5px;
  color: rgba(240,240,255,0.65); font-weight: 500; font-size: 0.9rem;
  padding: 8px 14px; border-radius: 10px;
  transition: all 0.25s ease;
  position: relative; white-space: nowrap;
  text-decoration: none; letter-spacing: 0.2px;
}
/* Hover glow bg */
.lx-nav-link::before {
  content: ''; position: absolute; inset: 0; border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(236,72,153,0.06));
  opacity: 0; transition: opacity 0.25s ease;
}
.lx-nav-link:hover::before, .lx-nav-link.active::before { opacity: 1; }

/* Underline indicator */
.lx-nav-link::after {
  content: ''; position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lx-nav-link:hover, .lx-nav-link.active {
  color: #f0f0ff;
}
.lx-nav-link:hover::after, .lx-nav-link.active::after {
  width: calc(100% - 22px);
}
.lx-nav-link.active {
  font-weight: 700;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(236,72,153,0.08));
}

/* Badges on links */
.lx-hot-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; font-size: 0.6rem; font-weight: 800;
  padding: 2px 6px; border-radius: 4px;
  letter-spacing: 0.5px; text-transform: uppercase;
  animation: hotPulse 2s ease-in-out infinite;
}
@keyframes hotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(245,158,11,0); }
}

/* ── MEGA MENU ────────────────────────────────── */
.lx-has-mega { position: relative; }
.lx-has-mega > .lx-nav-link > .lx-chevron {
  font-size: 0.65rem; transition: transform 0.3s ease;
}
.lx-has-mega:hover > .lx-nav-link > .lx-chevron { transform: rotate(180deg); }
.lx-has-mega:hover .lx-mega { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }

.lx-mega {
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%) translateY(-12px) scale(0.97);
  min-width: 620px;
  background: rgba(10, 10, 22, 0.98); backdrop-filter: blur(30px);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 20px;
  padding: 28px; box-shadow: 0 25px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(124,58,237,0.1);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  opacity: 0; visibility: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
  pointer-events: all;
}
/* Top glow line */
.lx-mega::before {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(124,58,237,0.7), rgba(236,72,153,0.6), transparent);
}
.lx-mega-col h6 {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: #9f67ff; margin-bottom: 12px;
  display: flex; align-items: center; gap: 6px;
}
.lx-mega-col h6::before {
  content: ''; display: block; width: 14px; height: 2px;
  background: linear-gradient(90deg, #7c3aed, #ec4899); border-radius: 2px;
}
.lx-mega-col a {
  display: block; color: rgba(240,240,255,0.55); font-size: 0.87rem;
  padding: 6px 0; transition: all 0.2s ease; text-decoration: none;
  position: relative; padding-left: 0;
}
.lx-mega-col a::before {
  content: '→'; position: absolute; left: -14px;
  opacity: 0; color: #9f67ff; font-size: 0.75rem;
  transition: all 0.2s ease;
}
.lx-mega-col a:hover { color: #f0f0ff; padding-left: 16px; }
.lx-mega-col a:hover::before { opacity: 1; left: 0; }

.lx-mega-promo {
  display: flex; align-items: stretch;
}
.lx-mega-promo-card {
  background: linear-gradient(135deg, #7c3aed, #8b46ff 50%, #ec4899);
  border-radius: 14px; padding: 20px 16px;
  text-align: center; display: flex; flex-direction: column;
  gap: 8px; flex: 1; position: relative; overflow: hidden;
}
.lx-mega-promo-card::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.lx-mega-promo-tag {
  background: rgba(255,255,255,0.2); padding: 3px 10px;
  border-radius: 99px; font-size: 0.68rem; font-weight: 800;
  color: #fff; display: inline-block; letter-spacing: 0.5px;
}
.lx-mega-promo-card h5 { font-size: 1rem; font-weight: 900; color: #fff; }
.lx-mega-promo-card p  { color: rgba(255,255,255,0.82); font-size: 0.8rem; margin: 0; }
.lx-mega-promo-card a  {
  background: rgba(255,255,255,0.95); color: #7c3aed;
  padding: 8px 16px; border-radius: 99px; font-size: 0.8rem;
  font-weight: 800; display: inline-block; transition: all 0.2s ease;
  text-decoration: none;
}
.lx-mega-promo-card a:hover { background: #fff; transform: scale(1.04); }

/* ── NAV ACTIONS ──────────────────────────────── */
.lx-nav-actions {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}

.lx-icon-btn {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(240,240,255,0.55); font-size: 1rem;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  transition: all 0.25s ease; position: relative; cursor: pointer;
  overflow: hidden;
}
.lx-icon-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(236,72,153,0.08));
  opacity: 0; transition: opacity 0.25s ease;
}
.lx-icon-btn:hover { color: #f0f0ff; border-color: rgba(124,58,237,0.35); transform: translateY(-1px); }
.lx-icon-btn:hover::before { opacity: 1; }
.lx-icon-btn:active { transform: scale(0.93); }

/* Badge */
.lx-badge {
  position: absolute; top: 5px; right: 5px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff; font-size: 0.6rem; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,0.5);
  animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes badgePop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

/* Cart special button */
.lx-cart-btn {
  background: linear-gradient(135deg, rgba(124,58,237,0.15), rgba(236,72,153,0.08));
  border-color: rgba(124,58,237,0.25);
}
.lx-cart-btn:hover {
  background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(236,72,153,0.18));
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 6px 20px rgba(124,58,237,0.3);
}

/* Account button pill */
.lx-account-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 0 14px 0 8px; width: auto; border-radius: 99px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.2px;
}
.lx-account-btn .lx-av-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.lx-account-btn .lx-av-label { white-space: nowrap; }

/* ── HAMBURGER ────────────────────────────────── */
.lx-hamburger {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; cursor: pointer; border-radius: 10px;
  border: 1px solid transparent; transition: all 0.25s ease;
  background: none;
}
.lx-hamburger:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.lx-hamburger span {
  display: block; width: 22px; height: 2px;
  background: rgba(240,240,255,0.65); border-radius: 2px; transition: all 0.3s ease;
}
.lx-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); background: #9f67ff; }
.lx-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.lx-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); background: #9f67ff; }

/* ── MOBILE DRAWER ────────────────────────────── */
.lx-mobile-nav {
  display: none; flex-direction: column;
  position: fixed;
  top: var(--nav-total);
  left: 0; right: 0;
  background: rgba(6, 6, 16, 0.99);
  backdrop-filter: blur(30px);
  border-bottom: 1px solid rgba(124,58,237,0.2);
  padding: 16px 20px 24px;
  gap: 4px; z-index: 998;
  transform: translateY(-10px); opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.34, 1, 0.64, 1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.lx-mobile-nav.open {
  display: flex; opacity: 1; transform: translateY(0); pointer-events: all;
}
.lx-mobile-link {
  display: flex; align-items: center; gap: 12px;
  color: rgba(240,240,255,0.65); font-size: 0.95rem; font-weight: 600;
  padding: 12px 16px; border-radius: 12px; text-decoration: none;
  transition: all 0.2s ease; border: 1px solid transparent;
}
.lx-mobile-link:hover, .lx-mobile-link.active {
  color: #f0f0ff; background: rgba(124,58,237,0.12);
  border-color: rgba(124,58,237,0.2);
}
.lx-mobile-link i { width: 18px; text-align: center; color: #9f67ff; font-size: 0.9rem; }
.lx-mobile-link.active { color: #f0f0ff; }

.lx-mobile-divider {
  height: 1px; background: rgba(255,255,255,0.06); margin: 8px 0;
}
.lx-mobile-actions {
  display: flex; gap: 10px; padding: 8px 16px 0; flex-wrap: wrap;
}
.lx-mobile-action-btn {
  flex: 1; min-width: 120px; padding: 11px 16px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: rgba(240,240,255,0.7); font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; transition: all 0.2s ease; text-decoration: none;
}
.lx-mobile-action-btn:hover { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.35); color: #f0f0ff; }
.lx-mobile-action-btn.primary {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 20px rgba(124,58,237,0.4);
}

/* ── PAGE OFFSET (body padding) ─────────────── */
body.has-lx-nav { padding-top: var(--nav-total); }
body.has-lx-nav.no-announce { padding-top: var(--nav-h); }

/* For index.html (hero handles offset internally) */
body.index-page { padding-top: 0; }

/* Fix account-menu sticky top */
body.has-lx-nav .account-menu-card { top: calc(var(--nav-total) + 16px); }

/* ── STAGGER ANIMATION for desktop nav items ── */
.lx-nav-links li {
  animation: navItemIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
.lx-nav-links li:nth-child(1) { animation-delay: 0.05s; }
.lx-nav-links li:nth-child(2) { animation-delay: 0.10s; }
.lx-nav-links li:nth-child(3) { animation-delay: 0.15s; }
.lx-nav-links li:nth-child(4) { animation-delay: 0.20s; }
.lx-nav-links li:nth-child(5) { animation-delay: 0.25s; }
@keyframes navItemIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* Logo entrance */
.lx-logo {
  animation: logoIn 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.02s both;
}
@keyframes logoIn {
  from { opacity: 0; transform: translateX(-16px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1);       }
}

/* Actions entrance */
.lx-nav-actions {
  animation: actionsIn 0.5s ease 0.3s both;
}
@keyframes actionsIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0);    }
}

/* ── RIPPLE EFFECT on icon buttons ─────────── */
.lx-icon-btn {
  position: relative; overflow: hidden;
}
.lx-icon-btn .lx-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transform: scale(0); animation: rippleOut 0.5s linear;
  pointer-events: none;
}
@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}


/* ── Mobile drawer item stagger ─────────────── */
.lx-mobile-nav.open .lx-mobile-link {
  animation: mobileItemIn 0.35s cubic-bezier(0.34,1.4,0.64,1) both;
}
.lx-mobile-nav.open .lx-mobile-link:nth-child(1) { animation-delay: 0.04s; }
.lx-mobile-nav.open .lx-mobile-link:nth-child(2) { animation-delay: 0.08s; }
.lx-mobile-nav.open .lx-mobile-link:nth-child(3) { animation-delay: 0.12s; }
.lx-mobile-nav.open .lx-mobile-link:nth-child(4) { animation-delay: 0.16s; }
.lx-mobile-nav.open .lx-mobile-link:nth-child(5) { animation-delay: 0.20s; }
@keyframes mobileItemIn {
  from { opacity: 0; transform: translateX(-18px); }
  to   { opacity: 1; transform: translateX(0);     }
}

/* ── Scroll progress glow pulse ─────────────── */
.lx-scroll-progress {
  box-shadow: 0 0 12px rgba(124,58,237,0.7), 0 0 4px rgba(236,72,153,0.5);
}

/* ── Mega menu item count badge ─────────────── */
.lx-mega-col a[data-count]::after {
  content: attr(data-count);
  margin-left: auto;
  background: rgba(124,58,237,0.2);
  color: #9f67ff;
  font-size: 0.68rem; font-weight: 700;
  padding: 1px 6px; border-radius: 99px;
}

/* ── LOGO icon spin on page load ────────────── */
.lx-logo-icon i {
  animation: gemSpin 0.8s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
}
@keyframes gemSpin {
  from { transform: rotate(-30deg) scale(0.7); opacity: 0; }
  to   { transform: rotate(0deg) scale(1);     opacity: 1; }
}

/* ── HOT badge shimmer ───────────────────────── */
.lx-hot-badge {
  position: relative; overflow: hidden;
}
.lx-hot-badge::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: hotShimmer 2.5s ease-in-out infinite;
}
@keyframes hotShimmer {
  0%   { left: -60%; }
  60%, 100% { left: 130%; }
}

/* ── Cart button wiggle on badge change ─────── */
@keyframes cartWiggle {
  0%, 100% { transform: rotate(0);      }
  20%       { transform: rotate(-12deg); }
  40%       { transform: rotate(12deg);  }
  60%       { transform: rotate(-6deg);  }
  80%       { transform: rotate(6deg);   }
}
.lx-cart-btn.wiggle { animation: cartWiggle 0.5s ease; }

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 960px) {
  .lx-nav-links { display: none; }
  .lx-hamburger { display: flex; }
  .lx-account-btn .lx-av-label { display: none; }
  .lx-account-btn { padding: 0; width: 42px; }
}

@media (max-width: 640px) {
  :root { --nav-top-h: 32px; --nav-h: 64px; }
  .lx-announce-track { animation-duration: 16s; }
  
  .lx-navbar-inner { padding: 0 16px; gap: 10px; justify-content: space-between; }
  .lx-logo-text { font-size: 1.15rem; }
  .lx-logo-icon { width: 36px; height: 36px; }
  
  .lx-nav-actions { gap: 6px; }
  
  /* Hide search & wishlist on mobile to save space for Account & Hamburger. 
     (Search is available in the mobile menu, Wishlist in the Account tab) */
  #lxSearchBtn, #lxWishBtn { display: none; }
  
  .lx-icon-btn { width: 38px; height: 38px; font-size: 0.95rem; }
  .lx-account-btn { width: 38px; }
  .lx-account-btn .lx-av-dot { width: 26px; height: 26px; font-size: 0.7rem; }
}

@media (max-width: 380px) {
  .lx-logo-text { font-size: 1.05rem; }
  .lx-logo-icon { width: 32px; height: 32px; border-radius: 8px; }
  
  .lx-nav-actions { gap: 4px; }
  .lx-icon-btn { width: 34px; height: 34px; }
  .lx-account-btn { width: 34px; }
  .lx-account-btn .lx-av-dot { width: 24px; height: 24px; }
}
