@media (max-width: 1024px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  #sidebar.open {
    transform: translateX(0);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  }
  #main-content {
    margin-left: 0 !important;
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 35;
    backdrop-filter: blur(2px);
    transition: opacity 0.3s ease;
  }
  .sidebar-overlay.active {
    display: block;
  }
}

@media (min-width: 1025px) {
  #header-menu-btn {
    display: none !important;
  }
  #sidebar-close-btn {
    display: none !important;
  }
  #sidebar {
    transform: translateX(0) !important;
  }
}

.overflow-x-auto::-webkit-scrollbar {
  height: 5px;
}
.overflow-x-auto::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.overflow-x-auto::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.overflow-x-auto::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.product-category-btn {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #ffffff !important;
  font-weight: 700;
  cursor: pointer;
  border: none;
}
.product-category-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.product-category-btn:active {
  transform: translateY(0);
}

.cat-btn-breakfast {
  background-color: #ff9800 !important;
}
.cat-btn-beverages {
  background-color: #00b0ff !important;
}
.cat-btn-snacks {
  background-color: #e040fb !important;
}
.cat-btn-dairy {
  background-color: #2979ff !important;
}
.cat-btn-fruits {
  background-color: #ff1744 !important;
}
.cat-btn-vegetables {
  background-color: #00c853 !important;
}

.nutri-score-filter {
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.nutri-score-filter[data-grade=""] {
  background-color: #f3f4f6 !important;
  color: #374151 !important;
}
.nutri-score-filter[data-grade="a"] {
  background-color: #dcfce7 !important;
  color: #15803d !important;
}
.nutri-score-filter[data-grade="b"] {
  background-color: #ecfccb !important;
  color: #4d7c0f !important;
}
.nutri-score-filter[data-grade="c"] {
  background-color: #fef9c3 !important;
  color: #a16207 !important;
}
.nutri-score-filter[data-grade="d"] {
  background-color: #ffedd5 !important;
  color: #c2410c !important;
}
.nutri-score-filter[data-grade="e"] {
  background-color: #fee2e2 !important;
  color: #b91c1c !important;
}

.nutri-score-filter:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.product-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover {
  transform: translateY(-3px);
}

.recipe-card {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.recipe-card:hover {
  transform: translateY(-3px);
}

#product-detail-modal > div {
  animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}