/* Mehrad Product Showcase - Parsan-like product strip */
.elementor-widget-mehrad_product_carousel .elementor-widget-container {
  overflow: visible;
}

.mehrad-product-carousel {
  --mehrad-product-bg: #ffffff;
  --mehrad-product-card-bg: #ffffff;
  --mehrad-product-image-bg: #ffffff;
  --mehrad-product-border: #edf1f6;
  --mehrad-product-title: #111827;
  --mehrad-product-heading: #0f172a;
  --mehrad-product-text: #7b8798;
  --mehrad-product-price: #0f172a;
  --mehrad-product-old-price: #b7c0cf;
  --mehrad-product-accent: #ef1c25;
  --mehrad-product-rating: #f5b02e;
  --mehrad-product-nav-bg: #ffffff;
  --mehrad-product-nav-color: #0f172a;
  --mehrad-product-more-bg: #ef1c25;
  --mehrad-product-more-text: #ffffff;
  --mehrad-product-dot: #c9cdd4;
  --mehrad-product-gap: 0px;
  --mehrad-product-radius: 0px;
  --mehrad-product-image-radius: 16px;
  --mehrad-product-image-size: 150px;
  --mehrad-product-per-view: 6;
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 30px 34px 26px;
  border-radius: 24px;
  background: var(--mehrad-product-bg);
  direction: ltr;
  overflow: hidden;
  box-sizing: border-box;
}

.mehrad-product-carousel--image-small { --mehrad-product-image-size: 126px; }
.mehrad-product-carousel--image-medium { --mehrad-product-image-size: 150px; }
.mehrad-product-carousel--image-large { --mehrad-product-image-size: 176px; }

.mehrad-product-carousel__placeholder {
  padding: 24px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  text-align: center;
  color: #64748b;
  background: #f8fafc;
  direction: rtl;
}

.mehrad-product-carousel__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  min-height: 38px;
  direction: rtl;
}


.mehrad-product-carousel__headline,
.mehrad-product-carousel__heading {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.mehrad-product-carousel__headline {
  gap: 14px;
  justify-content: flex-start;
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.mehrad-product-carousel__heading {
  position: relative;
  gap: 10px;
  padding-inline-start: 14px;
}

.mehrad-product-carousel__heading::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  width: 5px;
  height: 24px;
  border-radius: 999px;
  background: var(--mehrad-product-accent);
  transform: translateY(-50%);
}

.mehrad-product-carousel__title {
  margin: 0;
  color: var(--mehrad-product-heading);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.35;
  white-space: nowrap;
}

.mehrad-product-carousel__accent {
  color: var(--mehrad-product-text);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.mehrad-product-carousel__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--mehrad-product-more-text);
  background: var(--mehrad-product-more-bg);
  box-shadow: 0 10px 20px rgba(239, 28, 37, .22);
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease;
}

.mehrad-product-carousel__more:hover,
.mehrad-product-carousel__more:focus-visible {
  color: var(--mehrad-product-more-text);
  transform: translateY(0);
  text-decoration: none !important;
}

.mehrad-product-carousel__more-icon,
.mehrad-product-carousel__nav-icon {
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
}

.mehrad-product-carousel__dots {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 82px;
  direction: ltr;
  margin-inline-start: 18px;
  margin-inline-end: 0;
}


.mehrad-product-carousel--no-dots .mehrad-product-carousel__dots {
  display: none;
}

.mehrad-product-carousel__dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--mehrad-product-dot);
  opacity: .95;
  transition: width .2s ease, background-color .2s ease;
}

.mehrad-product-carousel__dots span.is-active {
  width: 20px;
  background: var(--mehrad-product-accent);
}

.mehrad-product-carousel__body {
  position: relative;
  min-width: 0;
}

.mehrad-product-carousel__viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  direction: rtl;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  overscroll-behavior-inline: contain;
  user-select: none;
}

.mehrad-product-carousel.is-dragging .mehrad-product-carousel__viewport {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.mehrad-product-carousel__viewport::-webkit-scrollbar {
  display: none;
}

.mehrad-product-carousel__viewport:focus-visible {
  outline: 2px solid var(--mehrad-product-accent);
  outline-offset: 4px;
  border-radius: 12px;
}

.mehrad-product-carousel__track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: var(--mehrad-product-gap);
  min-width: 100%;
  direction: rtl;
}

