/* Produce cards with aggressive selectors */
body .produce-item-card,
body div.produce-item-card,
.produce-item-card,
.produce-items > div > .produce-item-card,
div.produce-items div.produce-item-card,
div[style*="width"] > div.produce-item-card {
  height: 22px !important;
  font-size: 0.75rem !important;
  padding: 0 0.15rem !important;
  line-height: 1.2 !important;
  margin-bottom: 2px !important;
  max-height: 22px !important;
  min-height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 3px !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
  border: none !important;
  transition: all 0.1s ease-in-out !important;
  cursor: pointer !important;
}

/* Hover effect for produce cards */
body .produce-item-card:hover,
body div.produce-item-card:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

body .produce-item-card label,
body div.produce-item-card label,
.produce-item-card label,
.produce-items > div > .produce-item-card label,
div.produce-items div.produce-item-card label,
div[style*="width"] > div.produce-item-card label {
  font-size: 0.75rem !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
  max-height: 22px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  cursor: pointer !important;
}

/* Hide checkboxes completely */
body .produce-checkbox {
  display: none !important;
}

/* Style for selected produce items */
body .produce-item-card.selected,
body div.produce-item-card.selected {
  background-color: #28a745 !important; /* Green color */
  color: white !important;
  border: none !important;
  font-weight: bold !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  transform: scale(1.02) !important;
}

/* Hover style for selected produce items - keep them green */
body .produce-item-card.selected:hover,
body div.produce-item-card.selected:hover {
  background-color: #218838 !important; /* Slightly darker green on hover */
  color: white !important;
  border: none !important;
}

body .produce-category-header {
  display: none !important;
}

body .produce-category-content.active,
body div.produce-category-content.active,
.produce-category-content.active {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0.25rem !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  margin-bottom: 0 !important;
  border-radius: 0 0 4px 4px !important;
}

body .produce-items {
  margin: 0 !important;
}

body .produce-category-btn {
  padding: 0.5rem 0.25rem !important;
  margin: 0 !important;
  border-radius: 4px !important;
  font-size: 0.8rem !important;
  text-align: center !important;
  white-space: normal !important; /* Allow text wrapping */
  overflow: visible !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.1 !important;
  word-break: break-word !important;
}

body .produce-category-btn:not(.active) {
  border-radius: 4px !important;
}

body .produce-category-btn.active {
  border-radius: 4px !important;
  margin: 0 !important;
  font-weight: bold !important;
}

/* Hide icons on category buttons to save space */
body .produce-category-btn i {
  display: none !important;
}

/* Size and positioning for each category item */
body .category-grid-item {
  margin: 0 !important;
  position: relative !important;
  z-index: 1 !important;
  height: auto !important;
  min-height: 45px !important;
}

/* Styling for the category content container when collapsed */
body .produce-category-content {
  margin: 0 !important;
  display: none !important; /* Hide completely when not active */
  height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  background-color: var(--bs-dark) !important;
  border-radius: 0 0 4px 4px !important;
  width: 100% !important;
  grid-column: 1 / span 2 !important; /* Span both columns */
}

/* Styling for the category content container when expanded/active */
body .produce-category-content.active {
  display: block !important;
  height: auto !important;
  width: 100% !important;
  max-height: 250px !important;
  overflow-y: auto !important;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
  padding: 0.5rem !important;
  margin-top: 5px !important;
  margin-bottom: 10px !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
  position: relative !important;
  z-index: 10 !important;
  clear: both !important;
}

/* 3x3 grid for produce items */
body .produce-grid-item {
  width: 33.333% !important; /* 3 items per row */
  padding: 0 2px !important;
  margin-bottom: 4px !important;
}

/* Adjust the produce items container to work with 3x3 grid */
body .produce-items {
  display: flex !important;
  flex-wrap: wrap !important;
  width: 100% !important;
  margin: 0 !important;
}

/* 2x2 grid for category buttons */
body .category-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  grid-template-rows: repeat(2, minmax(30px, auto)) !important;
  gap: 10px !important;
  width: 100% !important;
  position: relative !important;
  z-index: 1 !important;
}