.elementor-widget-mehrad_amazing_products .elementor-widget-container { overflow: visible; }

.mehrad-amazing-products {
  overflow-anchor: none;
  --mehrad-amazing-card-bg: #ffffff;
  --mehrad-amazing-card-border: #e8edf3;
  --mehrad-amazing-image-bg: #ffffff;
  --mehrad-amazing-title: #0b2a65;
  --mehrad-amazing-muted: #334e7d;
  --mehrad-amazing-price: #0b2a65;
  --mehrad-amazing-old-price: #a7b2c3;
  --mehrad-amazing-accent: #f00046;
  --mehrad-amazing-rating: #e49a15;
  --mehrad-amazing-timer-bg: #ef4352;
  --mehrad-amazing-timer-text: #ffffff;
  --mehrad-amazing-button-bg: #f00046;
  --mehrad-amazing-button-text: #ffffff;
  --mehrad-amazing-gap: 18px;
  --mehrad-amazing-per-view: 6;
  position: relative;
  direction: rtl;
  width: 100%;
  max-width: 100%;
}

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

.mehrad-amazing-products__viewport {
  overflow-anchor: none;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  direction: rtl;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-inline: contain;
  touch-action: pan-x pan-y pinch-zoom;
  cursor: grab;
  padding: 4px 2px 10px;
}

.mehrad-amazing-products__viewport::-webkit-scrollbar { display: none; }
.mehrad-amazing-products.is-dragging .mehrad-amazing-products__viewport {
  cursor: grabbing;
  scroll-behavior: auto;
  scroll-snap-type: none;
  user-select: none;
}
.mehrad-amazing-products__viewport:focus-visible {
  outline: 2px solid var(--mehrad-amazing-accent);
  outline-offset: 4px;
  border-radius: 18px;
}

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

.mehrad-amazing-products__card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 calc((100% - (var(--mehrad-amazing-gap) * (var(--mehrad-amazing-per-view) - 1))) / var(--mehrad-amazing-per-view));
  min-width: 0;
  padding: 18px 18px 16px;
  border: 1px solid var(--mehrad-amazing-card-border);
  border-radius: 20px;
  background: var(--mehrad-amazing-card-bg);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
  scroll-snap-align: start;
  box-sizing: border-box;
  direction: rtl;
  cursor: pointer;
}

.mehrad-amazing-products__card:focus-visible {
  outline: 2px solid var(--mehrad-amazing-accent);
  outline-offset: 3px;
}

.mehrad-amazing-products__timer {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  min-width: 88px;
  padding: 5px 8px 4px;
  border-radius: 6px;
  color: var(--mehrad-amazing-timer-text);
  background: var(--mehrad-amazing-timer-bg);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  direction: ltr;
  box-shadow: 0 5px 12px rgba(239, 67, 82, .2);
}

.mehrad-amazing-products__image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 14px;
  border-radius: 14px;
  background: var(--mehrad-amazing-image-bg);
  overflow: hidden;
  text-decoration: none !important;
}

.mehrad-amazing-products__image-link img,
.mehrad-amazing-products__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
}

.mehrad-amazing-products__title {
  display: -webkit-box;
  min-height: 3.4em;
  max-height: 3.4em;
  margin: 12px 0 10px;
  overflow: hidden;
  color: var(--mehrad-amazing-title);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.7;
  text-align: right;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mehrad-amazing-products__title a { color: inherit; text-decoration: none !important; }

.mehrad-amazing-products__info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
  margin-bottom: 16px;
  color: var(--mehrad-amazing-muted);
  font-size: 10px;
  font-weight: 600;
  direction: ltr;
}

.mehrad-amazing-products__rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--mehrad-amazing-rating);
  direction: ltr;
  white-space: nowrap;
}
.mehrad-amazing-products__rating span { line-height: 1; }
.mehrad-amazing-products__star {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: none;
  flex: 0 0 auto;
}
.mehrad-amazing-products__stock {
  margin-inline-start: auto;
  direction: rtl;
  color: var(--mehrad-amazing-muted);
  white-space: nowrap;
}

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

