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

.mehrad-featured-category-products {
  --mehrad-fcp-bg: #ff6244;
  --mehrad-fcp-pattern: rgba(255,255,255,.10);
  --mehrad-fcp-title: #ffffff;
  --mehrad-fcp-button-bg: #ffffff;
  --mehrad-fcp-button-text: #ff6244;
  --mehrad-fcp-card-bg: #ffffff;
  --mehrad-fcp-product-frame: #efefef;
  --mehrad-fcp-product-title: #232834;
  --mehrad-fcp-price: #ff6244;
  --mehrad-fcp-price-label: #ff8b76;
  --mehrad-fcp-product-button-bg: #ff6244;
  --mehrad-fcp-product-button-text: #ffffff;
  --mehrad-fcp-gap: 12px;
  --mehrad-fcp-card-per-row: 4;
  --mehrad-fcp-image-radius: 18px;
  --mehrad-fcp-hero-width: 100%;
  --mehrad-fcp-hero-height: 260px;
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  padding: 28px 30px 28px;
  border-radius: 34px;
  background: var(--mehrad-fcp-bg);
  direction: rtl;
  isolation: isolate;
  box-sizing: border-box;
}

.mehrad-featured-category-products::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .85;
  pointer-events: none;
}
.mehrad-featured-category-products--pattern-none::before { display: none; }
.mehrad-featured-category-products--pattern-diagonal::before { background-image: repeating-linear-gradient(135deg, var(--mehrad-fcp-pattern) 0 10px, transparent 10px 24px); }
.mehrad-featured-category-products--pattern-dots::before { background-image: radial-gradient(var(--mehrad-fcp-pattern) 1.4px, transparent 1.4px); background-size: 18px 18px; }
.mehrad-featured-category-products--pattern-grid::before { background-image: linear-gradient(var(--mehrad-fcp-pattern) 1px, transparent 1px), linear-gradient(90deg, var(--mehrad-fcp-pattern) 1px, transparent 1px); background-size: 22px 22px; }
.mehrad-featured-category-products--pattern-waves::before { background-image: radial-gradient(circle at 0 0, transparent 14px, var(--mehrad-fcp-pattern) 14px, var(--mehrad-fcp-pattern) 16px, transparent 16px), radial-gradient(circle at 20px 20px, transparent 14px, var(--mehrad-fcp-pattern) 14px, var(--mehrad-fcp-pattern) 16px, transparent 16px); background-size: 40px 40px; }
.mehrad-featured-category-products > * { position: relative; z-index: 1; }

/* Image stays on the physical left, content on the physical right. */
.mehrad-featured-category-products__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  grid-template-areas: "media content";
  align-items: center;
  gap: clamp(20px, 3.5vw, 54px);
  min-height: 250px;
  margin-bottom: 18px;
  overflow: hidden;
  direction: ltr;
}

.mehrad-featured-category-products__media {
  grid-area: media;
  min-width: 0;
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.mehrad-featured-category-products__media img {
  display: block;
  width: var(--mehrad-fcp-hero-width);
  max-width: 100%;
  max-height: var(--mehrad-fcp-hero-height);
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: left center;
  transform: none;
  filter: drop-shadow(0 20px 26px rgba(0,0,0,.14));
}

.mehrad-featured-category-products__content {
  grid-area: content;
  min-width: 0;
  display: grid;
  justify-items: stretch;
  align-content: center;
  gap: 24px;
  direction: rtl;
  text-align: right;
}

.mehrad-featured-category-products__title {
  justify-self: end;
  margin: 0;
  color: var(--mehrad-fcp-title);
  font-size: clamp(24px, 2.3vw, 38px);
  line-height: 1.45;
  font-weight: 900;
  text-align: right;
}

.mehrad-featured-category-products__button {
  justify-self: end;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 32px;
  border-radius: 12px;
  background: var(--mehrad-fcp-button-bg);
  color: var(--mehrad-fcp-button-text);
  text-decoration: none !important;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
}

.mehrad-featured-category-products__viewport { overflow-x: visible; }
.mehrad-featured-category-products__track {
  display: grid;
  grid-template-columns: repeat(var(--mehrad-fcp-card-per-row), minmax(0, 1fr));
  gap: var(--mehrad-fcp-gap);
  direction: rtl;
}

.mehrad-featured-category-products__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  background: var(--mehrad-fcp-card-bg);
}

