.home {
  min-height: 35rem;
}

.home .hero {
  padding: 2rem 0;
  overflow: hidden !important;
}

.carousel {
  position: relative;
  width: 100%;
  max-height: 25rem;
  overflow: hidden; /* Hide anything that overflows the container */
}

.carousel-inner {
  display: flex;
  width: 100%; /* Ensure it takes full width */
}

.carousel-item,
.carousel-item-sm {
  width: 100%; /* Each item takes the full width of the carousel */
  flex-shrink: 0; /* Prevent items from shrinking */
  display: none; /* Hide slides initially */
  opacity: 0;
  z-index: -1; /* Hide inactive slides */
  transition: opacity 1s ease-in-out, z-index 0s 1s; /* Fade transition with delayed z-index change */
}

.carousel-item.active,
.carousel-item-sm.active {
  display: block; /* Show the active slide */
  opacity: 1; /* Make the active slide fully visible */
  z-index: 1; /* Ensure the active slide is on top */
}

.carousel-item img {
  width: 100%;
  height: 25rem;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.carousel-dots {
  text-align: center;
  position: absolute;
  bottom: 15px;
  width: 100%;
  z-index: 2;
}

.dot {
  height: 12px;
  width: 12px;
  margin: 0 5px;
  background-color: #838282;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: var(--secondary-color);
  width: 20px;
  border-radius: 5px;
}

.home .offers {
  padding: 2rem 0;
}

.home .offers .list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 1rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid #dcdcdcc1;
  background-color: rgba(1, 51, 36, 0.056);
}

.home .offers .list .offer {
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 1rem;
  border-right: 1px solid #dcdcdc;
  padding-right: 1rem;
}

.home .offers .list .offer:last-child {
  border-right: none;
  padding-right: none;
}

.home .offers .list .offer h3 {
  font-size: 0.9rem;
  font-weight: 600;
}

.home .offers .list .offer p {
  font-size: 0.8rem;
  font-weight: 300;
}

.best-products {
  margin-bottom: 1.5rem;
}

.best-products .products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-gap: 1rem;
}

.best-products .products .card {
  background-color: rgba(1, 51, 36, 0.03);
  padding: 8px;
}

.best-products .products .card img {
  width: 100%;
  height: 12rem;
  object-fit: contain;
  transition: all 0.3s ease;
}

.best-products .products .card:hover img {
  transform: scale(1.03);
}

.best-products .products .card .info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.best-products .products .card .info .name {
  font-weight: 400;
  font-size: 0.9rem;
}

.recents {
  padding-bottom: 3rem;
}

.recents .row {
  display: flex;
  align-items: start;
  justify-content: start;
  gap: 2rem;
}

.recents .row .carousel {
  width: 40%;
}

.carousel-item-sm img {
  width: 100%;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

.recents .row .slider-container {
  position: relative;
  width: 60%;
}

.recents .row .newest {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1rem;
}
.recents .row .newest .product-card {
  background-color: rgba(1, 51, 36, 0.03);
  padding: 8px;
  border-radius: 4px;
  position: relative;
  transition: all 0.3s ease;
}

.recents .row .newest .product-card img {
  height: 10rem;
  width: 100%;
  object-fit: contain;
}

.recents .row .newest .product-card h4 {
  font-size: 0.9rem;
  font-weight: 500;
}

.recents .row .newest .product-card .price {
  position: absolute;
  top: 4px;
  right: 0px;
  background-color: white;
  color: var(--primary-color);
  font-weight: 500;
  padding: 2.5px 5px;
  min-width: 50px;
  border-radius: 3px;
  font-size: 0.9rem;
}

.recents .row .newest .product-card .arrow {
  width: 30px;
  height: 30px;
  background-color: white;
  border-radius: 50%;
  cursor: pointer;
  position: absolute;
  bottom: 4px;
  right: 4px;
  display: none;
}

.recents .row .newest .product-card:hover {
  transform: scale(1.02);
}

.recents .row .newest .product-card:hover .arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: white;
}

