/* Front page only */
/* Hero */
.hero{padding:16px 0}
.hero .slider{border:1px solid var(--line);border-radius:14px;height:240px;display:grid;place-items:center;color:var(--muted)}


/* ===== هدر بخش فروشگاه‌ها ===== */
.home-stores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.home-stores-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

/* لینک "تمام فروشگاه‌ها" */
.home-stores-viewall {
  font-size: 13px;
  padding: 6px 12px;
  background: var(--surface-muted);
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  transition: .18s ease;
}

.home-stores-viewall:hover {
  background: var(--line);
  color: var(--ink);
}

/* ===== گرید فروشگاه‌ها ===== */
.mc-stores-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0,1fr));
  gap: 14px;
  align-items: center;
}

.mc-store {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  text-align: center;
}

.mc-store img {
  width: 93px;
  height: 93px;
  object-fit: contain;
  background: var(--white);
  border-radius: 12px;
}

.mc-store > .mc-store-logo--icon {
  width: 93px;
  height: 93px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--muted-light);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* اسم فروشگاه */
.mc-store-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

/* تعداد کوپن‌ها */
.mc-store-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-muted);
  padding: 2px 8px;
  border-radius: 999px;
}

/* رسپانسیو */
@media (max-width:1024px){
  .mc-stores-row { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (max-width:768px){
  .mc-stores-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width:480px){
  .mc-stores-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ====== سکشن ویژه: گرید تطبیقی ====== */
.mc-coupons--featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin: 0 0 40px 0;
}

/* ====== کارت عمودی ویژه ====== */

/* عنوان اختصاصی برای سکشن تخفیف‌های ویژه */
.home-featured-title {
  font-size: 1.3rem;      /* دقیقاً مثل فروشگاه‌های محبوب */
  font-weight: 700;
  margin: 24px 0 12px;    /* فاصله‌ها هم مثل هم */
  line-height: 1.4;
}

.mc-coupons--featured .mc-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 20px;
  gap: 16px;
  height: 100%;
}

/* درصد + لوگو بالا */
.mc-coupons--featured .mc-card__media {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

/* متن زیر مدیا */
.mc-coupons--featured .mc-card__body {
  width: 100%;
  padding: 0;
}

/* عنوان */
.mc-coupons--featured .mc-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.5;
}

/* حذف چیزهای اضافی */
.mc-coupons--featured .mc-card__meta,
.mc-coupons--featured .mc-card__excerpt {
  display: none;
}

/* دکمه تمام عرض و پایین کارت */
.mc-coupons--featured .mc-card__cta {
  margin-top: auto;
  width: 100%;
}

.mc-coupons--featured .mc-card__cta a {
  width: 100%;
  height: 46px;
  border-radius: 10px;
}

/* موبایل */
@media (max-width: 600px) {
  .mc-coupons--featured {
    grid-template-columns: 1fr;
  }
}
/* عنوان اختصاصی برای سکشن آخرین تخفیف ها */
.home-latest-title {
  font-size: 1.3rem;      /* دقیقاً مثل فروشگاه‌های محبوب */
  font-weight: 700;
  margin: 24px 0 12px;    /* فاصله‌ها هم مثل هم */
  line-height: 1.4;
}
/* تنظیم نهایی فاصله دکمه در کارت‌های تخفیف ویژه (دسکتاپ و موبایل) */
.mc-coupons--featured .mc-card {
  display: flex;
  flex-direction: column;
  height: auto;
  gap: 8px; /* فاصله منطقی بین بخش‌ها */
}

/* دکمه دیگر به زور به ته کارت نچسبد */
.mc-coupons--featured .mc-card__cta {
  margin-top: 0 !important;   /* مهم: قبلاً auto بود */
}

/* کمی فاصله کوچک قبل از دکمه، که چسبیده نباشه */
.mc-coupons--featured .mc-card__body {
  margin-bottom: 6px !important;
}
/* توضیحات انتهای صفحه اصلی با دکمه "بیشتر" */
.home-bottom-wrapper {
    font-size: 15px;
    line-height: 2;
    color: var(--ink-alt);
    position: relative;
}

.home-bottom-content {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

/* حالت جمع شده: فقط چند خط (ارتفاع را می‌توانی کم/زیاد کنی) */
.home-bottom-content.is-collapsed {
    max-height: 170px; /* مثلاً حدود ۳–۴ خط؛ اگر کم/زیاد است این مقدار را تنظیم کن */
}

/* فید پایین متن در حالت جمع شده */
.home-bottom-content .home-bottom-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 60px;
    pointer-events: none;
    background: linear-gradient(to top, var(--white) 40%, var(--white-0));
}

/* در حالت باز، فید حذف می‌شود و ارتفاع آزاد است */
.home-bottom-content.is-expanded {
    max-height: none;
}

.home-bottom-content.is-expanded .home-bottom-fade {
    display: none;
}

.home-bottom-toggle {
    margin: 14px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;

    background: var(--surface-neutral);
    border: 1px solid var(--line-alt);
    border-radius: 30px;

    font-size: 14px;
    font-weight: 500;
    color: var(--ink-alt);

    cursor: pointer;
    transition: all .25s ease;
}

.home-bottom-toggle:hover {
    background: var(--line-soft);
    border-color: var(--line-gray);
}

.home-bottom-toggle:active {
    transform: scale(.97);
}
.home-bottom-toggle .icon {
    transition: transform .25s ease;
}

.home-bottom-toggle.expanded .icon {
    transform: rotate(180deg);
}



@media (max-width:768px){
  .mc-stores-row .mc-store img,
  .mc-stores-row .mc-store > .mc-store-logo--icon{width:80px;height:80px;}
}
@media (max-width:480px){
  .mc-stores-row .mc-store img,
  .mc-stores-row .mc-store > .mc-store-logo--icon{width:72px;height:72px;}
}

/* =========================================================
   آخرین مطالب وبلاگ — صفحه اصلی
========================================================= */
.home-blog {
  margin: 42px 0 8px;
  direction: rtl;
}

.home-blog-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.home-blog-title {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: 700;
}

.home-blog-header-line {
  flex: 1 1 auto;
  height: 1px;
  border-top: 1px dashed var(--line);
}

.home-blog-viewall {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color .18s ease;
}

.home-blog-viewall:hover {
  color: var(--brand);
}

.home-blog-viewall svg,
.home-blog-card-more svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.home-blog-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
}