.mehrad-featured-category-products__product-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border-radius: var(--mehrad-fcp-image-radius);
  background: var(--mehrad-fcp-product-frame);
  text-decoration: none !important;
}

.mehrad-featured-category-products__product-image img,
.mehrad-featured-category-products__image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border-radius: inherit;
  object-fit: contain;
  object-position: center;
}

.mehrad-featured-category-products__product-title {
  display: -webkit-box;
  min-height: 2.9em;
  margin: 0;
  overflow: hidden;
  color: var(--mehrad-fcp-product-title);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mehrad-featured-category-products__product-title a { color: inherit; text-decoration: none !important; }

.mehrad-featured-category-products__price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mehrad-featured-category-products__price-label {
  color: var(--mehrad-fcp-price-label);
  font-size: 13px;
  font-weight: 700;
}
.mehrad-featured-category-products__price-value {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  direction: ltr;
  color: var(--mehrad-fcp-price);
  white-space: nowrap;
}
.mehrad-featured-category-products__currency {
  font-size: 10px;
  font-weight: 650;
}
.mehrad-featured-category-products__price-value strong {
  font-size: 14px;
  font-weight: 800;
}

.mehrad-featured-category-products__product-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--mehrad-fcp-product-button-bg);
  color: var(--mehrad-fcp-product-button-text);
  text-decoration: none !important;
  font-size: 12px;
  font-weight: 800;
}

html.dark .mehrad-featured-category-products {
  --mehrad-fcp-bg: #2c2e3b;
  --mehrad-fcp-title: #ffffff;
  --mehrad-fcp-card-bg: #3a3d4d;
  --mehrad-fcp-product-title: #ffffff;
}

@media (max-width: 1024px) {
  .mehrad-featured-category-products { padding: 24px 20px 20px; }
  .mehrad-featured-category-products__intro {
    grid-template-columns: minmax(0, 1fr) minmax(220px, .85fr);
    min-height: 210px;
    gap: 18px;
  }
  .mehrad-featured-category-products__media img { max-height: min(var(--mehrad-fcp-hero-height), 220px); }
}

@media (max-width: 767px) {
  .mehrad-featured-category-products { padding: 22px 14px 16px; border-radius: 24px; }
  .mehrad-featured-category-products__intro {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "media" "content";
    min-height: auto;
    gap: 14px;
    margin-bottom: 18px;
  }
  .mehrad-featured-category-products--hide-hero-mobile .mehrad-featured-category-products__media { display: none; }
  .mehrad-featured-category-products__media { justify-content: center; min-height: 0; }
  .mehrad-featured-category-products__media img {
    width: min(100%, var(--mehrad-fcp-hero-width));
    max-height: min(var(--mehrad-fcp-hero-height), 260px);
    object-position: center;
  }
  .mehrad-featured-category-products__content { justify-items: center; text-align: center; gap: 16px; }
  .mehrad-featured-category-products__title { text-align: center; font-size: 22px; }
  .mehrad-featured-category-products__button { min-height: 44px; padding-inline: 20px; font-size: 15px; }
  .mehrad-featured-category-products__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    direction: rtl;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
  }
  .mehrad-featured-category-products__viewport::-webkit-scrollbar { display: none; }
  .mehrad-featured-category-products__track { display: flex; gap: 10px; min-width: max-content; }
  .mehrad-featured-category-products__card { width: 224px; flex: 0 0 224px; }
}

/* Align the action button with the section title. */
.mehrad-featured-category-products__content {
  justify-items: start;
  align-items: start;
}
.mehrad-featured-category-products__title,
.mehrad-featured-category-products__button {
  justify-self: start;
}
@media (max-width: 767px) {
  .mehrad-featured-category-products__content {
    justify-items: center;
    align-items: center;
  }
  .mehrad-featured-category-products__title,
  .mehrad-featured-category-products__button {
    justify-self: center;
  }
}
