/* ------------------------------------- */
/* متغیر مقیاس‌دهی فونت */
/* ------------------------------------- */
:root {
  --card-font-scale: 0.8rem; /* کاهش از 1rem به 0.8rem = 20% کوچک‌تر */
}

/* ------------------------------------- */
/* 1. استایل کارت‌های محصول (amb-modules-slider-product-card) */
/* ------------------------------------- */
.amb-modules-slider {
  margin: 5px 0 0 5px !important
}
.amb-modules-slider-product-card {
  border: 1px solid #e9ecef;
  transition: box-shadow 0.3s, transform 0.3s;
  height: 415px;
  background-color: white;
  border-radius: 0.75rem !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* تنظیم مبنای فونت برای کل کارت */
  font-size: var(--card-font-scale);
}
/* کلاس اصلاح شده: amb-modules-slider-card-img-top */
.amb-modules-slider-card-img-top {
  object-fit: contain;
  width: 100%;
  height: 100%;
  
}
/* کلاس اصلاح شده: amb-modules-slider-image-container */
.amb-modules-slider-image-container {
  padding: 0.5rem;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
  .amb-modules-slider-product-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);

  }

@media (min-width: 1350px) {
  .amb-modules-slider-swiper {
    margin-left: auto;
    margin-right: auto;
  }
}



/* بدنه کارت */
.amb-modules-slider-card-body {
  padding: 0.5rem 0.75rem !important;
  border-top: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.amb-modules-slider-title {
  font-family: 'Estedad-FD','sans-serif' !important;

}
/*@media (max-width: 600px) {
  .amb-modules-slider-swiper {
    margin: 5px 10px 0 0 !important;
  }
}
@media (min-width: 1200px) {
  .amb-modules-slider-swiper {
    margin: 30px 90px 0 0 !important;
  }
}*/
/* کلاس اصلاح شده: amb-modules-slider-product-title */
.amb-modules-slider-product-title {
  color: #343a40;
  font-size: 1rem;
  margin-bottom: 0.6rem; /* کاهش مارجین پایین */
  font-weight: 500;

}
 
/* کلاس اصلاح شده: amb-modules-slider-line-clamp-2 */
.amb-modules-slider-line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ------------------------------------- */
/* برچسب‌های روی عکس (Badges) */
/* ------------------------------------- */
.amb-modules-slider-badge-base {
  position: absolute;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  font-size: 0.9rem; /* نسبی به مبنای کارت */
  font-weight: 700;
  line-height: 1;
  border-radius: 0.2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  color: white;
  text-align: center;
  will-change: clip-path, transform;
  clip-path: polygon(5% 5%, 100% 0%, calc(100% - 4px) 100%, 1% 100%);
  border-radius: 0.2rem 0.1rem 0.1rem 0.1rem;
}

.amb-modules-slider-badge-special-sale {
  background-color: #cf0056;
  color: white;
}

.amb-modules-slider-badge-installment {
  background-color: #0d6efd;
  color: white;
}

.amb-modules-slider-badge-shape-diagonal-right {
}

.amb-modules-slider-badge-top-right {
  top: 12px;
  right: 12px;
}

.amb-modules-slider-badge-bottom-left {
  bottom: 12px;
  left: 12px;
}

/* ------------------------------------- */
/* 2. ساختار Flexbox قیمت */
/* ------------------------------------- */
.amb-modules-slider-price-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin-top: auto;
  padding: 0.4rem 0;
}

.amb-modules-slider-discount-badge {
  order: 1;
  background-color: #dc3545;
  color: white;
  font-size: 1.2rem; /* نسبی به مبنای کارت */
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.1rem 0.4rem;
  line-height: 1.2;
  margin-inline-end: auto;
  flex-shrink: 0;
}

.amb-modules-slider-price-wrapper {
  order: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

/* قانون جدید برای وسط چین کردن قیمت زمانی که تنها عنصر است */
.amb-modules-slider-price-container > .amb-modules-slider-price-wrapper:only-child {
  margin-inline-start: auto;
  margin-inline-end: auto;
  align-items: center;
}

.amb-modules-slider-price-old {
  color: #adb5bd;
  text-decoration: line-through;
  font-size: 1.3rem; /* نسبی به مبنای کارت */
  line-height: 1;
}

.amb-modules-slider-price-current-group {
  display: flex;
  align-items: baseline;
  font-weight: 500;
  color: #011b18;
}

.amb-modules-slider-price-current-value {
  font-size: 1.5rem; /* نسبی به مبنای کارت */
}

.amb-modules-slider-price-current-toman {
  font-size: 0.7rem; /* نسبی به مبنای کارت */
  color: #011b18;
  margin-inline-start: 0.3rem;
}

/* ------------------------------------- */
/* 3. استایل دکمه‌های ناوبری */
/* ------------------------------------- */
.amb-modules-slider-nav-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 6px;
  direction: ltr;
}

.amb-modules-slider-nav-btn {
  width: 28px !important;
  height: 28px !important;
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.7);
  border: 0.2px solid #495057;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

  .amb-modules-slider-nav-btn:hover:not(.swiper-button-disabled) {
    background-color: #212529;
    border-color: #212529;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .amb-modules-slider-nav-btn svg {
    width: 18px;
    height: 18px;
  }




.amb-container {
  width: 100%;
  margin-inline: auto;
  padding-inline: 15px;
  box-sizing: border-box;
  max-width: 100%;
}

/* ≥576px */
@media (min-width: 576px) {
  .amb-container {
    max-width: 95%;
  }
}
