* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
}

logo {
  margin-left: -10px;
}

/* Header */
.header {
  background: #0000ff;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  position: fixed;
  top: 0;
  height: 60px;
  z-index: 1050;
}

/* Logo */
/* .logo img {
            height: 40px;
        } */

/* Search Bar */
.search-bar {
  display: flex;
  align-items: center;
  position: relative;
  max-width: 500px;
}

.search-bar input {
  padding: 5px;
  padding-left: 35px;
  border: none;
  border-radius: 20px;
  font-size: 1rem;
}

.search-bar i {
  position: absolute;
  left: 10px;

  color: gray;
}

/* Navigation Links */
.nav-links {
  display: flex;
  align-items: center;

  position: relative;
}

.user-icon {
  cursor: pointer;
  color: white;
  position: relative;
  transition: color 0.3s ease-in-out;
}

.user-icon:hover {
  color: #ffd000;
}

/* Active effect - Change icon color to red */
.user-icon.active {
  color: #ffd000 !important;
}

/* Dropdown Styles */
.dropdown-menu {
  position: absolute;
  top: 60px;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  width: 400px;
  z-index: 1001;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
  max-height: 350px;
}

.dropdown-menu.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 15px;
  transition: background 0.3s ease-in-out;
}

.dropdown-item-notif {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 50px;
  transition: background 0.3s ease-in-out;
}

.dropdown-item:hover {
  background: #ffd000;
  cursor: pointer;
}

.dropdown-item-notif:hover {
  background: #ffd000;
  cursor: pointer;
}

.dropdown-item img {
  width: 50px;
  height: 50px;
  border-radius: 5px;
}

.dropdown-item p {
  margin: 0;
  flex-grow: 1;
}

.timestamp {
  font-size: 0.8rem;
  color: gray;
  white-space: nowrap;
}

.empty-message {
  padding: 15px;
  text-align: center;
  color: gray;
}

/* Account Dropdown */
.account-dropdown {
  position: absolute;
  top: 60px;
  right: 0;
  background: white;
  border-radius: 10px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  width: 180px;
  z-index: 1051;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
}

.account-dropdown.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.account-dropdown a {
  padding: 15px 15px;
  color: black;
  text-decoration: none;
  font-size: 1rem;
  font-weight: normal;
  /* No bold text */
  transition: background 0.3s ease-in-out, padding-left 0.3s ease-in-out;
  border-radius: 5px;
  /* Prevent full background color on hover */
  margin: 10px 10px;
  /* Ensures hover effect doesn’t touch edges */
}

.account-dropdown a:hover {
  background: #ffd000;
  color: black;
}

/* Ensure dropdown appears at the correct position */
.account-menu {
  position: relative;
}

.cart-dropdown {
  width: 450px;
  max-height: 420px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
    opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;

}

.cart-dropdown.active {
  opacity: 1;
  transform: translateY(0);
}

.cart-items {
  overflow-y: auto;
  max-height: 250px;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.cart-items .dropdown-item {
  display: flex;
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.cart-items .dropdown-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  margin-right: 10px;
}

.cart-items .item-details {
  flex: 1;
}

.cart-total {
  padding: 10px;
  text-align: right;
  font-weight: bold;
  border-top: 1px solid #eee;
}

.cart-footer {
  padding: 10px;
  text-align: center;
  background: #f5f5f5;
}

.cart-footer a {
  display: block;
  padding: 10px;
  background: #0026a4;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.cart-footer a:hover {
  background: #001A6e;
}

.hidden {
  display: none !important;
}

/* Prevent scrolling when sidebar is open */
.no-scroll {
    overflow: hidden;
}

/* Header adjustments for the hamburger */
.header {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000; /* Ensure header stays above sidebar */
}

@media (min-width: 768px) {
    .hamburger-menu {
        display: none;
    }
}

.hamburger-menu i {
    color: white;
}

/* Ensure header has proper stacking context */
.header {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 40; /* Lower than sidebar but higher than most content */
    background: blue; /* Ensure header has solid background */
    width: 100%;
}

/* Hamburger menu button styles */
.hamburger-menu {
    display: flex !important; /* Force display */
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    
}

/* Hamburger Menu Icon */
.hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.hamburger-icon .line {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation when active (sidebar open) */
.hamburger-icon.active .line1 {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-icon.active .line2 {
    opacity: 0;
}

.hamburger-icon.active .line3 {
    transform: translateY(-10px) rotate(-45deg);
}

.hamburger-icon {
    transition: transform 0.2s ease;
}

.hamburger-icon:active {
    transform: scale(0.9);
}

.hamburger-menu:focus-visible .hamburger-icon {
    outline: 2px solid white;
    outline-offset: 4px;
}

/* Prevent scrolling when sidebar is open */
.no-scroll {
    overflow: hidden;
    height: 100vh;
}

/* Header styling */
.header {
  display: flex;
  align-items: center;
  padding: 10px 0;
  width: 100%;
  background: #001A6e;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  width: 100%;
  position: fixed;
  top: 0;
  height: 60px;
  z-index: 1050;
}

/* Sidebar transition for smooth animation */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    #sidebar {
        top: 60px; /* Adjust based on your header height */
        height: calc(100vh - 60px);
    }
    
    .hamburger-menu {
        display: flex !important;
    }
}

/* Make sure the button is visible on mobile */
@media (max-width: 767px) {
    .hamburger-menu {
        display: flex !important;
    }
    
    /* Adjust logo positioning to account for hamburger */
    .logo {
        margin-left: 0.5rem;
    }
    
    /* Adjust search bar width */
    .header form {
        width: 60%;
    }
}

.dropdown-item {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.dropdown-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.item-details p {
    margin: 2px 0;
}
