/* === Notification Banner === */
.notification-banner {
  background-color: var(--accent-blue); /* Changed to blue from the logo's eyes */
  padding: 15px; /* Increased from 12px to make it even taller */
  text-align: center;
  font-size: 14px;
}

.notification-text {
  margin: 0;
  color: var(--light-text); /* Light color for contrast against blue background */
}

/* === Header & Navbar Base (site chrome only — not article <header> blocks in page content) === */
body > header {
  width: 100%;
  box-shadow: var(--shadow);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--light-bg);
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  z-index: 2;
}

.logo-image {
  height: 40px;
  width: auto;
}

/* === Mobile Navigation === */
.desktop-nav {
  display: none; /* Hidden on mobile */
}

.mobile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Fix for the mobile logo positioning */
.navbar .logo {
  display: flex;
  align-items: center;
}

/* Hide the duplicate logo in the mobile menu when it's closed */
.mobile-menu .mobile-logo {
  display: none;
}

.mobile-menu-btn {
  position: relative;
  transition: transform 0.3s ease;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  padding: 5px;
  z-index: 10;
}

/* Improved spinning menu button animation */
.mobile-menu-btn {
  transition: transform 0.3s ease;
}

.mobile-menu-btn i {
  transition: all 0.3s ease;
}

/* Create separate animations for opening and closing with multiple spins */
@keyframes spin-open {
  0% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(360deg);
  }
  75% {
    transform: rotate(270deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes spin-close {
  0% {
    transform: rotate(360deg);
  }
  50% {
    transform: rotate(0deg);
  }
  75% {
    transform: rotate(90deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

/* Apply the appropriate animation with longer duration */
.mobile-menu-btn.animating.active {
  animation: spin-open 0.6s ease forwards;
}

.mobile-menu-btn.animating:not(.active) {
  animation: spin-close 0.6s ease forwards;
}

/* When active, rotate the button to final position */
.mobile-menu-btn.active {
  transform: rotate(360deg);
}

/* Transform bars icon into an X */
.mobile-menu-btn i.fa-bars {
  transition: all 0.3s ease;
  opacity: 1;
  transform: scale(1);
}

.mobile-menu-btn.active i.fa-bars {
  opacity: 0;
  transform: scale(0.5);
}

.mobile-menu-btn i.fa-times {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
}

.mobile-menu-btn.active i.fa-times {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Add a spinning effect during the transition */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(180deg);
  }
}

/* Apply spinning animation when toggling */
.mobile-menu-btn.animating {
  animation: spin 0.3s ease;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  height: 100vh;
  background-color: var(--light-bg);
  box-shadow: var(--shadow);
  padding: 60px 20px 20px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  z-index: 5;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

/* Show the mobile logo in the mobile menu */
.mobile-menu .mobile-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
  width: 100%;
}

/* Remove the previous style that's expecting the logo at the top */
.mobile-menu.active .mobile-logo {
  display: flex;
  align-items: center;
}

/* Add some extra styling for the mobile logo */
.mobile-menu .mobile-logo img {
  display: block;
  margin: 0 auto;
  height: 60px; /* Increased from default 40px */
}

/* Make logo even bigger on small tablets */
@media (min-width: 576px) {
  .mobile-menu .mobile-logo img {
    height: 70px;
  }
}

/* And bigger on medium tablets */
@media (min-width: 768px) {
  .mobile-menu .mobile-logo img {
    height: 80px;
  }
}

.mobile-menu a {
  color: var(--text-color);
  text-decoration: none;
  padding: 12px 0;
  display: block;
  border-bottom: 1px solid var(--border-color);
  font-size: 16px;
  text-align: center; /* Add this to center the text */
}

/* === Small Tablets === */
@media (min-width: 576px) {
  .navbar {
    padding: 12px 20px;
  }
  
  .logo-image {
    height: 45px;
  }
  
  .mobile-menu {
    width: 60%;
  }
}

/* === Medium Tablets === */
@media (min-width: 768px) {
  .navbar {
    padding: 15px 30px;
  }
  
  .logo-image {
    height: 50px;
  }
  
  .mobile-menu {
    width: 50%;
  }
}

/* === Large Tablets/Small Desktops === */
@media (min-width: 992px) {
  .mobile-nav {
    display: none;
  }
  
  .desktop-nav {
    display: flex;
    align-items: center;
  }
  
  .navbar-links {
    display: flex;
    align-items: center;
  }
  
  .desktop-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 0;
    position: relative;
    font-size: 15px;
  }
  
  .desktop-nav a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
  }
  
  .desktop-nav a:hover:after {
    width: 100%;
  }
  
  /* User Menu Dropdown */
  .user-menu {
    position: relative;
    margin-left: 15px;
  }
  
  .user-btn {
    display: flex;
    align-items: center;
    gap: 0;
    cursor: pointer;
    margin: 0 !important;
    text-decoration: none;
    color: var(--text-color);
    padding: 4px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
    justify-content: center;
  }

  .user-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
  }

  .desktop-nav .user-btn:after {
    display: none !important;
  }
  
  .user-profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 0, 0, 0.08);
  }

  .user-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color, #2d2e2e), #5a5c5c);
    border: 2px solid rgba(0, 0, 0, 0.08);
  }
  
  .user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    box-shadow: var(--shadow);
    border-radius: 4px;
    width: 180px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 10;
  }
  
  .user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .user-dropdown a {
    padding: 8px 15px;
    display: block;
    margin: 0;
    text-align: left;
  }
  
  .user-dropdown a:after {
    display: none;
  }
  
  .user-dropdown a:hover {
    background-color: var(--light-bg);
  }
  
  .cart-btn {
    margin-left: 15px;
    position: relative;
  }
}