.mehrad-product-carousel__card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (var(--mehrad-product-gap) * (var(--mehrad-product-per-view) - 1))) / var(--mehrad-product-per-view));
  min-width: 0;
  padding: 22px 18px 18px;
  border-inline-start: 1px solid var(--mehrad-product-border);
  border-inline-end: 0;
  border-radius: var(--mehrad-product-radius);
  background: var(--mehrad-product-card-bg);
  scroll-snap-align: start;
  direction: rtl;
  box-sizing: border-box;
}

.mehrad-product-carousel__card:last-child {
  border-inline-end: 1px solid var(--mehrad-product-border);
}

.mehrad-product-carousel__badge {
  position: absolute;
  z-index: 2;
  top: 15px;
  inset-inline-start: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  min-height: 28px;
  padding: 3px 10px 2px;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--mehrad-product-accent), #ff4a59);
  box-shadow: 0 10px 20px rgba(239, 28, 37, .28);
  line-height: 1;
}

.mehrad-product-carousel__badge strong {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.mehrad-product-carousel__badge small {
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  opacity: .95;
}

.mehrad-product-carousel__image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(82%, var(--mehrad-product-image-size));
  aspect-ratio: 1 / 1;
  margin: 0 auto 6px;
  padding: 0;
  border-radius: var(--mehrad-product-image-radius);
  background: var(--mehrad-product-image-bg);
  text-decoration: none !important;
  box-sizing: border-box;
  overflow: hidden;
}

.mehrad-product-carousel__image-link img,
.mehrad-product-carousel__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: inherit;
  -webkit-user-drag: none;
  user-select: none;
}