.recents .row .newest .product-card p {
  padding-top: 2.5px;
  font-size: 0.7rem;
  font-weight: 300;
  color: rgb(74, 74, 74);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.slider-btn {
  position: absolute;
  top: 45%;
  width: 40px;
  height: 40px;
  background-color: white;
  border: 1px solid #ccc;
  outline: none;
  z-index: 1;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-btn:hover {
  background-color: var(--secondary-color);
  color: white;
}

.left {
  left: -20px;
}

.right {
  right: -20px;
}

.shop-bulk {
  margin: 2rem 0;
  margin-bottom: 4rem;
  background-color: #f7651116;
}

.shop-bulk .container {
  padding: 0 10vw;
  display: flex;
  align-items: center;
  justify-content: start;
  gap: 3rem;
}

.shop-bulk .container .left {
  width: 45%;
}

.shop-bulk .container .left img {
  width: 100%;
  height: 20rem;
  object-fit: contain;
  margin-bottom: -3rem !important;
}

.shop-bulk .container .right {
  width: 55%;
  padding: 2rem 0;
}

.shop-bulk .container .right h2 {
  padding-bottom: 1rem;
  font-weight: 900;
  font-size: 3rem;
}

.shop-bulk .container .right p {
  font-size: 0.9rem;
  padding-bottom: 1rem;
  line-height: 1.4rem;
}

.shop-bulk .container .right .btn {
  margin-top: 1.2rem;
  padding-bottom: 2rem;
}

.shop-bulk .container .right .btn a {
  padding: 0.7rem 1rem;
  color: var(--secondary-color);
  border: 1.6px solid var(--secondary-color);
  background-color: white;
  font-weight: 600;
}

@media only screen and (max-width: 997px) {
  .carousel {
    max-height: 20rem;
  }

  .home .offers .list {
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 0.5rem;
    padding: 0.5rem;
  }

  .home .offers .list .offer {
    gap: 0.5rem;
    border-right: 1px solid #dcdcdc;
    padding-right: 0.5rem;
  }

  .home .offers .list .offer:last-child {
    border-right: none;
    padding-right: none;
  }

  .home .offers .list .offer h3 {
    font-size: 0.85rem;
  }

  .home .offers .list .offer p {
    font-size: 0.7rem;
  }

  .best-products .products {
    grid-template-columns: repeat(3, 1fr);
  }

  .best-products .products .card img {
    height: 10rem;
  }

  .recents .row .carousel {
    display: none;
  }

  .recents .row .slider-container {
    width: 100%;
  }

  .recents .row .newest {
    grid-template-columns: repeat(3, 1fr);
  }

  .shop-bulk {
    margin-bottom: 3rem;
  }

  .shop-bulk .container {
    padding: 0 5vw;
    gap: 1rem;
  }

  .shop-bulk .container .left {
    width: 45%;
  }

  .shop-bulk .container .left img {
    margin-bottom: -2rem !important;
  }

  .shop-bulk .container .right {
    padding: 1rem 0;
  }

  .shop-bulk .container .right h2 {
    font-size: 2rem;
  }

  .shop-bulk .container .right p {
    font-size: 0.8rem;
    line-height: 1.2rem;
  }

  .shop-bulk .container .right .btn {
    margin-top: 1rem;
    padding-bottom: 1rem;
  }

  .shop-bulk .container .right .btn a {
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
  }
}

@media only screen and (max-width: 700px) {
  .home .offers .list {
    grid-template-columns: repeat(2, 1fr) !important;
    grid-gap: 0.5rem;
    padding: 0.5rem;
  }

  .home .offers .list .offer {
    border-right: none;
  }

  .best-products .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media only screen and (max-width: 560px) {
  .carousel {
    max-height: 17rem;
  }

  .best-products .products {
    max-width: 300px;
    margin: 0 auto;
    grid-template-columns: repeat(1, 1fr);
  }

  .shop-bulk .container {
    padding: 0 2.5vw;
  }

  .shop-bulk .container .left {
    display: none;
  }

  .shop-bulk .container .right {
    width: 100%;
  }
  .shop-bulk .container .right h2 {
    font-size: 1.5rem;
  }

  .shop-bulk .container .right .btn a {
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
  }

  .recents .row .newest {
    max-width: 250px;
    margin: 0 auto;
    grid-template-columns: repeat(1, 1fr);
  }

  .left {
    left: 20px;
  }

  .right {
    right: 20px;
  }
}

@media only screen and (max-width: 360px) {
  .home .offers .list {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}
