body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
}

.swiper {
  width: 100%;
  padding: 20px 0;
  height: fit-content ;
  

}

.swiper-wrapper {
  display: flex;
  justify-content: center;
}
.swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 10px;
  height: auto;
  min-height: 200px;
  width: 100%;
  max-width: 300px;
}
.swiper-slide img {
  width: 100%;
  height: 100%;
  margin-bottom: 10px;
  max-height: 170px;
  min-height: 170px;
  object-fit: cover;
  border-radius: 0px;
}
.swiper-slide h3,
.swiper-slide p {
  margin: 5px 0;
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-align: right;
  width: -webkit-fill-available;
}

.product-info h3 {
  margin: 5px 0;
  font-size: 18px;
}
.product-info p {
  margin: -12px 0px 8px 0px;
  font-size: 14px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3em;
  line-height: 1.5em;
}
.price {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}
.price .old-price {
  text-decoration: line-through;
  color: #923838;
  font-size: small;
}
.promotion-title {
  background-color: rgba(248, 113, 113, var(--tw-bg-opacity));
  border-radius: 0.375rem;
  line-height: 1.25rem;
  margin: 0;
  opacity: 0.8;
  padding: 0.25rem 0.75rem;
  position: absolute;
  top: 1rem;
  width: auto;
  z-index: 10;
}

.price .new-price {
  color: #000000;
  font-weight: bold;
}
.add-to-cart {
  margin-top: 10px;
  padding: 4px 9px;
  background-color: #00000000;
  color: #000000;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  border: solid 0.5px;
}

/* الأزرار متجاوبة مع الأجهزة */
.swiper-button-next,
.swiper-button-prev {
  color: #000 !important;
  width: 30px;
  height: 30px;
}

@media (max-width: 768px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 380px) {
  .promotion-title {
    font-size: small;
  }
}

@media (max-width: 400px) {
  .promotion-title {
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .promotion-title {
    font-size: 11px;
  }
}

@media (min-width: 500px) {
  .promotion-title {
    font-size: large;
  }
}

@media (max-width: 500px) {
  .swiper-slide {
    max-width: 90%;
    padding: 15px;
    width: 140px !important;
  }
  .swiper-slide img {
    max-height: 180px;
  }
  .swiper-slide h3 {
    font-size: 1.2em;
  }
  .swiper-slide p {
    font-size: 1em;
  }
}

@media (max-width: 800px) {
  .swiper-slide {
    max-width: 90%;
    padding: 8px;
    width: 150px !important;
  }
}

@media (min-width: 500px) {
  .swiper-slide {
    max-width: 90%;
    padding: 10px;
  }
}