.mehrad-product-carousel__product-title {
  display: -webkit-box;
  min-height: 2.95em;
  max-height: 2.95em;
  margin: 0 0 11px;
  overflow: hidden;
  color: var(--mehrad-product-title);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.48;
  text-align: right;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mehrad-product-carousel__product-title a {
  color: inherit;
  text-decoration: none !important;
}

.mehrad-product-carousel__meta {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  direction: ltr;
}

.mehrad-product-carousel__prices {
  display: grid;
  gap: 4px;
  min-width: 0;
  justify-items: start;
  text-align: left;
  direction: ltr;
  order: 1;
}

.mehrad-product-carousel__old-price {
  color: var(--mehrad-product-old-price);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.15;
  text-decoration: line-through;
  direction: ltr;
}

.mehrad-product-carousel__price {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  color: var(--mehrad-product-price);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  direction: ltr;
}

.mehrad-product-carousel__price strong {
  font: inherit;
}

.mehrad-product-carousel__currency-text {
  order: initial;
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  color: var(--mehrad-product-old-price);
}

.mehrad-product-carousel__rating {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  flex: 0 0 auto;
  order: 2;
  color: var(--mehrad-product-rating);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  direction: rtl;
}

.mehrad-product-carousel__rating-icon {
  display: block;
  width: 13px;
  height: 13px;
  fill: currentColor;
  stroke: none;
  transform: translateY(0);
}

.mehrad-product-carousel__rating span {
  line-height: 1;
}

.mehrad-product-carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: var(--mehrad-product-nav-color);
  background: var(--mehrad-product-nav-bg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
  transform: translateY(-50%);
  cursor: pointer;
}

.mehrad-product-carousel__nav--prev { inset-inline-start: 8px; }
.mehrad-product-carousel__nav--next { inset-inline-end: 8px; }

html.dark .mehrad-product-carousel {
  --mehrad-product-bg: #333241;
  --mehrad-product-card-bg: #424153;
  --mehrad-product-image-bg: #ffffff;
  --mehrad-product-border: #2e2d3a;
  --mehrad-product-title: #ffffff;
  --mehrad-product-heading: #ffffff;
  --mehrad-product-text: #cbd5e1;
  --mehrad-product-price: #ffffff;
  --mehrad-product-old-price: #a8b1c0;
  --mehrad-product-accent: #ef1c25;
  --mehrad-product-rating: #f5b02e;
  --mehrad-product-dot: #6b7280;
}

@media (max-width: 1024px) {
  .mehrad-product-carousel {
    --mehrad-product-per-view: 3;
    padding-inline: 22px;
  }

  .mehrad-product-carousel--image-small { --mehrad-product-image-size: 118px; }
  .mehrad-product-carousel--image-medium { --mehrad-product-image-size: 140px; }
  .mehrad-product-carousel--image-large { --mehrad-product-image-size: 160px; }
}

@media (max-width: 767px) {
  .mehrad-product-carousel {
    --mehrad-product-per-view: 2;
    padding: 20px 14px 18px;
    border-radius: 22px;
  }

  .mehrad-product-carousel--image-small { --mehrad-product-image-size: 104px; }
  .mehrad-product-carousel--image-medium { --mehrad-product-image-size: 126px; }
  .mehrad-product-carousel--image-large { --mehrad-product-image-size: 146px; }

  .mehrad-product-carousel__header {
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 18px;
  }

  .mehrad-product-carousel__headline {
    flex-wrap: nowrap;
    gap: 8px;
    min-width: 0;
  }

  .mehrad-product-carousel__title {
    font-size: 17px;
  }

  .mehrad-product-carousel__accent {
    font-size: 12px;
  }

  .mehrad-product-carousel__more {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 10px;
  }

  .mehrad-product-carousel__more span {
    display: none;
  }

  .mehrad-product-carousel__dots {
    min-width: 56px;
    gap: 5px;
  }

  .mehrad-product-carousel__dots span {
    width: 6px;
    height: 6px;
  }

  .mehrad-product-carousel__dots span.is-active {
    width: 16px;
  }

  .mehrad-product-carousel__card {
    padding: 18px 12px 14px;
  }

  .mehrad-product-carousel__image-link {
    margin-bottom: 7px;
    padding: 10px;
  }

  .mehrad-product-carousel__product-title {
    font-size: 11.5px;
    min-height: 2.9em;
    max-height: 2.9em;
    margin-bottom: 10px;
  }

  .mehrad-product-carousel__price {
    font-size: 13px;
  }

  .mehrad-product-carousel__currency-text {
  order: initial;
    font-size: 9.5px;
  }

  .mehrad-product-carousel__old-price {
    font-size: 9.5px;
  }

  .mehrad-product-carousel__rating {
    font-size: 10.5px;
    font-weight: 400;
  }

  .mehrad-product-carousel__rating-icon {
    width: 12px;
    height: 12px;
  }

  .mehrad-product-carousel__nav {
    width: 32px;
    height: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mehrad-product-carousel__viewport {
    scroll-behavior: auto;
  }

  .mehrad-product-carousel * {
    transition-duration: .01ms !important;
  }
}

/* Mehrad v1.0.38 — the whole product card is an accessible product link. */
.mehrad-product-carousel__card[role="link"] { cursor: pointer; }
.mehrad-product-carousel__card[role="link"]:focus-visible {
  outline: 2px solid var(--mehrad-product-accent);
  outline-offset: -2px;
}

/* Mehrad v1.0.40 — a real full-card product link that remains compatible with drag. */
.mehrad-product-carousel__card-link {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: block;
  border-radius: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mehrad-product-carousel__card-link:focus-visible {
  outline: 2px solid var(--mehrad-product-accent);
  outline-offset: -3px;
}

.mehrad-product-carousel.is-dragging .mehrad-product-carousel__card-link {
  cursor: grabbing;
}

/* v1.0.42 — percent sign is visually before the number. */
.mehrad-product-carousel__badge {
  direction: ltr;
  flex-direction: row;
}

/* Mehrad v1.0.49 — optically align the rating icon and number. */
.mehrad-product-carousel__rating {
  min-height: 14px;
  line-height: 0 !important;
  vertical-align: middle;
}

.mehrad-product-carousel__rating-icon {
  display: block !important;
  margin: 0 !important;
  flex: 0 0 13px;
  align-self: center;
  vertical-align: middle;
}

.mehrad-product-carousel__rating > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 13px;
  margin: 0;
  line-height: 13px !important;
  vertical-align: middle;
}
