/**
 * Enhanced Header Styles - Matching Figma Design
 * Bites & Brews Restaurant
 */

/* =============================================
   HEADER BASE & SCROLL EFFECTS
   ============================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 2px solid #22c55e;
}

.navbar {
  padding: var(--spacing-4) 0;
  transition: padding 0.3s ease;
}

.header.scrolled .navbar {
  padding: var(--spacing-3) 0;
}

.navbar .container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* =============================================
   NAVIGATION RIGHT WRAPPER
   ============================================= */

.nav-right {
  display: flex;
  align-items: center;
  gap: var(--spacing-8);
  margin-left: auto;
  position: relative;
}

/* =============================================
   LOGO WITH TAGLINE & GLOW ANIMATION
   ============================================= */

.logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  text-decoration: none;
  transition: transform 0.3s ease;
  position: relative;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-icon-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-image {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.2));
}

.header.scrolled .logo-image {
  height: 48px;
}

.logo-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-text {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-extrabold);
  font-family: var(--font-display);
  letter-spacing: 0.5px;
  line-height: 1;
  color: #1e3a2e;
  transition: all 0.3s ease;
}

.header.scrolled .logo-text {
  color: #1e3a2e;
}

.logo-tagline {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  color: #6b7280;
  letter-spacing: 1px;
  font-family: var(--font-primary);
  margin-top: 2px;
  transition: color 0.3s ease;
}

.header.scrolled .logo-tagline {
  color: #6b7280;
}

/* Fallback for browsers without gradient support */
@supports not (-webkit-background-clip: text) {
  .logo-text {
    color: var(--accent-amber-600);
    background: none;
  }
}

/* =============================================
   NAVIGATION MENU
   ============================================= */

/* =============================================
   NAVIGATION MENU
   ============================================= */

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: var(--spacing-1);
  margin: 0;
  padding: 0;
}

.nav-menu li {
  list-style: none;
}

.nav-menu .nav-link {
  display: block;
  padding: var(--spacing-2) var(--spacing-4);
  color: var(--gray-700);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  position: relative;
  transition: all 0.3s ease;
  border-radius: var(--radius-md);
}

.nav-menu .nav-link:hover {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
  transform: translateY(-1px);
}

.header.scrolled .nav-menu .nav-link {
  color: var(--gray-700);
}

.header.scrolled .nav-menu .nav-link:hover,
.header.scrolled .nav-menu .nav-link.active {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

.nav-menu .nav-link.active {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  font-weight: var(--font-weight-semibold);
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* =============================================
   ADMIN BUTTON (Hidden from header, accessible via footer)
   ============================================= */

.admin-button {
  display: none !important;
}

/* =============================================
   CART ICON ENHANCED
   ============================================= */

.cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: #f0fdf4;
  color: #22c55e;
  border: 1px solid #bbf7d0;
  transition: all 0.3s ease;
}

.cart-icon:hover {
  background: #dcfce7;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.header.scrolled .cart-icon {
  background: #f0fdf4;
  color: #22c55e;
  border-color: #bbf7d0;
}

.header.scrolled .cart-icon:hover {
  background: #dcfce7;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border-radius: var(--radius-full);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  animation: cartPulse 2s ease-in-out infinite;
}

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

/* =============================================
   HAMBURGER MENU
   ============================================= */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 4px;
  cursor: pointer;
  background: transparent;
  border: none;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  transition: all 0.3s ease;
  border-radius: 2px;
}

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

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

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

.header.scrolled .hamburger span {
  background: var(--gray-700);
}

/* =============================================
   MOBILE RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .nav-right {
    gap: var(--spacing-4);
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    gap: 0;
    padding: var(--spacing-4) 0;
    z-index: 1000;
    margin-top: 0;
    border: 2px solid #22c55e;
  }

  .nav-menu.active {
    display: flex !important;
    animation: slideDown 0.3s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu .nav-link {
    padding: var(--spacing-3) var(--spacing-6);
    border-radius: 0;
    width: 100%;
  }

  .nav-menu .nav-link:hover {
    background: rgba(34, 197, 94, 0.05);
  }

  .hamburger {
    display: flex;
  }
}

@media (max-width: 768px) {
  .logo-text {
    font-size: var(--font-size-xl);
  }

  .logo-tagline {
    font-size: 9px;
  }

  .logo-image {
    height: 50px;
  }

  .header.scrolled .logo-image {
    height: 42px;
  }

  .cart-icon {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .logo-content {
    display: none;
  }

  .logo {
    gap: 0;
  }

  .nav-right {
    gap: var(--spacing-2);
  }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

/* Smooth scroll behavior */
html {
  scroll-padding-top: 100px;
}