.home-blog-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-muted);
}

.home-blog-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.home-blog-card:hover .home-blog-card-image {
  transform: scale(1.025);
}

.home-blog-card-placeholder {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.home-blog-card-placeholder svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-blog-card-body {
  padding: 14px 14px 15px;
}

.home-blog-card-date {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.home-blog-card-title {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 700;
}

.home-blog-card-title a {
  color: var(--ink);
  text-decoration: none;
}

.home-blog-card-title a:hover {
  color: var(--brand);
}

.home-blog-card-excerpt {
  display: -webkit-box;
  overflow: hidden;
  min-height: 46px;
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.home-blog-card-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 1024px) {
  .home-blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .home-blog {
    margin-top: 32px;
  }

  .home-blog-header {
    gap: 9px;
    margin-bottom: 14px;
  }

  .home-blog-title {
    font-size: 1.15rem;
  }

  .home-blog-header-line {
    display: none;
  }

  .home-blog-viewall {
    margin-right: auto;
    font-size: 12px;
  }

  /* اسلایدر افقی Native برای موبایل */
  .home-blog-grid {
    display: flex;
    gap: 14px;

    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 2px 10px 8px;

    overflow-x: auto;
    overflow-y: hidden;

    scroll-snap-type: x mandatory;
    scroll-padding-inline: 10px;

    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;

    scrollbar-width: none;
  }

  .home-blog-grid::-webkit-scrollbar {
    display: none;
  }

  .home-blog-card {
    flex: 0 0 calc(86% - 6px);
    max-width: 360px;

    scroll-snap-align: start;
    scroll-snap-stop: normal;

    border-radius: 14px;
  }

  .home-blog-card:first-child {
    margin-inline-start: 0;
  }

  .home-blog-card:last-child {
    margin-inline-end: 2px;
  }

  .home-blog-card-media {
    aspect-ratio: 16 / 10;
  }

  .home-blog-card-body {
    padding: 13px 14px 14px;
  }

  .home-blog-card-title {
    font-size: 14px;
    line-height: 1.8;
  }

  .home-blog-card-excerpt {
    min-height: 44px;
    font-size: 11.5px;
  }
}

/* =========================================================
   تیتر مشترک سکشن‌های صفحه اصلی
   فروشگاه‌های محبوب / تخفیف‌های ویژه / آخرین تخفیف‌ها
   هماهنگ با استایل «آخرین مطالب وبلاگ»
========================================================= */
.home-section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 12px;
}

.home-section-title {
  flex: 0 0 auto;
  margin: 0;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: 700;
}

.home-section-header-line {
  flex: 1 1 auto;
  height: 1px;
  border-top: 1px dashed var(--line);
}

.home-section-viewall {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
  transition: color .18s ease;
}

.home-section-viewall:hover {
  background: transparent;
  color: var(--brand);
}

.home-section-viewall svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* حذف ظاهر قبلی pill از «تمام فروشگاه‌ها» */
.home-stores-viewall {
  padding: 0;
  background: transparent;
  border-radius: 0;
  color: var(--muted);
  font-weight: 400;
}

.home-stores-viewall:hover {
  background: transparent;
  color: var(--brand);
}

/* تیترهای قبلی فقط از استایل مشترک استفاده کنند */
.home-featured-title,
.home-latest-title,
.home-stores-title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .home-section-header {
    gap: 9px;
    margin: 22px 0 12px;
  }

  .home-section-title {
    font-size: 1.15rem;
  }

  .home-section-header-line {
    display: none;
  }

  .home-section-viewall {
    margin-right: auto;
    font-size: 12px;
  }
}



/* Home coupon sorting */
.home-coupon-sort{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 16px}
.home-coupon-sort__item{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:0 15px;border:1px solid var(--line);border-radius:999px;background:var(--white);color:var(--ink-alt);text-decoration:none;font-size:12.5px;font-weight:700;transition:color .16s ease,border-color .16s ease,background .16s ease}
.home-coupon-sort__item:hover,.home-coupon-sort__item.is-active{color:var(--brand);border-color:color-mix(in srgb,var(--brand) 25%,var(--line));background:color-mix(in srgb,var(--brand) 5%,var(--white))}
@media(max-width:640px){.home-coupon-sort{gap:6px;overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px;scrollbar-width:none}.home-coupon-sort::-webkit-scrollbar{display:none}.home-coupon-sort__item{flex:0 0 auto;min-height:36px;padding-inline:13px;font-size:12px}}


/* Home coupon AJAX sorting */
.home-coupon-results-shell{position:relative;min-height:120px}
.home-coupon-results-shell.is-loading{pointer-events:none;opacity:.58}
.home-coupon-results-shell.is-loading::after{content:"";position:absolute;top:74px;left:50%;z-index:5;width:26px;height:26px;margin-left:-13px;border:2px solid var(--line);border-top-color:var(--brand);border-radius:50%;animation:mcHomeSortSpin .65s linear infinite}
@keyframes mcHomeSortSpin{to{transform:rotate(360deg)}}
