.afpw-grid,
.afpw-carousel,
.afpw-card {
  box-sizing: border-box;
}

.afpw-grid *,
.afpw-carousel * {
  box-sizing: border-box;
}

.afpw-grid {
  --afpw-columns: 5;
  display: grid;
  grid-template-columns: repeat(var(--afpw-columns), minmax(0, 1fr));
  gap: 10px;
  direction: rtl;
}

.afpw-card {
  position: relative;
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  color: #111111;
  background: #ffffff;
  font-family: "Shabnam-Medium-FD", sans-serif;
}

.afpw-card__image-link,
.afpw-card__image {
  display: block;
  width: 100%;
}

.afpw-card__image {
  position: relative;
  overflow: hidden;
  background: #ffffff;
}

.afpw-card__image img {
  display: block;
  width: 100%;
  height: 160px;
  margin: 0;
  object-fit: contain;
  object-position: center;
}

.afpw-card__image-secondary {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 200ms ease;
}

.afpw-card--image-hover:hover .afpw-card__image-secondary,
.afpw-card--image-hover:focus-within .afpw-card__image-secondary {
  opacity: 1;
}

.afpw-card__badge {
  position: absolute;
  z-index: 2;
  top: 10px;
	right: 10px;
	left: auto;
  display: inline-flex;
  min-width: 20px;
  min-height: 20px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 5px;
  color: #ffffff;
  font-size: 12px;
  line-height: 1;
}

.afpw-card__badge--sale {
  background: #e56d6e;
}

.afpw-card__badge--stock {
  background: #555555;
}

.afpw-card__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  text-align: right;
  direction: rtl;
}

.afpw-card__category {
  margin: 0 0 2px;
  color: #e56d6e;
  font-size: 13px;
  line-height: 1.5;
}

.afpw-card__category a {
  color: inherit;
  text-decoration: none;
}

.afpw-card__title {
  display: -webkit-box;
  min-height: 3.1em;
  margin: 0;
  overflow: hidden;
  color: #111111;
  font-family: "Shabnam-Bold-FD", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.afpw-card__title a {
  color: inherit;
  text-decoration: none;
}

.afpw-card__rating {
  margin-top: 5px;
  color: #ffb900;
  font-size: 15px;
}

.afpw-card__rating .star-rating {
  float: none;
  margin-inline: 0;
}

.afpw-card__price {
  margin-top: 10px;
  color: #00796b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
}

.afpw-card__price del {
  display: block;
  color: #555555;
  font-size: 0.88em;
  font-weight: 400;
  opacity: 1;
}

.afpw-card__price ins {
  display: block;
  color: inherit;
  text-decoration: none;
}

.afpw-card__button {
  display: inline-flex;
	width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  color: #ffffff !important;
  background: #00796b;
  font: inherit;
  text-decoration: none !important;
  transition: background-color 160ms ease;
}

.afpw-badge-position-left .afpw-card__badge {
	right: auto;
	left: 10px;
}

.afpw-card__button:hover,
.afpw-card__button:focus-visible {
  color: #ffffff !important;
  background: #111111;
}

.afpw-card__button svg {
  flex: 0 0 auto;
  fill: currentColor;
}

.afpw-card--carousel .afpw-card__content {
  min-height: 100px;
  padding: 0;
  text-align: center;
}

.afpw-card--carousel .afpw-card__image {
  background: #f2f2f2;
}

.afpw-card--carousel .afpw-card__image img {
  height: 250px;
  object-fit: cover;
}

.afpw-carousel {
  --afpw-slides: 5;
  --afpw-gap: 0px;
  position: relative;
  min-width: 0;
  direction: rtl;
}

.afpw-carousel__track {
  display: flex;
  gap: var(--afpw-gap);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}

.afpw-carousel__track::-webkit-scrollbar {
  display: none;
}

.afpw-carousel__slide {
  flex: 0 0 calc((100% - (var(--afpw-slides) - 1) * var(--afpw-gap)) / var(--afpw-slides));
  min-width: 0;
  scroll-snap-align: start;
}

.afpw-carousel__arrow {
  position: absolute;
  z-index: 3;
  top: 94px;
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #111111;
  background: #ffffff;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease;
}

.afpw-carousel__arrow:hover,
.afpw-carousel__arrow:focus-visible {
  color: #ffffff;
  background: #111111;
}

.afpw-carousel__arrow svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.afpw-carousel__arrow--prev {
  left: -60px;
}

.afpw-carousel__arrow--next {
  right: -60px;
}

.afpw-carousel__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.afpw-carousel__dots button {
  width: 8px;
  min-width: 8px;
  height: 8px;
  min-height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #c6c6c6;
}

.afpw-carousel__dots button[aria-current="true"] {
  background: #111111;
}

.afpw-empty {
  padding: 20px;
  border: 1px solid #c7c7c7;
  color: #111111;
  background: #f2f2f2;
  font-family: "Shabnam-Medium-FD", sans-serif;
  text-align: center;
}

@media (max-width: 1024px) {
  .afpw-grid {
    --afpw-columns: 3;
  }

  .afpw-carousel {
    --afpw-slides: 3;
  }

  .afpw-carousel__arrow--prev {
    left: 0;
  }

  .afpw-carousel__arrow--next {
    right: 0;
  }
}

@media (max-width: 767px) {
  .afpw-grid {
    --afpw-columns: 2;
    gap: 0;
  }

  .afpw-carousel {
    --afpw-slides: 2;
  }

  .afpw-card__image img,
  .afpw-card--carousel .afpw-card__image img {
    height: 120px;
  }

  .afpw-card__title {
    font-size: 14px;
  }

  .afpw-card__price {
    font-size: 14px;
  }

  .afpw-carousel__arrow {
    top: 35px;
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .afpw-card__image-secondary,
  .afpw-card__button,
  .afpw-carousel__arrow {
    transition: none;
  }

  .afpw-carousel__track {
    scroll-behavior: auto;
  }
}