.mehrad-amazing-products__prices {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.mehrad-amazing-products__regular-row {
  display: flex;
  align-items: center;
  gap: 7px;
  direction: ltr;
}
.mehrad-amazing-products__regular-row del {
  color: var(--mehrad-amazing-old-price);
  font-size: 9px;
  font-weight: 500;
  line-height: 1;
}
.mehrad-amazing-products__discount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 20px;
  padding: 2px 6px;
  border-radius: 6px;
  color: var(--map-discount-text, #ffffff);
  background: var(--map-discount-bg, #ef5361);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.mehrad-amazing-products__current-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--mehrad-amazing-price);
  direction: ltr;
  white-space: nowrap;
}
.mehrad-amazing-products__currency {
  color: currentColor;
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
}
.mehrad-amazing-products__current-price strong {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

.mehrad-amazing-products__buy {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  color: var(--mehrad-amazing-button-text);
  background: var(--mehrad-amazing-button-bg);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--mehrad-amazing-button-bg) 28%, transparent);
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease;
}
.mehrad-amazing-products__buy:hover,
.mehrad-amazing-products__buy:focus-visible {
  color: var(--mehrad-amazing-button-text);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--mehrad-amazing-button-bg) 34%, transparent);
}
.mehrad-amazing-products__buy-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  stroke: none;
}

.mehrad-amazing-products__arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--mehrad-amazing-card-border);
  border-radius: 999px;
  color: var(--mehrad-amazing-title);
  background: var(--mehrad-amazing-card-bg);
  box-shadow: 0 8px 20px rgba(15,23,42,.12);
  transform: translateY(-50%);
  cursor: pointer;
}
.mehrad-amazing-products__arrow--prev { right: 8px; }
.mehrad-amazing-products__arrow--next { left: 8px; }
.mehrad-amazing-products__arrow-icon { width: 14px; height: 14px; fill: currentColor; stroke: none; }

.mehrad-amazing-products__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  direction: rtl;
}
.mehrad-amazing-products__dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--mehrad-amazing-card-border);
  transition: width .2s ease, background-color .2s ease;
}
.mehrad-amazing-products__dots span.is-active {
  width: 20px;
  background: var(--mehrad-amazing-accent);
}

html.dark .mehrad-amazing-products {
  --mehrad-amazing-card-bg: #202735;
  --mehrad-amazing-card-border: #354052;
  --mehrad-amazing-title: #f8fafc;
  --mehrad-amazing-muted: #aebcd0;
  --mehrad-amazing-price: #ffffff;
  --mehrad-amazing-old-price: #7f8da3;
}

@media (max-width: 1024px) {
  .mehrad-amazing-products { --mehrad-amazing-per-view: 3; }
}

@media (max-width: 767px) {
  .mehrad-amazing-products { --mehrad-amazing-per-view: 1.35; --mehrad-amazing-gap: 12px; }
  .mehrad-amazing-products__card { padding: 14px; border-radius: 18px; }
  .mehrad-amazing-products__timer { top: 18px; right: 18px; }
  .mehrad-amazing-products__buy { width: 42px; height: 42px; flex-basis: 42px; }
  .mehrad-amazing-products__current-price strong { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .mehrad-amazing-products__viewport { scroll-behavior: auto; }
  .mehrad-amazing-products * { transition-duration: .01ms !important; }
}

/* Dots stay centered; the first DOM dot is physically on the right in RTL. */
.mehrad-amazing-products__dots {
  justify-content: center;
  direction: rtl;
}

/* v1.0.42 — keep the first RTL card border fully visible and percentage order stable. */
.mehrad-amazing-products__viewport {
  padding-inline: 10px;
  box-sizing: border-box;
}
.mehrad-amazing-products__track {
  box-sizing: border-box;
}
.mehrad-amazing-products__discount {
  flex-direction: row;
  direction: ltr;
  gap: 2px;
}
.mehrad-amazing-products__discount strong,
.mehrad-amazing-products__discount span {
  font: inherit;
  line-height: 1;
}

/* Mehrad v1.0.49 — optically align the rating icon and number. */
.mehrad-amazing-products__rating {
  min-height: 13px;
  align-items: center !important;
  line-height: 0 !important;
  vertical-align: middle;
}

.mehrad-amazing-products__star {
  display: block !important;
  margin: 0 !important;
  flex: 0 0 12px;
  align-self: center;
  vertical-align: middle;
}

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