/* Base Styles */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bs-body-bg, #ffffff);
  font-family: system-ui, -apple-system, sans-serif;
}

/* --- TOP BAR LAYOUT (Glass Effect) --- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 70px;

  /* The transparency magic */
  background-color: transparent; /* 60% solid dark background */
  backdrop-filter: blur(12px); /* Blurs the content behind the bar */
  -webkit-backdrop-filter: blur(12px); /* For Safari support */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle transparent border */

  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo */
.topbar-logo img {
  height: 40px;
  width: auto;
}

/* Navigation List */
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 24px; /* Space between links */
}

.nav-item {
  position: relative; /* Needed for dropdown positioning */
}

/* Links */
.nav-link {
  display: flex;
  align-items: center;
  color: #d1d5db;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 10px 0;
}

.nav-link:hover {
  color: #ffffff;
}

.nav-link .icon {
  margin-right: 8px;
}

.text-danger {
  color: #dc3545 !important;
}

/* Cart Badge */
.cart-badge {
  background-color: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 6px;
}

/* --- DROPDOWN MENU --- */
.dropdown-menu {
  display: none; /* Hidden by default */
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #151515;
  border: 1px solid #333;
  border-radius: 6px;
  min-width: 200px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Show dropdown when hovering over the .dropdown list item */
.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a,
.dropdown-menu li .logout-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  color: #d1d5db;
  text-decoration: none;
  font-size: 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-align: left;
}

.dropdown-menu li a:hover,
.dropdown-menu li .logout-btn:hover {
  background-color: #2a2a2a;
  color: #ffffff;
}

.dropdown-menu li .icon {
  width: 20px;
  margin-right: 10px;
}

.logout-form {
  margin: 0;
}

/* --- THEME TOGGLE BUTTON --- */
.theme-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid #4b5563;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-toggle-btn:hover {
  background: #374151;
  color: white;
}

/* --- MAIN CONTENT --- */
.main-content {
  padding: 30px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
/* 1. Ensure the desktop navbar container is always transparent */
@media (min-width: 769px) {
    .topbar-nav {
        background: transparent !important;
        box-shadow: none !important;
    }
}


[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1) !important;
}


[data-bs-theme="light"] .dropdown-menu li a,
[data-bs-theme="light"] .dropdown-menu li .logout-btn {
    color: #374151 !important;
}

[data-bs-theme="light"] .dropdown-menu li a:hover,
[data-bs-theme="light"] .dropdown-menu li .logout-btn:hover {
    background-color: #f3f4f6 !important;
}

/* 3. Ensure the Dark Mode background matches your main theme */
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #1f2937 !important;
    border: 1px solid #374151 !important;
}