:root {
  --main-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hover-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --nav-shadow: 0 10px 30px var(--shadow-color);
  --shadow-transition: box-shadow 0.3s ease-in-out;
  --shadow-transition: box-shadow 0.3s ease-in-out;
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --text-color: #333;
}

.carousel-inner img {
  width: 100%;
  height: 100%;
}

.carousel-container {
  position: relative;
}
#category-carousel {
  padding: 10px;
  display: flex;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}
.category-card {
  flex: 0 0 calc(20% - 20px);
  margin: 0 10px;
  scroll-snap-align: start;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.category-card:hover {
  box-shadow: 0 6px 15px var(--shadow-color);
}
.category-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.category-card h3 {
  padding: 15px;
  margin: 0;
  background-color: white;
  color: var(--primary-color);
  font-size: 1.1rem;
  text-align: center;
}
.category-card a {
  text-decoration: none;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease, background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-btn:hover {
  opacity: 1;
  background-color: #2980b9;
}
.carousel-btn.prev {
  left: -20px;
}
.carousel-btn.next {
  right: -20px;
}
.carousel-btn.hidden {
  display: none;
}

@media (max-width: 991px) {
  .category-card {
    flex: 0 0 calc(35% - 20px);
  }
}
@media (max-width: 576px) {
  .category-card {
    flex: 0 0 calc(45% - 20px);
  }
}
@media (max-width: 480px) {
  .category-card {
    flex: 0 0 calc(50% - 20px);
  }
}

.carousel-btn.prev {
  left: auto;
  right: 10px;
}

.carousel-btn.next {
  right: auto;
  left: 10px;
}

.carousel-btn.prev::after {
  content: "\2039";
  font-weight: bold;
}

.carousel-btn.next::after {
  content: "\203A";
  font-weight: bold;
}

/* img {
  object-fit: cover;
  width: 100%;
  height: 100%;
} */

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card {
  /* height: 10%; */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-img-top {
  flex-shrink: 0;
  height: 200px;
  object-fit: cover;
}

@media (max-width: 578px) {
  .card-img-top {
    height: 350px;
  }
}

.card-item {
  overflow: hidden;
  flex: 0 0 auto;
  width: 100%;
  box-shadow: var(--main-shadow);
  transition: var(--shadow-transition);
}

media (min-width: 576px) {
  .card-item {
    width: calc(50% - 0.5rem);
  }
}

@media (min-width: 768px) {
  .card-item {
    width: calc(33.33% - 0.75rem);
  }
}

@media (min-width: 991px) {
  .card-item {
    width: calc(25% - 0.75rem);
  }
}

.card-item:hover {
  box-shadow: var(--hover-shadow);
}

.card-item .card-title {
  font-weight: normal;
  text-align: center;
}

.card-item .item-price {
  font-weight: bold;
  font-size: 1.125rem;
  text-align: center;
}

.card-title {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-price {
  color: var(--secondary-color);
}

.card-item a {
  text-decoration: none;
}
