/* Navbar Custom Styles */
  .navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
    transition: all 0.3s ease;
  }

  /* Container for desktop layout */
  .navbar > .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    width: 100%;
  }

  /* Left section - Brand + Navigation */
  .navbar-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
  }

  /* Right section - User actions */
  .navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
  }

  .navbar-brand {
    font-weight: 700;
    color: #667eea !important;
    font-size: 1.4rem;
    padding: 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-right: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .navbar-brand:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
  }

  .navbar-brand i {
    font-size: 1.5rem;
  }

  .logo-text {
    display: inline;
  }

  /* Desktop Navigation Links */
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .desktop-nav-item {
    margin: 0;
  }

  .nav-link {
    font-weight: 500;
    color: #555 !important;
    padding: 0.6rem 1.2rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .nav-link:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.08);
    transform: translateY(-1px);
  }

  .nav-link.active {
    color: #667eea !important;
    font-weight: 600;
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
  }

  /* User Welcome */
  .user-welcome {
    color: #667eea;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-right: 1px solid #eee;
    margin-right: 1rem;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .user-welcome i {
    color: #764ba2;
    font-size: 1.1rem;
  }

  /* Common Button Styles */
  .nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem !important;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.2;
    height: 42px;
    min-width: fit-content;
    white-space: nowrap;
    border: none;
    cursor: pointer;
  }

  /* Add New Listing Button */
  .btn-add-listing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
  }

  .btn-add-listing:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    color: white !important;
  }

  /* Logout Button */
  .btn-logout {
    background: transparent;
    color: #fe424d !important;
    border: 1.5px solid #fe424d;
  }

  .btn-logout:hover {
    background: #fe424d;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(254, 66, 77, 0.2);
  }

  /* Sign Up Button */
  .btn-signup {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
    border: 1.5px solid transparent;
  }

  .btn-signup:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    color: #667eea !important;
    transform: translateY(-2px);
  }

  /* Login Button */
  .btn-login {
    background: transparent;
    color: #667eea !important;
    border: 1.5px solid #667eea;
  }

  .btn-login:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
  }

  /* Mobile Auth Buttons - Show between logo and menu toggle */
  .mobile-auth-buttons {
    display: none;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    margin-right: 1rem;
  }

  .mobile-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea !important;
    text-decoration: none;
    height: 34px;
    min-width: fit-content;
    white-space: nowrap;
  }

  .mobile-logout-btn {
    background: rgba(254, 66, 77, 0.1);
    color: #fe424d !important;
  }

  .mobile-logout-btn:hover {
    background: rgba(254, 66, 77, 0.2);
  }

  .mobile-auth-btn:hover {
    background: rgba(102, 126, 234, 0.2);
  }

  /* Navbar Toggler */
  .navbar-toggler {
    border: 1.5px solid #667eea;
    padding: 0.4rem 0.6rem;
    position: relative;
    z-index: 1002;
    height: 42px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
  }

  .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
  }

  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28102, 126, 234, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
  }

  /* Side Panel Styles */
  .side-panel-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .side-panel-overlay.active {
    display: block;
    opacity: 1;
  }

  .side-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .side-panel.active {
    right: 0;
  }

  .side-panel-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .side-panel-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
  }

  .close-panel {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
  }

  .side-panel-body {
    padding: 1.5rem;
    flex: 1;
  }

  .side-panel-nav {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .side-panel-nav li {
    margin-bottom: 0.5rem;
  }

  .side-panel-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: #555;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    min-height: 44px;
  }

  .side-panel-nav a:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    transform: translateX(5px);
  }

  .side-panel-nav a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    font-weight: 600;
  }

  .side-panel-nav a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
  }

  .side-user-info {
    padding: 1rem;
    margin: 1rem 0;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    border-left: 3px solid #667eea;
  }

  .side-user-info p {
    margin: 0;
    color: #667eea;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .side-user-info p i {
    color: #764ba2;
  }

  /* Animation for navbar items */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .desktop-nav-item {
    animation: fadeInUp 0.3s ease forwards;
    animation-delay: calc(var(--item-index) * 0.1s);
    opacity: 0;
  }

  /* Responsive Design */
  @media (min-width: 992px) {
    /* Desktop Layout */
    .navbar-toggler {
      display: none;
    }
    
    .mobile-auth-buttons {
      display: none !important;
    }
    
    .side-panel-overlay,
    .side-panel {
      display: none !important;
    }
    
    .navbar-right {
      display: flex !important;
    }
  }

  @media (max-width: 991px) {
    /* Mobile Layout */
    .navbar-left,
    .navbar-right,
    .desktop-nav,
    .user-welcome,
    .nav-button {
      display: none !important;
    }
    
    .mobile-auth-buttons {
      display: flex;
      align-items: center;
      margin-left: auto;
      margin-right: 1rem;
    }
    
    .navbar > .container-fluid {
      justify-content: space-between;
    }
    
    .navbar-brand {
      flex-shrink: 0;
    }
    
    /* Mobile Layout: Logo | Auth Buttons | Menu Toggle */
    .navbar > .container-fluid {
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 1rem;
    }
    
    .navbar-brand {
      grid-column: 1;
    }
    
    .mobile-auth-buttons {
      grid-column: 2;
      justify-content: flex-end;
    }
    
    .navbar-toggler {
      grid-column: 3;
      margin-left: 0;
    }
  }

  /* Extra small screens */
  @media (max-width: 480px) {
    .navbar-brand .logo-text {
      display: none;
    }
    
    .mobile-auth-btn span {
      display: none;
    }
    
    .mobile-auth-btn i {
      margin: 0;
    }
    
    .navbar > .container-fluid {
      gap: 0.5rem;
    }
  }

  /* Tablet screens */
  @media (max-width: 768px) and (min-width: 481px) {
    .mobile-auth-btn span {
      display: inline;
      font-size: 0.75rem;
    }
    
    .navbar-brand .logo-text {
      display: inline;
      font-size: 1.2rem;
    }
  }

  /* Medium screens adjustments for desktop */
  @media (max-width: 1200px) and (min-width: 992px) {
    .nav-button {
      padding: 0.6rem 1rem !important;
      font-size: 0.9rem;
    }
    
    .btn-add-listing span,
    .btn-logout span,
    .btn-signup span,
    .btn-login span {
      display: none;
    }
    
    .btn-add-listing i,
    .btn-logout i,
    .btn-signup i,
    .btn-login i {
      margin: 0;
    }
    
    .user-welcome span {
      display: none;
    }
    
    .user-welcome i {
      margin-right: 0;
    }
  }