/* === Desktops and Larger === */
@media (min-width: 1200px) {
  .navbar {
    padding: 15px 50px;
  }
  
  .desktop-nav a {
    margin: 0 20px;
    font-size: 16px;
  }
  
  .logo-image {
    height: 55px;
  }
}

/* === JavaScript Classes === */
/* Add these classes in your JavaScript when toggling the mobile menu */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 4;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open {
  overflow: hidden;
}

/* === Mobile Footer Navigation === */
.mobile-footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: var(--dark-bg);
  padding: 10px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-footer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--light-text);
  text-decoration: none;
  font-size: 10px;
  padding: 5px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-footer-nav-item i {
  font-size: 18px;
  margin-bottom: 4px;
}

.mobile-footer-nav-item.active {
  color: var(--secondary-color);
}

.mobile-footer-nav-item .help-icon {
  color: var(--secondary-color);
  font-size: 18px;
}

/* Hide on desktop */
@media (min-width: 992px) {
  .mobile-footer-nav {
    display: none;
  }
}

/* Add padding to body on mobile to account for the footer nav */
@media (max-width: 991px) {
  body {
    padding-bottom: 62px;
  }
}

/* Mobile Dropdown for user-under-nav */
.mobile-menu .user-menu {
  position: relative;
  margin: 0;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu .user-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 12px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.mobile-menu .user-under-nav {
  display: none;
  width: 100%;
  background-color: var(--light-bg);
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: var(--transition);
}

/* Show dropdown when user-menu has active class */
.mobile-menu .user-menu.active .user-under-nav {
  display: block;
}

.mobile-menu .user-under-nav a {
  padding: 10px 15px;
  font-size: 15px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  background-color: rgba(0, 0, 0, 0.03);
}

.mobile-menu .user-under-nav a:last-child {
  border-bottom: none;
}

.mobile-menu .user-under-nav a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

/* Dropdown toggle indicator — chevron after avatar */
.mobile-menu .user-btn:after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: auto;
  transition: var(--transition);
}

.mobile-menu .user-menu.active .user-btn:after {
  transform: rotate(180deg);
}

/* Cart Button Styling */
.cart-btn, 
.mobile-menu a[href="/cart"] {
  background-color: #7ba9c7; /* Using the blue from the logo (accent-blue variable) */
  color: #fff !important;
  padding: 10px 20px !important;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  border: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cart-btn i, 
.mobile-menu a[href="/cart"] i {
  margin-right: 8px;
}

/* Improved hover animation for the cart button */
.cart-btn:hover, 
.mobile-menu a[href="/cart"]:hover {
  background-color: #6b99b7; /* Slightly darker blue for hover state */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.cart-btn:active, 
.mobile-menu a[href="/cart"]:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Desktop cart button specific adjustments */
.desktop-nav .cart-btn {
  margin-left: 15px;
  position: relative;
}

/* Mobile cart button specific adjustments */
.mobile-menu a[href="/cart"] {
  margin: 15px 20px !important;
  text-align: center;
}

/* Add subtle border to match the logo style */
.cart-btn, 
.mobile-menu a[href="/cart"] {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* === Auth Buttons (Guest Nav) === */
.nav-auth-btn {
  padding: 8px 18px !important;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  font-size: 14px;
  border: 1px solid var(--text-color);
  color: var(--text-color) !important;
  background: transparent;
}

.nav-auth-btn:hover {
  background-color: var(--text-color);
  color: var(--light-bg) !important;
  transform: translateY(-1px);
}

.nav-auth-btn.signup-btn {
  background-color: #7ba9c7;
  color: #fff !important;
  border-color: #7ba9c7;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-auth-btn.signup-btn:hover {
  background-color: #6b99b7;
  border-color: #6b99b7;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.desktop-nav .nav-auth-btn {
  margin-left: 8px;
}

.mobile-menu .nav-auth-btn {
  display: block;
  margin: 8px 20px;
  text-align: center;
}

.mobile-menu .nav-auth-btn.signup-btn {
  margin-bottom: 15px;
}