/* buyers.css */
/* Sidebar styles */
#sidebar {
  height: 100vh;
  top: 0;
  left: 0;
  width: fit-content;
  transition: transform 0.3s ease-in-out;
  will-change: transform;
  z-index: 40;
}

#sidebar > div {
  height: calc(100vh - 5rem);
  padding-top: 1rem;
}

#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-thumb {
  background-color: #d1fae5;
  border-radius: 3px;
}

#sidebar.collapsed {
  width: 80px;
}

#sidebar.collapsed .sidebar-text {
  display: none;
}

#sidebar.collapsed ~ #main-content {
  margin-left: 4rem;
}

#sidebar.collapsed #sidebar-collapse i {
  transform: rotate(180deg);
}

#sidebar-overlay {
  transition: opacity 0.3s ease;
  z-index: 30;
}

body {
  overflow-x: hidden;
}

/* Header responsiveness Header alignment */
@media (max-width: 767px) {
  .fixed {
    left: 0;
    width: 100%;
    transition: all 0.3s;
  }
  
  #main-content {
    margin-top: 7.5rem;
    transition: margin 0.3s;
  }
}

@media (min-width: 768px) {
  #main-content {
    margin-left: 16rem;
    margin-top: 6.5rem;
  }

  .fixed {
    left: 16rem;
    width: calc(100% - 16rem);
  } 
}

nav.bg-green-700 {
  position: relative;
  z-index: 50;
}

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

  nav .flex.items-center.justify-between {
  width: 100%;
}

/* Icon spacing in header */
header .flex.items-center {
  gap: 0.75rem; /* Reduced gap between icons */
}

@media (min-width: 768px) {
  .fixed {
    left: 16rem;
    width: calc(100% - 16rem);
  }
  
}

.md\:flex {
  display: flex !important;
}
/* Product styles */
.product {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Category dropdown */
#category-dropdown {
  max-height: 300px;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  background-color: white;
  width: 100%;
}

.category-option {
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background-color 0.2s ease;
}

.category-option:hover {
  background-color: #f3f4f6;
}

.category-option.active {
  background-color: #f0fdf4;
  color: #166534;
  font-weight: 600;
}

.category-option i {
  font-size: 16px;
  color: #718096;
}

/* Notification styles */
#notification-dropdown {
  max-height: 300px;
  overflow-y: auto;
}

.notification-item {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background-color 0.2s;
}

.notification-item:hover {
  background-color: #f9fafb;
}

.notification-item.unread {
  background-color: #f0fdf4;
}

.notification-time {
  font-size: 0.7rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

#notification-badge {
  transition: all 0.2s ease;
}

/* Chat styles */
#chat-messages {
  scrollbar-width: thin;
  scrollbar-color: #d1fae5 transparent;
  overflow-y: auto;
  flex: 1;
  padding: 1rem;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-thumb {
  background-color: #d1fae5;
  border-radius: 3px;
}

.chat-message {
  max-width: 80%;
  padding: 0.75rem;
  border-radius: 1rem;
  margin-bottom: 0.5rem;
  word-wrap: break-word;
}

.message-sent {
  background-color: #d1fae5;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}

.message-received {
  background-color: #f3f4f6;
  margin-right: auto;
  border-bottom-left-radius: 0.25rem;
}

.message-time {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
  text-align: right;
}

/* Farmer list styles */
.farmer-item {
  transition: background-color 0.2s ease;
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.farmer-item:hover {
  background-color: #f3f4f6;
}

.farmer-item.active {
  background-color: #f0fdf4;
  border-left: 3px solid #10b981;
}

/* Utility classes */
.hidden {
  display: none;
}

.transition {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.shadow-md {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.rounded-lg {
  border-radius: 0.5rem;
}

/* Mobile bottom nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  z-index: 40;
}

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

/* Cart and notification icons */
#cart-btn, #notification-btn {
  padding: 0.25rem;
  margin: 0 -0.25rem; /* Tighten the spacing */
}

/* Badge positioning */
#cart-badge, #notification-badge {
  top: -0.25rem;
  right: -0.25rem;
}

/* New category filter buttons */
.category-filter-btn.active {
  background-color: #166534 !important;
  color: white !important;
  border-color: #166534 !important;
}

/* Ensure Add to Cart links look like buttons */
a[href="shop.html"] {
  display: block;
  text-align: center;
  transition: background-color 0.2s ease;
}

a[href="shop.html"]:hover {
  background-color: #166534; /* Darker green on hover */
}

/* Add these styles to buyers.css */
#cart-dropdown {
  max-height: 300px;
  overflow-y: auto;
}

.cart-item {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.cart-item:hover {
  background-color: #f9fafb;
}

.remove-from-cart {
  transition: color 0.2s;
  padding: 0.25rem;
}

/* Animation for cart badge */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

#cart-badge.new {
  animation: pulse 0.5s ease-in-out;
}

/* Add to cart button animation */
.add-to-cart-btn {
  transition: all 0.3s ease;
}

#cart-dropdown a[href="/checkout/Cart.html"] {
  display: block;
  text-align: center;
  padding: 0.5rem;
  margin: 0.5rem;
  background-color: #1f7841;
  color: white;
  border-radius: 0.25rem;
  transition: background-color 0.2s;
}

#cart-dropdown a[href="/checkout/Cart.html"]:hover {
  background-color: #14532d;
}