/*
 * لایهٔ برندِ السلطان روی قالبِ «مهرگان».
 *
 * `main.css` خودِ قالب است و دست نمی‌خورد. هر چیزِ مخصوصِ ما این‌جاست:
 *   ۱) قلم (فقط وزیرمتن، از همان `/fonts` پنل)،
 *   ۲) رنگ‌های خنثیِ برند (رنگ‌های اصلی را پنل روی `<html>` می‌گذارد)،
 *   ۳) تکه‌هایی که قالب ندارد ولی ویترینِ ما دارد (برچسبِ موجودی، نمادها،
 *      صفحه‌های حساب/اقساط/تیکت و …) — همه با همان متغیرها و زبانِ قالب.
 */

@font-face { font-family: 'Vazirmatn'; src: url('../../../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 300 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../../fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../../fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Vazirmatn'; src: url('../../../fonts/Vazirmatn-ExtraBold.woff2') format('woff2'); font-weight: 800 900; font-style: normal; font-display: swap; }

:root {
    --mg-font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    --mg-font-size: 16px;
    --mg-bg: #FFFFFF;
    --mg-primary-dark: color-mix(in srgb, var(--mg-primary) 82%, #000);
    --mg-primary-light: rgba(var(--mg-primary-rgb), 0.15);
    --mg-secondary-dark: color-mix(in srgb, var(--mg-secondary) 85%, #000);
    --mg-accent-light: color-mix(in srgb, var(--mg-accent) 70%, #fff);
    --mg-hero-overlay: 0.05;
}

body { font-family: var(--mg-font-family); }

/* دسترس‌پذیری: پرش به محتوا و متنِ فقط‌صفحه‌خوان */
.skip-link { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100000; background: var(--mg-primary); color: #fff; padding: 10px 16px; border-radius: var(--mg-radius-sm); transition: top .2s; }
.skip-link:focus { top: 12px; }
.sr-only, .screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--mg-primary); outline-offset: 2px; }

/* نوارِ تصویریِ بالای سایت (همان اندازه‌های دموی قالب) */
.mg-header-promo { display: block; height: 46px; background-color: color-mix(in srgb, var(--mg-secondary) 28%, #fff); background-position: center; background-repeat: no-repeat; background-size: contain; }
.mg-top-bar { padding: 8px 0; }

/* لوگو: نشانِ کوفیِ السلطان */
.mg-logo .mg-custom-logo-img { width: 40px; height: 40px; object-fit: contain; }
.mg-footer .mg-logo-icon img { width: 30px; height: 30px; object-fit: contain; display: block; }

/* مگامنو: عکسِ دسته کنارِ زیردسته‌ها */
.mg-mega-panel { position: relative; }
.mg-mega-panel-media { position: absolute; inset-inline-end: 20px; bottom: 20px; width: 132px; height: 132px; border-radius: 50%; overflow: hidden; border: 3px solid rgba(var(--mg-primary-rgb), .18); background: var(--mg-surface); }
.mg-mega-panel-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* اسلایدرِ خانه — همان مقدارهایی که دموی قالب در تنظیماتش دارد، با رنگِ برند */
.mg-hero-block {
    --mg-hb-radius: 30px;
    --mg-hb-side: 30%;
    --mg-hb-gap: 15px;
    --mg-hb-arrow-color: var(--mg-primary-dark);
    --mg-hb-arrow-bg: var(--mg-surface);
    --mg-hb-dot: color-mix(in srgb, var(--mg-text) 25%, var(--mg-surface));
    --mg-hb-card-accent: var(--mg-primary);
    --mg-hb-dot-active: var(--mg-primary);
    --mg-hb-small-h: 267px;
    --mg-hb-small-h-m: 222px;
    padding-block: 10px;
}
.mg-banner-row { gap: 16px; }

/* کارتِ کالا: برچسبِ موجودی و یادداشت‌ها (قالب این‌ها را ندارد) */
.mg-product-image-wrapper { position: relative; }
.mg-product-noimage { display: block; aspect-ratio: 1; background: var(--mg-surface) center / 38% no-repeat url('../../../images/logo-mark.png'); opacity: .35; }
.mg-card-flag { position: absolute; inset-inline-start: 10px; bottom: 10px; z-index: 2; padding: 3px 10px; border-radius: var(--mg-radius-full); font-size: .72rem; font-weight: 600; line-height: 1.6; }
.mg-card-flag--out { background: #17231D; color: #fff; }
.mg-card-flag--low { background: #FBEFD9; color: #6B4A0E; }
.mg-product-card.is-out-of-stock .mg-product-image-wrapper img { filter: grayscale(.6); opacity: .75; }
.mg-price-note { font-size: .85rem; font-weight: 600; color: var(--mg-text-muted); }
.mg-card-options { margin: 4px 0 0; font-size: .75rem; color: var(--mg-text-muted); }
.mg-card-stock-note { margin: 8px 0 0; font-size: .75rem; color: var(--mg-warning); }
.mg-toman-icon { width: 18px; height: 18px; }

/* فوتر: نمادهای اعتماد */
.mg-footer-seals { display: flex; gap: 10px; align-items: center; }
.mg-footer-seal { display: inline-flex; background: #fff; border-radius: var(--mg-radius-sm); padding: 4px; }
.mg-footer-seal img { width: 56px; height: 56px; object-fit: contain; display: block; }

/* نوارِ پیش‌نمایشِ نسخهٔ منتشرنشده (پنلِ صفحه‌ساز) */
.mg-preview-note { margin: 12px auto; padding: 8px 16px; border-radius: var(--mg-radius-sm); background: #FBEFD9; color: #6B4A0E; font-size: .85rem; font-weight: 600; text-align: center; }

/* حالتِ خالی (کاتالوگِ خالی، سبدِ خالی، بی‌نتیجه) */
.mg-empty-state { margin: 48px auto; max-width: 520px; padding: 40px 24px; text-align: center; background: var(--mg-surface); border: 1px dashed var(--mg-border); border-radius: var(--mg-radius-lg); }
.mg-empty-state h2 { font-size: 1.15rem; margin: 0 0 8px; color: var(--mg-text); }
.mg-empty-state p { margin: 0 0 16px; color: var(--mg-text-muted); }

/* شبکهٔ «پازل» صفحه‌ساز (سطرِ چندخانه‌ای) */
.pg-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; max-width: 1400px; margin-inline: auto; padding-inline: 16px; }
.pg-cell { grid-column: span 12; min-width: 0; }
.pg-row .mg-container { padding-inline: 0; }

/* شبکهٔ صفحه‌ساز: عرضِ هر خانه در موبایل / تبلت (md) / دسکتاپ (lg) */
.pg-c-1 { grid-column: span 1; } .pg-o-1 { order: 1; }
.pg-c-2 { grid-column: span 2; } .pg-o-2 { order: 2; }
.pg-c-3 { grid-column: span 3; } .pg-o-3 { order: 3; }
.pg-c-4 { grid-column: span 4; } .pg-o-4 { order: 4; }
.pg-c-5 { grid-column: span 5; } .pg-o-5 { order: 5; }
.pg-c-6 { grid-column: span 6; } .pg-o-6 { order: 6; }
.pg-c-7 { grid-column: span 7; } .pg-o-7 { order: 7; }
.pg-c-8 { grid-column: span 8; } .pg-o-8 { order: 8; }
.pg-c-9 { grid-column: span 9; } .pg-o-9 { order: 9; }
.pg-c-10 { grid-column: span 10; } .pg-o-10 { order: 10; }
.pg-c-11 { grid-column: span 11; } .pg-o-11 { order: 11; }
.pg-c-12 { grid-column: span 12; } .pg-o-12 { order: 12; }
@media (min-width: 768px) {
    .pg-c-md-1 { grid-column: span 1; } .pg-o-md-1 { order: 1; }
    .pg-c-md-2 { grid-column: span 2; } .pg-o-md-2 { order: 2; }
    .pg-c-md-3 { grid-column: span 3; } .pg-o-md-3 { order: 3; }
    .pg-c-md-4 { grid-column: span 4; } .pg-o-md-4 { order: 4; }
    .pg-c-md-5 { grid-column: span 5; } .pg-o-md-5 { order: 5; }
    .pg-c-md-6 { grid-column: span 6; } .pg-o-md-6 { order: 6; }
    .pg-c-md-7 { grid-column: span 7; } .pg-o-md-7 { order: 7; }
    .pg-c-md-8 { grid-column: span 8; } .pg-o-md-8 { order: 8; }
    .pg-c-md-9 { grid-column: span 9; } .pg-o-md-9 { order: 9; }
    .pg-c-md-10 { grid-column: span 10; } .pg-o-md-10 { order: 10; }
    .pg-c-md-11 { grid-column: span 11; } .pg-o-md-11 { order: 11; }
    .pg-c-md-12 { grid-column: span 12; } .pg-o-md-12 { order: 12; }
}
@media (min-width: 1024px) {
    .pg-c-lg-1 { grid-column: span 1; } .pg-o-lg-1 { order: 1; }
    .pg-c-lg-2 { grid-column: span 2; } .pg-o-lg-2 { order: 2; }
    .pg-c-lg-3 { grid-column: span 3; } .pg-o-lg-3 { order: 3; }
    .pg-c-lg-4 { grid-column: span 4; } .pg-o-lg-4 { order: 4; }
    .pg-c-lg-5 { grid-column: span 5; } .pg-o-lg-5 { order: 5; }
    .pg-c-lg-6 { grid-column: span 6; } .pg-o-lg-6 { order: 6; }
    .pg-c-lg-7 { grid-column: span 7; } .pg-o-lg-7 { order: 7; }
    .pg-c-lg-8 { grid-column: span 8; } .pg-o-lg-8 { order: 8; }
    .pg-c-lg-9 { grid-column: span 9; } .pg-o-lg-9 { order: 9; }
    .pg-c-lg-10 { grid-column: span 10; } .pg-o-lg-10 { order: 10; }
    .pg-c-lg-11 { grid-column: span 11; } .pg-o-lg-11 { order: 11; }
    .pg-c-lg-12 { grid-column: span 12; } .pg-o-lg-12 { order: 12; }
}
@media (max-width: 767px) { .pg-hide { display: none !important; } }
@media (min-width: 768px) and (max-width: 1023px) { .pg-hide-md { display: none !important; } }
@media (min-width: 1024px) { .pg-hide-lg { display: none !important; } }
/* عرضِ ریزِ خانه‌ها (`PageGrid::UNITS`، ویرایشگرِ دیداری): در کامپیوتر (≥۱۰۲۴) سطر flex، هر خانه `--pgw` از ۴۸،
   جای خالیِ تهِ سطر `--pg-rest`. تبلت و گوشی همان grid با ستون‌های خودشان (`pg-c-md-*`، `pg-c-*`). */
@media (min-width: 1024px) {
    .pg-row--fine { display: flex; column-gap: 16px; }
    .pg-row--fine > .pg-cell { flex: var(--pgw, 12) 1 0px; }
    .pg-row--fine[style*="--pg-rest"]::after { content: ""; flex: var(--pg-rest) 1 0px; order: 99; }
    /* سطرِ پرنشده چپ‌چین/وسط‌چین (`PageGrid::ALIGNS`). */
    .pg-row--fine.pg-al-left[style*="--pg-rest"]::after { content: none; }
    .pg-row--fine.pg-al-left[style*="--pg-rest"]::before { content: ""; flex: var(--pg-rest) 1 0px; order: -99; }
    .pg-row--fine.pg-al-center[style*="--pg-rest"]::before { content: ""; flex: calc(var(--pg-rest) / 2) 1 0px; order: -99; }
    .pg-row--fine.pg-al-center[style*="--pg-rest"]::after { flex: calc(var(--pg-rest) / 2) 1 0px; }
}

/* فاصلهٔ بالا/پایینِ یک سطر (ویرایشگرِ دیداری؛ `PageGrid::SPACES`). نبودنِ کلاس = فاصلهٔ خودِ قالب. */
.pg-sp-none .mg-section { padding-block: 0; }
.pg-sp-sm .mg-section { padding-block: calc(var(--mg-spacing-xl) / 3); }
.pg-sp-lg .mg-section { padding-block: calc(var(--mg-spacing-xl) * 1.75); }
.pg-sp-none { margin-block: 0; }
.pg-sp-sm { margin-block: 4px; }
.pg-sp-lg { margin-block: 32px; }

/* فلشِ اسلایدرها: Swiper فلش را با یک قلمِ data: می‌کشد که CSP ویترین (`font-src 'self'`) نمی‌پذیرد — همان شکل با CSS. */
.swiper-button-prev::after, .swiper-button-next::after { content: '' !important; font-family: inherit !important; display: block; width: 9px; height: 9px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateX(2px) rotate(45deg); }
.swiper-button-next::after { transform: translateX(-2px) rotate(-135deg); }
/* پیش از اجرای اسکریپت: ویترین راست‌به‌چپ ⇒ «بعدی» معمولاً سمتِ چپ. */
[dir="rtl"] .swiper-button-prev::after { transform: translateX(-2px) rotate(-135deg); }
[dir="rtl"] .swiper-button-next::after { transform: translateX(2px) rotate(45deg); }
/* جهتِ واقعی (۱۴۰۵/۰۷/۲۹): `shop.js` از جای خودِ دکمه `data-arrow` می‌گذارد ⇒ فلش همیشه رو به بیرون.
   گالریِ کالا اسلایدرِ چپ‌به‌راست است و «بعدی»ش سمتِ راست — قانونِ بالا آن را برعکس می‌کرد. */
html .swiper-button-prev[data-arrow="left"]::after, html .swiper-button-next[data-arrow="left"]::after { transform: translateX(2px) rotate(45deg); }
html .swiper-button-prev[data-arrow="right"]::after, html .swiper-button-next[data-arrow="right"]::after { transform: translateX(-2px) rotate(-135deg); }

/* دسته‌ای که هنوز عکس ندارد: نشانِ کم‌رنگِ السلطان به‌جای دایرهٔ خالی */
.mg-category-image-wrapper:not(:has(img)) { background: var(--mg-surface) center / 42% no-repeat url('../../../images/logo-mark.png'); }

/* ── عکسِ کالا تمام‌قاب (خواستِ مالک ۱۴۰۵/۰۷/۱۵) ─────────────────────────
   عکس بی‌دست‌کاری کلِ باکس را می‌گیرد (cover ⇒ بی‌دفرم، فقط لبه‌های اضافه بیرون
   می‌ماند)، گوشه‌ها گرد، یک سایهٔ سبزِ کم‌رنگ از بالا و
   یک سایهٔ سفیدِ نرم از پایین. فقط برای شکلِ کارتِ «عکسِ تمام‌قاب» (`mg-card-photo`؛
   تنظیماتِ ویترین ← ظاهر). سایهٔ بالا رنگِ باکسِ قیمت (--mg-primary) را می‌گیرد. */
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper , body .mg-cs-photo .mg-product-card .mg-product-image-wrapper { border-radius: 16px; background: #fff; }
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper > a , body .mg-cs-photo .mg-product-card .mg-product-image-wrapper > a { border-radius: inherit; }
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper img , body .mg-cs-photo .mg-product-card .mg-product-image-wrapper img {
    object-fit: cover; object-position: center; padding: 0; mix-blend-mode: normal; border-radius: inherit;
}
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper::before,
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper::after , body .mg-cs-photo .mg-product-card .mg-product-image-wrapper::before, body .mg-cs-photo .mg-product-card .mg-product-image-wrapper::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
}
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper::before , body .mg-cs-photo .mg-product-card .mg-product-image-wrapper::before {
    /* سایهٔ سبزِ کم‌رنگ از بالا، هم‌رنگِ باکسِ قیمت (--mg-primary) — خواستِ مالک */
    background: linear-gradient(180deg, rgba(var(--mg-primary-rgb), .26) 0%, rgba(var(--mg-primary-rgb), .14) 14%, rgba(var(--mg-primary-rgb), .06) 28%, rgba(var(--mg-primary-rgb), 0) 45%);
}
body.mg-card-photo .mg-product-card:not(:where(.mg-cs *)) .mg-product-image-wrapper::after , body .mg-cs-photo .mg-product-card .mg-product-image-wrapper::after {
    /* پایینِ عکس نرم به سفید محو می‌شود تا با زمینهٔ سفیدِ کارت یکی شود */
    background: linear-gradient(0deg, #fff 0%, rgba(255, 255, 255, .9) 4%, rgba(255, 255, 255, .72) 9%, rgba(255, 255, 255, .52) 15%, rgba(255, 255, 255, .33) 21%, rgba(255, 255, 255, .18) 27%, rgba(255, 255, 255, .07) 33%, rgba(255, 255, 255, 0) 40%);
    transform: none; left: 0; bottom: 0; width: auto; height: auto;
}

/* ── «تومان» به‌صورت نوشتهٔ افقیِ کوچک، نه نمادِ عمودیِ قالب ──
   مالک (۱۴۰۵/۰۷/۱۸): استایلِ نمادِ عمودیِ تومان را نمی‌پسندد. همهٔ سبک‌های
   قدیمیِ `.mg-toman-icon` برای تصویر بودند (ارتفاع/فیلتر/شفافیت)؛ این‌جا برای
   نسخهٔ نوشته خنثی می‌شوند و رنگ از والد (سفید روی نوارِ سبز، تیره روی سفید) می‌آید. */
.mg-toman-icon.mg-toman-text {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  filter: none !important;
  opacity: .8 !important;
  color: inherit;
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  align-self: center;
}
.mg-price-card .mg-price-display .mg-toman-icon.mg-toman-text { font-size: .95rem; opacity: .6 !important; align-self: flex-end; }
/* روی نوارِ سبزِ کارتِ بلیتی نوشته سفید است */
body.mg-card-ticket .mg-product-card:not(:where(.mg-cs *)) .mg-toman-icon.mg-toman-text , body .mg-cs-ticket .mg-product-card .mg-toman-icon.mg-toman-text { color: #fff; }

/* کرمِ برند: سطح‌های بزرگ روشن‌اند (--mg-surface)، فقط این سه تکه کرمِ اصلی را می‌گیرند. */
.mg-footer-trust, .mg-footer-bottom, .mg-newsletter-field { background: var(--mg-cream, var(--mg-surface)); }

/* نوارِ اسکرولِ کنارِ صفحه — قالب (`main.css`) آن را روی همه‌چیز مخفی کرده بود
   و بازدیدکننده نمی‌فهمید صفحه ادامه دارد. فقط اسکرولِ خودِ صفحه برمی‌گردد؛
   اسکرول‌های داخلیِ منو و پنجره‌ها همان‌طور مخفی می‌مانند. */
html {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--mg-primary-rgb), .45) transparent;
    -ms-overflow-style: auto;
}
html::-webkit-scrollbar { display: block; width: 10px; height: 10px; background: transparent; }
html::-webkit-scrollbar-thumb { background: rgba(var(--mg-primary-rgb), .45); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
html::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--mg-primary-rgb), .7); }

/* کارتِ کالا: موس روی عکس ⇒ کمی زوم؛ با حرکتِ موس عکس‌های بعدی (`shop.js`). */
@media (hover: hover) and (pointer: fine) {
    .mg-product-card .mg-product-image-wrapper img { transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
    .mg-product-card .mg-product-image-wrapper:hover img { transform: scale(1.1); }
}
.mg-card-gallery-dots {
    position: absolute; inset-inline: 14px; bottom: 8px; z-index: 3;
    display: flex; gap: 4px; pointer-events: none;
    opacity: 0; transition: opacity .2s;
}
.mg-card-gallery-dots i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .7); box-shadow: 0 0 2px rgba(0, 0, 0, .25); }
.mg-card-gallery-dots i.is-on { background: var(--mg-primary); }
.mg-product-image-wrapper:hover .mg-card-gallery-dots { opacity: 1; }

/* زومِ ۱۵٪ِ عکس‌های فروشگاه (کارتِ کالا و گالریِ صفحهٔ کالا)؛ «کالکشن نقره» (فاطر) = `.mg-supplier` مستثناست. */
body:not(.mg-supplier) .mg-product-card .mg-product-image-wrapper img,
body:not(.mg-supplier) .mg-product-gallery .mg-gallery-main .mg-gallery-image img { transform: scale(1.15); }
@media (hover: hover) and (pointer: fine) {
    body:not(.mg-supplier) .mg-product-card .mg-product-image-wrapper:hover img { transform: scale(1.25); }
}

/* اسلایدرِ اصلی بی کارتِ کناری: ستونِ کناریِ خالی نماند، بنر تمام‌عرض شود
   (قالب ستون‌بندیِ «کنارِ اسلایدر» را حتی بی کارت هم می‌چید و بنر یک‌سوم می‌شد). */
@media (min-width: 992px) {
    .mg-hero-block:not(.has-small) .mg-hb-inner { grid-template-columns: minmax(0, 1fr); }
}

/* «چه کسانی ببینند؟» در فرمِ بنر — مرزِ گوشی/کامپیوتر همان مرزِ قالب (۹۹۱px) است. */
@media (max-width: 991px) {
    .mg-only-desktop { display: none !important; }
}
@media (min-width: 992px) {
    .mg-only-mobile { display: none !important; }
}

/* کاورهای کنارِ اسلایدرِ بالا (جایگاهِ بنرِ «کنارِ اسلایدرِ بالا»): عکس کلِ کارت را پر می‌کند؛
   لبهٔ کج را اسکریپتِ قالب روی `.mg-hb-card` می‌بُرد. */
.mg-hb-card--cover { display: block; }
.mg-hb-card--cover .mg-hb-cover-img {
    position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
    object-fit: cover; transition: transform .5s cubic-bezier(.22, 1, .36, 1);
}
.mg-hb-card--cover:hover .mg-hb-cover-img { transform: scale(1.04); }
/* روی گوشی کاورها زیرِ اسلایدر، تمام‌عرض و هم‌شکلِ خودِ عکس (نه دو ستونِ باریکِ بریده). */
@media (max-width: 991px) {
    .mg-hero-block.mg-hb--covers .mg-hb-small { grid-template-columns: minmax(0, 1fr); }
    .mg-hero-block.mg-hb--covers .mg-hb-card--cover { height: auto; aspect-ratio: 1000 / 375; }
}

/* ردیفِ بنر (`BannerSlot`): هر خط flex و تمام‌عرض؛ عرضِ هر بنر `--w` از ۴۸ (ویرایشگرِ دیداری ریز تغییرش
   می‌دهد)، `.mg-banner-rest` جای خالیِ تهِ خط. ارتفاع: کامپیوتر `--bh` (پیش‌فرض ۲۳۰)، کمتر از ۱۲۰۰ همان نسبت به عرض. */
.mg-banner-row--line { display: flex; height: var(--bh, 230px); margin-bottom: 16px; }
.mg-banner-row--line:last-child { margin-bottom: 0; }
.mg-banner-row--line > * { flex: var(--w, 12) 1 0px; min-width: 0; }
.mg-banner-row--line > .mg-banner-cell { height: 100%; }
@media (max-width: 1199px) {
    .mg-banner-row--line { height: calc(100cqi * var(--bh-r, 0.242)); }
}

/* نسبتِ قابِ عکسِ کارتِ کالا در یک ردیفِ کالا (`ProductCarousel::RATIOS`، ویرایشگرِ دیداری).
   قالب قاب را مربع و حداکثر ۱۷۰ پیکسل می‌گذارد؛ این‌جا سقف برداشته می‌شود تا کارتِ پهن‌تر
   عکسِ بزرگ‌تر بگیرد. `body` فقط برای چیرگی بر قاعدهٔ «عکسِ تمام‌قاب» است. */
body .pc-r-square .mg-product-card .mg-product-image-wrapper { aspect-ratio: 1 / 1; max-height: none; }
body .pc-r-portrait .mg-product-card .mg-product-image-wrapper { aspect-ratio: 3 / 4; max-height: none; }
body .pc-r-tall .mg-product-card .mg-product-image-wrapper { aspect-ratio: 2 / 3; max-height: none; }
body .pc-r-landscape .mg-product-card .mg-product-image-wrapper { aspect-ratio: 4 / 3; max-height: none; }
body [class*="pc-r-"] .mg-product-card .mg-product-image-wrapper > a,
body [class*="pc-r-"] .mg-product-card .mg-product-image-wrapper img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* رنگِ جدای یک بخش (`SectionLook`، ویرایشگرِ دیداری): `--mg-primary` و هم‌خانواده روی خودِ بخش است؛
   رنگ‌های مشتق در :root یک بار حساب شده‌اند و ارث می‌رسند، پس این‌جا از همان متغیرهای بخش دوباره ساخته می‌شوند. */
.mg-pal {
    --mg-gradient-primary: linear-gradient(135deg, var(--mg-primary) 0%, var(--mg-secondary) 100%);
    --mg-gradient-vibrant: linear-gradient(135deg, var(--mg-accent) 0%, var(--mg-primary) 100%);
    --mg-gradient-sunset: linear-gradient(135deg, var(--mg-accent) 0%, var(--mg-primary) 100%);
    --mg-gradient-emerald: linear-gradient(135deg, var(--mg-primary) 0%, var(--mg-accent) 100%);
    --mg-shadow-glow: 0 0 40px -10px var(--mg-primary);
    --mg-shadow-colored: 0 20px 50px -15px rgba(var(--mg-primary-rgb), 0.35);
    --mg-primary-dark: color-mix(in srgb, var(--mg-primary) 82%, #000);
    --mg-primary-light: rgba(var(--mg-primary-rgb), 0.15);
    --mg-secondary-dark: color-mix(in srgb, var(--mg-secondary) 85%, #000);
    --mg-accent-light: color-mix(in srgb, var(--mg-accent) 70%, #fff);
    --mg-gradient-ocean: linear-gradient(135deg, var(--mg-primary-light) 0%, var(--mg-accent) 100%);
    --mg-deal: var(--mg-primary);
    --mg-cat-ink: var(--mg-text);
}

/* ── زبانه‌های «ظاهر/پیشرفته»ِ هر بخش (`CellStyle`، ویرایشگرِ دیداری) ──────────────────
   هر عدد یک متغیر: `--st-pt` کامپیوتر، `-t` تبلت (کمتر از ۱۰۲۴)، `-m` گوشی (کمتر از ۷۶۸)؛ نبودنِ هر کدام = دستگاهِ بزرگ‌تر.
   رنگ‌ها فقط متغیرهای پالت‌اند (سرور جز این نمی‌نویسد). */
.pg-st {
    position: relative;
    padding: var(--st-pt, 0px) var(--st-px, 0px) var(--st-pb, 0px);
    margin-top: var(--st-mt, 0px);
    margin-bottom: var(--st-mb, 0px);
    background: var(--st-bg, transparent);
    border: var(--st-bw, 0px) solid var(--st-bc, transparent);
    border-radius: var(--st-r, 0px);
}
.pg-st.pg-st-r { overflow: hidden; }
.pg-st.pg-st-img {
    background-image: linear-gradient(rgba(0, 0, 0, var(--st-dim, 0)), rgba(0, 0, 0, var(--st-dim, 0))), var(--st-bgi);
    background-size: cover;
    background-position: center;
}
.pg-st.pg-st-tc .mg-section-title, .pg-st.pg-st-tc h2, .pg-st.pg-st-tc h3 { color: var(--st-title); }
.pg-st.pg-st-xc, .pg-st.pg-st-xc p, .pg-st.pg-st-xc .mg-section-subtitle { color: var(--st-text); }
.pg-sh-sm { box-shadow: 0 2px 10px rgba(0, 0, 0, .07); }
.pg-sh-md { box-shadow: 0 8px 24px rgba(0, 0, 0, .10); }
.pg-sh-lg { box-shadow: 0 18px 48px rgba(0, 0, 0, .16); }
@media (max-width: 1023px) {
    .pg-st {
        padding: var(--st-pt-t, var(--st-pt, 0px)) var(--st-px-t, var(--st-px, 0px)) var(--st-pb-t, var(--st-pb, 0px));
        margin-top: var(--st-mt-t, var(--st-mt, 0px));
        margin-bottom: var(--st-mb-t, var(--st-mb, 0px));
        border-radius: var(--st-r-t, var(--st-r, 0px));
    }
}
@media (max-width: 767px) {
    .pg-st {
        padding: var(--st-pt-m, var(--st-pt-t, var(--st-pt, 0px))) var(--st-px-m, var(--st-px-t, var(--st-px, 0px))) var(--st-pb-m, var(--st-pb-t, var(--st-pb, 0px)));
        margin-top: var(--st-mt-m, var(--st-mt-t, var(--st-mt, 0px)));
        margin-bottom: var(--st-mb-m, var(--st-mb-t, var(--st-mb, 0px)));
        border-radius: var(--st-r-m, var(--st-r-t, var(--st-r, 0px)));
    }
}

/* ═════════════════════════════════════════
   «انتخابِ تعداد روی کارت» (`appearance.qty_stepper`) — برگرفته از قالبِ «مهرگان» ۲.۸
   (assets/css/main.css). نسخهٔ `body .mg-cs-*` برای شکلِ کارتِ هر بخش افزوده شده.
   ═════════════════════════════════════════ */
/* ============================================
   انتخاب تعداد روی کارت: «+ تعداد −» به‌جای دکمه‌ی سبد
   ============================================ */
.mg-card-cart-btn[hidden] {
    display: none !important;
}

.mg-card-stepper {
    --mg-step: 42px;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    gap: 2px;
    height: var(--mg-step);
    padding: 4px;
    margin-inline-start: 0.5rem;
    box-sizing: border-box;
    background: #fff;
    border: 1.5px solid rgba(var(--mg-primary-rgb), 0.35);
    border-radius: 999px;
    position: relative;
    z-index: 2;
    animation: mg-card-stepper-in 0.2s ease;
}

@keyframes mg-card-stepper-in {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: none; }
}

.mg-card-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--mg-step) - 11px);
    height: calc(var(--mg-step) - 11px);
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(var(--mg-primary-rgb), 0.1);
    color: var(--mg-primary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.mg-card-step:hover {
    background: var(--mg-primary);
    color: #fff;
}

.mg-card-step:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.mg-card-step-trash,
.mg-card-stepper.is-last .mg-card-step-minus {
    display: none;
}

.mg-card-stepper.is-last .mg-card-step-trash {
    display: block;
}

.mg-card-stepper.is-last .mg-card-step--minus {
    color: var(--mg-error, #dc2626);
    background: rgba(220, 38, 38, 0.08);
}

.mg-card-stepper.is-last .mg-card-step--minus:hover {
    background: var(--mg-error, #dc2626);
    color: #fff;
}

.mg-card-step-qty {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 0 2px;
    line-height: 1;
    color: var(--mg-text, #111);
}

.mg-card-step-qty b {
    font-size: 0.95rem;
    font-weight: 800;
}

.mg-card-step-qty small {
    margin-top: 2px;
    font-size: 0.55rem;
    font-weight: 500;
    opacity: 0.7;
    white-space: nowrap;
}

body.mg-dark .mg-card-stepper {
    background: transparent;
}

/* مدل «شناور»: کپسول تیره، هم‌رنگ دکمه‌ی خرید همین مدل */
body.mg-card-float .mg-product-card .mg-card-stepper,
body .mg-cs-float .mg-product-card .mg-card-stepper {
    border-color: transparent;
    border-radius: 14px;
    background: var(--mg-text, #111);
    box-shadow: 0 10px 20px -12px rgba(15, 23, 42, 0.6);
}

body.mg-card-float .mg-product-card .mg-card-step,
body.mg-card-float .mg-product-card .mg-card-stepper.is-last .mg-card-step--minus,
body .mg-cs-float .mg-product-card .mg-card-step,
body .mg-cs-float .mg-product-card .mg-card-stepper.is-last .mg-card-step--minus {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

body.mg-card-float .mg-product-card .mg-card-stepper.is-last .mg-card-step--minus,
body .mg-cs-float .mg-product-card .mg-card-stepper.is-last .mg-card-step--minus {
    color: #ff9b9b;
}

body.mg-card-float .mg-product-card .mg-card-step:hover,
body.mg-card-float .mg-product-card .mg-card-stepper.is-last .mg-card-step--minus:hover,
body .mg-cs-float .mg-product-card .mg-card-step:hover,
body .mg-cs-float .mg-product-card .mg-card-stepper.is-last .mg-card-step--minus:hover {
    background: #fff;
    color: var(--mg-text, #111);
}

body.mg-card-float .mg-product-card .mg-card-step-qty,
body .mg-cs-float .mg-product-card .mg-card-step-qty {
    color: #fff;
}

/* مدل «برچسب قیمت»: کپسول سفید داخل بخش جداشده‌ی بلیت؛ سوراخ‌های بلیت درست کنارش می‌افتند */
body.mg-card-ticket .mg-product-card .mg-card-footer:has(.mg-card-stepper),
body .mg-cs-ticket .mg-product-card .mg-card-footer:has(.mg-card-stepper) {
    --mg-ticket-stub: 104px;
}

body.mg-card-ticket .mg-product-card .mg-card-stepper,
body .mg-cs-ticket .mg-product-card .mg-card-stepper {
    align-self: stretch;
    justify-content: space-between;
    width: calc(var(--mg-ticket-stub) - 16px);
    height: auto;
    margin-block: 7px;
    margin-inline: 9px 7px;
    padding: 0 3px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.45);
}

body.mg-card-ticket .mg-product-card .mg-card-step,
body .mg-cs-ticket .mg-product-card .mg-card-step {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

body.mg-card-ticket .mg-product-card .mg-unit-suffix,
body .mg-cs-ticket .mg-product-card .mg-unit-suffix {
    color: rgba(255, 255, 255, 0.78);
}

/* مدل «لوکس»: قرص سفید روی پایین عکس، مثل دکمه‌ی خرید همین مدل؛ قد کارت عوض نمی‌شود */
body.mg-card-lux .mg-product-card .mg-card-stepper,
body .mg-cs-lux .mg-product-card .mg-card-stepper {
    grid-row: 1;
    grid-column: 1;
    z-index: 4;
    align-self: end;
    justify-self: center;
    margin: 10px;
    border-color: transparent;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 12px 24px -12px rgba(15, 23, 42, 0.5);
}

body.mg-card-lux .mg-product-card .mg-card-step,
body .mg-cs-lux .mg-product-card .mg-card-step {
    background: color-mix(in srgb, var(--mg-text, #0f172a) 6%, #fff);
    color: var(--mg-text, #111);
}

body.mg-card-lux .mg-product-card .mg-card-step:hover,
body .mg-cs-lux .mg-product-card .mg-card-step:hover {
    background: var(--mg-text, #111);
    color: #fff;
}

/* فروش شگفت‌انگیز: مدل «شبکه‌ای» و محصول بزرگ «پیشنهاد روز» دکمه‌ی خودشان را دارند */
.mg-dc-buy[hidden] {
    display: none !important;
}

.mg-dg-foot .mg-card-stepper,
.mg-deals-hero-actions .mg-card-stepper {
    margin: 0;
    border-color: color-mix(in srgb, var(--mg-deal, var(--mg-primary)) 35%, transparent);
}

.mg-dg-foot .mg-card-step,
.mg-deals-hero-actions .mg-card-step {
    background: color-mix(in srgb, var(--mg-deal, var(--mg-primary)) 10%, transparent);
    color: var(--mg-deal, var(--mg-primary));
}

.mg-dg-foot .mg-card-step:hover,
.mg-deals-hero-actions .mg-card-step:hover {
    background: var(--mg-deal, var(--mg-primary));
    color: var(--mg-deal-ink, #fff);
}

.mg-dg-foot .mg-card-stepper {
    --mg-step: 34px;
    padding: 3px;
}

.mg-dg-foot .mg-card-step {
    width: 26px;
    height: 26px;
}

.mg-deals-hero-actions .mg-card-stepper {
    --mg-step: 52px;
    justify-content: space-between;
    width: 100%;
    padding: 6px;
    border-radius: 16px;
}

.mg-deals-hero-actions .mg-card-step {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}

.mg-deals-hero-actions .mg-card-step-qty b {
    font-size: 1.15rem;
}

@media (max-width: 576px) {
    .mg-card-stepper {
        --mg-step: 34px;
        padding: 3px;
        margin-inline-start: 0.25rem;
    }
    .mg-card-step {
        width: 26px;
        height: 26px;
    }
    .mg-card-step svg {
        width: 13px;
        height: 13px;
    }
    .mg-card-step-qty {
        min-width: 18px;
    }
    .mg-card-step-qty b {
        font-size: 0.8rem;
    }
    /* کارت گوشی جا ندارد؛ «هر کیلوگرم» زیر قیمت واحد را می‌گوید */
    .mg-card-step-qty small {
        display: none;
    }
    body.mg-card-ticket .mg-product-card .mg-card-footer:has(.mg-card-stepper),
    body .mg-cs-ticket .mg-product-card .mg-card-footer:has(.mg-card-stepper) {
        --mg-ticket-stub: 86px;
    }
    body.mg-card-ticket .mg-product-card .mg-card-stepper,
    body .mg-cs-ticket .mg-product-card .mg-card-stepper {
        margin-block: 6px;
        margin-inline: 7px 6px;
        width: calc(var(--mg-ticket-stub) - 13px);
        padding: 0 2px;
    }
    body.mg-card-ticket .mg-product-card .mg-card-step,
    body .mg-cs-ticket .mg-product-card .mg-card-step {
        width: 24px;
        height: 24px;
    }
    body.mg-card-float .mg-product-card .mg-card-stepper,
    body .mg-cs-float .mg-product-card .mg-card-stepper {
        border-radius: 12px;
    }
    body.mg-card-float .mg-product-card .mg-card-step,
    body .mg-cs-float .mg-product-card .mg-card-step {
        border-radius: 9px;
    }
    body.mg-card-lux .mg-product-card .mg-card-stepper,
    body .mg-cs-lux .mg-product-card .mg-card-stepper {
        margin: 8px;
    }
    /* شگفت‌انگیز «شبکه‌ای» در گوشی: انتخاب تعداد یک خط کامل زیر قیمت */
    .mg-dg-foot:has(.mg-card-stepper) {
        flex-wrap: wrap;
    }
    .mg-dg-foot .mg-card-stepper {
        flex: 1 0 100%;
        justify-content: space-between;
    }
    .mg-card-footer .mg-unit-suffix {
        font-size: 0.6rem;
    }
} /* بستنِ @media (max-width: 576px) بالا که در پایانِ فایل باز مانده بود — بی این، قاعده‌های پایین داخلِ آن می‌افتادند. */

/* ============================================
   گزینه‌های هدر / نوار بالا / فوتر / نوارِ پایینِ موبایل (۱۴۰۵/۰۷/۲۵) — `SiteSettings`
   رنگ‌ها فقط از پالت (`CellStyle::COLORS`) و فقط وقتی مدیر انتخاب کرده باشد (کلاسِ `mgx-*`).
   ============================================ */
.mg-top-bar.mgx-tb-text,
.mg-top-bar.mgx-tb-text a { color: var(--mgx-tb-text); }
.mg-footer.mgx-f-bg .mg-footer-main { background: var(--mgx-f-bg); }
.mg-footer.mgx-f-text .mg-footer-main { color: var(--mgx-f-text); }
.mg-mobile-bottom-nav.mgx-mn-icon .mg-bottom-nav-item { color: var(--mgx-mn-icon); }
.mg-mobile-bottom-nav.mgx-mn-active .mg-bottom-nav-item.active { color: var(--mgx-mn-active); }
.mg-logo .mg-custom-logo-img.mgx-logo-custom { width: auto; max-width: 180px; height: 40px; }


/* ============================================
   Header — مدل «بازارچه»
   ردیف اول: لوگو، جستجوی بزرگ با انتخاب دسته، حساب و سبد
   ردیف دوم: «همه دسته‌بندی‌ها» با منوی بزرگ دسته‌ها + منوی اصلی سایت
   ============================================ */
.mg-header--market .mg-header-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.85rem 0;
    min-height: 0;
}

.mg-header--market .mg-logo-wrapper {
    flex-shrink: 0;
}

.mg-hm-search {
    position: relative;
    flex: 1;
    min-width: 0;
    max-width: 680px;
}

.mg-hm-search .mg-hm-search-form {
    display: flex;
    align-items: center;
    padding: 4px;
    background: var(--mg-surface);
    border: 1px solid var(--mg-border);
    border-radius: 14px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mg-hm-search .mg-hm-search-form:focus-within {
    background: var(--mg-bg);
    border-color: var(--mg-primary);
    box-shadow: 0 0 0 4px rgba(var(--mg-primary-rgb), 0.12);
}

.mg-hm-search-cat {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--mg-text-muted);
    border-inline-end: 1px solid var(--mg-border);
}

.mg-hm-search-cat select {
    -webkit-appearance: none;
    appearance: none;
    height: 40px;
    max-width: 150px;
    padding-block: 0;
    padding-inline: 0.85rem 1.85rem;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    text-overflow: ellipsis;
    cursor: pointer;
}

.mg-hm-search.has-cat .mg-hm-search-cat {
    color: var(--mg-primary);
}

.mg-hm-search-cat svg {
    position: absolute;
    inset-inline-end: 0.65rem;
    pointer-events: none;
}

.mg-hm-search .mg-search-input {
    flex: 1;
    width: auto;
    min-width: 0;
    height: 42px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--mg-text);
    font-size: 0.9rem;
}

.mg-hm-search .mg-search-input:focus {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.mg-hm-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-shrink: 0;
    height: 42px;
    padding: 0 1.15rem;
    border: 0;
    border-radius: 11px;
    background: var(--mg-primary);
    color: #ffffff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.2s ease;
}

.mg-hm-search-btn svg {
    width: 18px;
    height: 18px;
}

.mg-hm-search-btn:hover {
    filter: brightness(1.08);
}

.mg-hm-search .mg-search-form.is-loading .mg-hm-search-btn {
    opacity: 0.85;
    pointer-events: none;
}

/* نتایج زنده زیر خود کادر جستجو */
.mg-hm-search .mg-hm-live {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline: 0;
    z-index: 1100;
    margin: 0;
    background: var(--mg-bg);
    box-shadow: 0 24px 60px -18px rgba(15, 23, 42, 0.3);
}

.mg-hm-live .mg-search-live-results {
    max-height: min(62vh, 540px);
}

.mg-hm-live .mg-search-live-item {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.65rem 0.8rem;
}

.mg-hm-live .mg-search-live-item-image {
    width: 56px;
    height: 56px;
}

.mg-header--market .mg-header-actions {
    flex-shrink: 0;
    gap: 0.5rem;
    margin-inline-start: auto;
}

.mg-header--market .mg-hm-account {
    width: auto;
    height: 46px;
    gap: 0.55rem;
    padding: 0 0.6rem;
    margin-inline-end: 0.6rem;
    border-radius: 12px;
    color: var(--mg-text);
}

.mg-header--market .mg-hm-account::after {
    content: '';
    position: absolute;
    inset-inline-end: -0.6rem;
    top: 9px;
    bottom: 9px;
    width: 1px;
    background: var(--mg-border);
}

.mg-header--market .mg-hm-account > svg {
    flex-shrink: 0;
    color: var(--mg-text-muted);
}

.mg-hm-account-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.35;
}

.mg-hm-account-text small {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--mg-text-muted);
}

.mg-hm-account-text b {
    max-width: 130px;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.mg-header--market .mg-wishlist-link,
.mg-header--market .mg-cart-link {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--mg-surface);
}

.mg-header--market .mg-hm-account:hover,
.mg-header--market .mg-wishlist-link:hover,
.mg-header--market .mg-cart-link:hover {
    transform: none;
    background: color-mix(in srgb, var(--mg-primary) 9%, var(--mg-surface));
}

.mg-header--market .mg-hm-account:hover {
    color: var(--mg-text);
}

.mg-header--market .mg-cart-count,
.mg-header--market .mg-wishlist-count {
    top: -5px;
    right: auto;
    left: -5px;
    width: auto;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    background: var(--mg-primary);
    font-size: 0.68rem;
    box-shadow: 0 0 0 2px var(--mg-bg);
}

.mg-hm-bar {
    border-top: 1px solid color-mix(in srgb, var(--mg-border) 70%, transparent);
}

.mg-hm-bar-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 54px;
}

.mg-hm-bar .mg-nav {
    flex: 1;
    justify-content: flex-start;
}

.mg-hm-bar .mg-primary-menu > li > a {
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
}

.mg-hm-allcats-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    height: 40px;
    padding: 0 1rem;
    border: 0;
    border-radius: 11px;
    background: var(--mg-primary);
    color: #ffffff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.mg-hm-allcats-btn svg:last-child {
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.mg-hm-allcats.is-open .mg-hm-allcats-btn svg:last-child {
    transform: rotate(180deg);
}

.mg-hm-allcats-panel {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    z-index: 1001;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    overflow: hidden;
    background: var(--mg-bg);
    border: 1px solid var(--mg-border);
    border-radius: 0 0 var(--mg-radius-lg) var(--mg-radius-lg);
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.25);
    animation: mgHmDrop 0.18s ease;
}

.mg-hm-allcats-panel[hidden] {
    display: none;
}

@keyframes mgHmDrop {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
}

.mg-hm-allcats-list {
    margin: 0;
    padding: 0.5rem;
    list-style: none;
    max-height: min(470px, calc(100vh - 220px));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--mg-surface);
    border-inline-end: 1px solid var(--mg-border);
}

.mg-hm-allcats-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    color: var(--mg-text);
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
}

.mg-hm-allcats .mg-hm-allcats-item img {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    background: var(--mg-bg);
}

.mg-hm-allcats-item span {
    flex: 1;
    min-width: 0;
}

.mg-hm-allcats-item svg {
    flex-shrink: 0;
    opacity: 0.4;
}

.mg-hm-allcats-item.is-active {
    background: var(--mg-bg);
    color: var(--mg-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.mg-hm-allcats-item.is-active svg {
    opacity: 1;
}

.mg-hm-allcats-panes {
    max-height: min(470px, calc(100vh - 220px));
    padding: 1.1rem 1.4rem 1.4rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mg-hm-pane {
    display: none;
}

.mg-hm-pane.is-active {
    display: block;
}

.mg-hm-pane-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--mg-border);
}

.mg-hm-pane-head b {
    color: var(--mg-text);
    font-size: 1rem;
    font-weight: 800;
}

.mg-hm-pane-head a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--mg-primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.mg-hm-pane-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.75rem;
}

.mg-hm-pane-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding: 0.8rem 0.5rem;
    border-radius: 14px;
    color: var(--mg-text);
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.mg-hm-pane-link:hover {
    background: var(--mg-surface);
    color: var(--mg-primary);
}

.mg-hm-pane-img {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    overflow: hidden;
    border-radius: 18px;
    background: var(--mg-surface);
}

.mg-hm-pane-img:empty {
    display: none;
}

.mg-hm-allcats .mg-hm-pane-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mg-hm-pane-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    align-items: start;
    gap: 1.25rem;
}

.mg-hm-pane-body.is-single {
    grid-template-columns: 230px;
}

.mg-hm-pane-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: 18px;
    background: color-mix(in srgb, var(--mg-primary) 6%, var(--mg-surface));
    color: var(--mg-text);
    text-align: center;
    transition: background 0.2s ease;
}

.mg-hm-pane-card:hover {
    background: color-mix(in srgb, var(--mg-primary) 11%, var(--mg-surface));
    color: var(--mg-text);
}

.mg-hm-pane-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 0.4rem;
    overflow: hidden;
    border-radius: 14px;
    background: var(--mg-bg);
}

.mg-hm-allcats .mg-hm-pane-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mg-hm-pane-card:hover .mg-hm-pane-card-img img {
    transform: scale(1.04);
}

.mg-hm-pane-card b {
    font-size: 0.95rem;
    font-weight: 800;
}

.mg-hm-pane-card small {
    color: var(--mg-text-muted);
    font-size: 0.76rem;
}

.mg-hm-pane-card-btn {
    margin-top: 0.45rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: var(--mg-primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
}

.mg-hm-chips {
    display: none;
}

@media (max-width: 992px) {
    .mg-hm-bar {
        display: none;
    }

    .mg-header--market .mg-header-content {
        gap: 0.9rem;
        padding: 0.6rem 0;
    }

    .mg-hm-chips {
        display: flex;
        gap: 0.5rem;
        padding: 0.6rem clamp(1rem, 2vw, 2rem);
        overflow-x: auto;
        scrollbar-width: none;
        background: var(--mg-bg);
        border-bottom: 1px solid color-mix(in srgb, var(--mg-border) 70%, transparent);
    }

    .mg-hm-chips::-webkit-scrollbar {
        display: none;
    }

    .mg-hm-chip {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        flex-shrink: 0;
        height: 34px;
        padding: 0 0.9rem;
        border: 0;
        border-radius: 999px;
        background: var(--mg-surface);
        color: var(--mg-text);
        font: inherit;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }

    .mg-hm-chip.is-all {
        background: var(--mg-primary);
        color: #ffffff;
    }

    .mg-hm-chip svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 767px) {
    .mg-header--market .mg-header-content {
        flex-wrap: wrap;
        gap: 0.55rem 0.75rem;
        padding: 0.55rem 0 0.7rem;
    }

    .mg-header--market .mg-hm-search {
        order: 3;
        flex: 1 0 100%;
        max-width: none;
    }

    .mg-hm-search-cat {
        display: none;
    }

    .mg-hm-search .mg-search-input {
        height: 40px;
        font-size: 0.86rem;
    }

    .mg-hm-search-btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }

    .mg-hm-search-btn span {
        display: none;
    }

    .mg-header--market .mg-wishlist-link {
        width: 42px;
        height: 42px;
    }

    .mg-hm-live .mg-search-live-results {
        max-height: 52vh;
    }
}

/* هدرِ بازارچه بی‌جاوااسکریپت (اسکریپتِ `AllCategoriesMenu` قالب در main.jsِ ما نیست):
   پنل با hover/فوکوس باز می‌شود و ستونِ راست با :has() عوض می‌شود. اگر اسکریپت بعداً آمد،
   همان `hidden`/`is-active` را دست می‌زند و این‌ها مزاحمش نیستند. */
.mg-hm-allcats { align-self: stretch; display: flex; align-items: center; }
.mg-hm-allcats:is(:hover, :focus-within) .mg-hm-allcats-panel[hidden] { display: grid; }
.mg-hm-allcats:is(:hover, :focus-within) .mg-hm-allcats-btn svg:last-child { transform: rotate(180deg); }
.mg-hm-allcats-panes { display: grid; }
.mg-hm-allcats-panes > .mg-hm-pane {
    display: block;
    grid-area: 1 / 1;
    visibility: hidden;
    background: var(--mg-bg);
    transition: visibility 0s linear 0.3s;
}
.mg-hm-allcats-panes > .mg-hm-pane:hover,
.mg-hm-allcats-panel:not(:has(.mg-hm-allcats-item:is(:hover, :focus-visible), .mg-hm-pane:hover)) .mg-hm-pane.is-active {
    visibility: visible;
    transition-delay: 0s;
}
.mg-hm-allcats-item:is(:hover, :focus-visible) {
    background: var(--mg-bg);
    color: var(--mg-primary);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.mg-hm-allcats-item:is(:hover, :focus-visible) svg { opacity: 1; }
.mg-hm-allcats-panel:has(.mg-hm-allcats-item:is(:hover, :focus-visible), .mg-hm-pane:hover) .mg-hm-allcats-item.is-active:not(:hover):not(:focus-visible) {
    background: transparent;
    color: var(--mg-text);
    box-shadow: none;
}
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(1) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(1) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(1):hover) .mg-hm-allcats-list > li:nth-child(1) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(2) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(2) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(2):hover) .mg-hm-allcats-list > li:nth-child(2) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(3) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(3) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(3):hover) .mg-hm-allcats-list > li:nth-child(3) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(4) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(4) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(4):hover) .mg-hm-allcats-list > li:nth-child(4) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(5) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(5) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(5):hover) .mg-hm-allcats-list > li:nth-child(5) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(6) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(6) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(6):hover) .mg-hm-allcats-list > li:nth-child(6) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(7) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(7) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(7):hover) .mg-hm-allcats-list > li:nth-child(7) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(8) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(8) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(8):hover) .mg-hm-allcats-list > li:nth-child(8) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(9) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(9) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(9):hover) .mg-hm-allcats-list > li:nth-child(9) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(10) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(10) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(10):hover) .mg-hm-allcats-list > li:nth-child(10) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(11) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(11) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(11):hover) .mg-hm-allcats-list > li:nth-child(11) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(12) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(12) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(12):hover) .mg-hm-allcats-list > li:nth-child(12) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(13) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(13) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(13):hover) .mg-hm-allcats-list > li:nth-child(13) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(14) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(14) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(14):hover) .mg-hm-allcats-list > li:nth-child(14) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(15) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(15) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(15):hover) .mg-hm-allcats-list > li:nth-child(15) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(16) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(16) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(16):hover) .mg-hm-allcats-list > li:nth-child(16) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(17) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(17) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(17):hover) .mg-hm-allcats-list > li:nth-child(17) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(18) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(18) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(18):hover) .mg-hm-allcats-list > li:nth-child(18) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(19) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(19) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(19):hover) .mg-hm-allcats-list > li:nth-child(19) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(20) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(20) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(20):hover) .mg-hm-allcats-list > li:nth-child(20) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(21) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(21) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(21):hover) .mg-hm-allcats-list > li:nth-child(21) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(22) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(22) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(22):hover) .mg-hm-allcats-list > li:nth-child(22) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(23) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(23) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(23):hover) .mg-hm-allcats-list > li:nth-child(23) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(24) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(24) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(24):hover) .mg-hm-allcats-list > li:nth-child(24) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(25) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(25) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(25):hover) .mg-hm-allcats-list > li:nth-child(25) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(26) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(26) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(26):hover) .mg-hm-allcats-list > li:nth-child(26) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(27) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(27) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(27):hover) .mg-hm-allcats-list > li:nth-child(27) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(28) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(28) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(28):hover) .mg-hm-allcats-list > li:nth-child(28) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(29) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(29) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(29):hover) .mg-hm-allcats-list > li:nth-child(29) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }
.mg-hm-allcats-panel:has(.mg-hm-allcats-list > li:nth-child(30) > .mg-hm-allcats-item:is(:hover, :focus-visible)) .mg-hm-pane:nth-child(30) { visibility: visible; transition-delay: 0s; z-index: 1; }
.mg-hm-allcats-panel:has(.mg-hm-pane:nth-child(30):hover) .mg-hm-allcats-list > li:nth-child(30) > .mg-hm-allcats-item { background: var(--mg-bg); color: var(--mg-primary); }

/* ── مرحلهٔ ۵ ویرایشگرِ دیداری (`CellStyle`): شرطِ «مهمان/عضو»، چسبان، شکلِ لبه ───────────────
   مهمان/عضو روی مرورگر: `bridge.js` پس از گرفتنِ وضعیت `data-mg-who` را روی <html> می‌گذارد. تا آن موقع
   بخشِ «فقط عضو» پنهان و «فقط مهمان» پیداست (صفحهٔ کش‌شده برای مهمان ساخته می‌شود). */
.pg-who-member { display: none !important; }
html[data-mg-who="member"] .pg-who-member { display: revert !important; }
html[data-mg-who="member"] .pg-who-guest { display: none !important; }
html[data-pg-editor] .pg-who-member { display: revert !important; }
.pg-sticky { position: sticky; top: var(--st-sticky, 0px); z-index: 20; }
.pg-shaped { position: relative; }
.pg-shape { position: absolute; left: 0; width: 100%; display: block; pointer-events: none; z-index: 2; }
.pg-shape--top { top: -1px; transform: rotate(180deg); }
.pg-shape--bottom { bottom: -1px; }
.pg-shape--top.is-flip { transform: rotate(180deg) scaleX(-1); }
.pg-shape--bottom.is-flip { transform: scaleX(-1); }

/* ───────── پنجرهٔ بازشوی سایت (۱۴۰۵/۰۷/۲۵) — partials/popup.blade.php + js/popup.js ─────────
   زبانِ دیداریِ «مشاهدهٔ سریع» قالب (`.mg-quickview-*`): پس‌زمینهٔ تار، گوشهٔ گرد، دکمهٔ بستنِ گرد.
   همه `position: fixed` ⇒ هیچ جابه‌جاییِ چیدمان. رنگ‌ها فقط از پالت (`--mg-popup-*` روی دیالوگ). */
.mg-popup[hidden] { display: none !important; }
.mg-popup { position: fixed; z-index: 10000; pointer-events: none; }
.mg-popup--center { inset: 0; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.mg-popup-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(12px); pointer-events: auto; opacity: 0; transition: opacity .25s ease; }
.mg-popup.is-open .mg-popup-backdrop { opacity: 1; }
.mg-popup-dialog {
    position: relative; pointer-events: auto; overflow: auto; max-height: calc(100vh - 3rem);
    background: var(--mg-popup-bg, var(--mg-bg, #fff)); color: var(--mg-popup-text, var(--mg-text));
    border-radius: var(--mg-radius-xl, 20px); box-shadow: var(--mg-shadow-xl, 0 20px 50px rgba(0, 0, 0, .25));
    opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .25s ease, transform .25s ease;
}
.mg-popup-dialog:focus { outline: none; }
.mg-popup.is-open .mg-popup-dialog { opacity: 1; transform: none; }
.mg-popup--small .mg-popup-dialog { width: min(360px, 100%); }
.mg-popup--medium .mg-popup-dialog { width: min(520px, 100%); }
.mg-popup--large .mg-popup-dialog { width: min(760px, 100%); }
.mg-popup--bottom-right, .mg-popup--bottom-left { bottom: 1rem; max-width: calc(100vw - 2rem); }
.mg-popup--bottom-right { right: 1rem; }
.mg-popup--bottom-left { left: 1rem; }
.mg-popup--bottom-right .mg-popup-dialog, .mg-popup--bottom-left .mg-popup-dialog { max-height: calc(100vh - 2rem); }
.mg-popup--top { top: 0; inset-inline: 0; }
.mg-popup--top .mg-popup-dialog { width: 100%; border-radius: 0 0 var(--mg-radius-lg, 14px) var(--mg-radius-lg, 14px); transform: translateY(-100%); display: flex; align-items: center; gap: 1rem; padding-inline-end: 3.5rem; }
.mg-popup--top .mg-popup-media { display: none; }
.mg-popup--top .mg-popup-body { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .75rem 1.25rem; }
.mg-popup--top .mg-popup-title { font-size: 1rem; margin: 0; }
.mg-popup--top .mg-popup-text { margin: 0; }
.mg-popup-close {
    position: absolute; top: .75rem; left: .75rem; z-index: 2; width: 40px; height: 40px; border: none; border-radius: 999px;
    background: var(--mg-surface); color: var(--mg-text); display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; transition: var(--mg-transition, background .2s ease, color .2s ease);
}
.mg-popup-close:hover, .mg-popup-close:focus-visible { background: var(--mg-primary); color: #fff; }
.mg-popup--top .mg-popup-close { top: 50%; transform: translateY(-50%); width: 34px; height: 34px; }
.mg-popup-media img { display: block; width: 100%; height: auto; max-height: 40vh; object-fit: cover; }
.mg-popup-body { padding: 1.5rem; display: grid; gap: .85rem; }
.mg-popup-title { margin: 0; font-size: 1.25rem; font-weight: 700; color: inherit; padding-inline-end: 2.5rem; }
.mg-popup-media + .mg-popup-body .mg-popup-title { padding-inline-end: 0; }
.mg-popup-text { margin: 0; white-space: pre-line; line-height: 1.9; }
.mg-popup-btn { justify-self: start; }
.mg-popup-dialog[style*="--mg-popup-btn"] .mg-popup-btn { background: var(--mg-popup-btn); border-color: var(--mg-popup-btn); }
.mg-popup-newsletter { margin: 0; }
@media (max-width: 767.98px) {
    .mg-popup--bottom-right, .mg-popup--bottom-left { inset-inline: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); max-width: none; }
    .mg-popup--bottom-right .mg-popup-dialog, .mg-popup--bottom-left .mg-popup-dialog { width: 100%; }
    .mg-popup--top .mg-popup-dialog { padding-inline-end: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .mg-popup-backdrop, .mg-popup-dialog { transition: none; }
    .mg-popup-dialog, .mg-popup--top .mg-popup-dialog { transform: none; }
}

/* ============================================================
   بخش‌های تازهٔ صفحه‌ساز (۱۴۰۵/۰۷/۲۵): فراخوان، شمارش معکوس، عکس با نقطه‌های داغ.
   رنگ‌ها فقط متغیرهایی که بلوک از پالتِ برند می‌سازد (`CellStyle::COLORS`)؛ پیش‌فرض‌ها همان متغیرهای قالب.
   ============================================================ */

/* — فراخوان (CTA) — `CallToAction` */
.mg-xcta-box { position: relative; isolation: isolate; overflow: hidden; background: var(--xcta-bg, var(--mg-gradient-primary)); color: var(--xcta-ink, #fff); padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem); }
.mg-xcta--boxed .mg-xcta-box { border-radius: var(--mg-radius); }
.mg-xcta--full { padding-block: 0; }
.mg-xcta--full .mg-xcta-box { padding-inline: 0; }
.mg-xcta--img .mg-xcta-box { background: var(--xcta-img) center / cover no-repeat; }
.mg-xcta--img .mg-xcta-box::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(0, 0, 0, var(--xcta-dim, .4)); }
.mg-xcta-body { display: flex; flex-direction: column; gap: .75rem; max-width: 760px; }
.mg-xcta--center .mg-xcta-body { align-items: center; text-align: center; margin-inline: auto; }
.mg-xcta--right .mg-xcta-body { align-items: flex-start; text-align: right; margin-inline-start: 0; }
.mg-xcta--left .mg-xcta-body { align-items: flex-end; text-align: left; margin-inline-start: auto; }
.mg-xcta-title { margin: 0; font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 800; line-height: 1.4; color: inherit; }
.mg-xcta-text { margin: 0; font-size: clamp(.9rem, 1.6vw, 1.05rem); line-height: 1.9; color: inherit; opacity: .92; white-space: pre-line; }
.mg-xcta-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; }
.mg-xcta--center .mg-xcta-actions { justify-content: center; }
.mg-xcta-btn { background: var(--xcta-ink, #fff); color: var(--xcta-btn-ink, var(--mg-primary)); }
.mg-xcta-btn:hover { transform: translateY(-2px); color: var(--xcta-btn-ink, var(--mg-primary)); }
.mg-xcta-btn2 { background: transparent; color: var(--xcta-ink, #fff); border: 2px solid currentColor; }
.mg-xcta-btn2:hover { color: var(--xcta-ink, #fff); transform: translateY(-2px); }
.mg-xcta--img .mg-xcta-btn { color: var(--mg-primary); }
@media (max-width: 576px) { .mg-xcta-actions { width: 100%; } }

/* — شمارش معکوس — `Countdown` (شمارنده همان `.mg-sale-countdown`ِ قالب؛ این‌جا فقط بزرگ‌ترش می‌کنیم) */
.mg-xcd-box { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding: clamp(1.75rem, 4vw, 3rem) 1.25rem; border-radius: var(--mg-radius); background: var(--xcd-bg, var(--mg-surface)); color: var(--xcd-ink, var(--mg-text)); }
.mg-xcd-title { margin: 0; font-size: clamp(1.25rem, 2.8vw, 1.85rem); font-weight: 800; color: inherit; }
.mg-xcd-sub { margin: .35rem 0 0; font-size: .95rem; color: inherit; opacity: .8; }
.mg-xcd .mg-xcd-timer { margin: 0; }
.mg-xcd .mg-scd-units { gap: .5rem; }
.mg-xcd .mg-scd-unit { min-width: clamp(56px, 12vw, 84px); padding: .65rem .5rem; gap: .35rem; border-radius: var(--mg-radius); background: rgba(255, 255, 255, .7); box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .35); }
.mg-xcd .mg-scd-value { font-size: clamp(1.4rem, 4vw, 2.25rem); min-width: 2ch; color: var(--xcd-num, var(--mg-primary)); }
.mg-xcd .mg-scd-text { font-size: .75rem; color: var(--mg-text-muted); }
.mg-xcd .mg-scd-sep { font-size: 1.4rem; padding-bottom: 1.25rem; color: inherit; opacity: .5; }
.mg-xcd-ended { margin: 0; font-size: 1.05rem; font-weight: 700; color: inherit; }
/* تا شمارنده هست «متنِ پایان» پنهان است؛ سرِ پایان `SaleCountdown` شمارنده را برمی‌دارد ⇒ دکمه پنهان، متن پیدا،
   و اگر متنی نیست کلِ بخش پنهان (صفحهٔ کش‌شده هم پس از پایان بخشِ مرده نشان نمی‌دهد). */
.mg-xcd:has(.mg-xcd-timer) .mg-xcd-ended { display: none; }
.mg-xcd:not(:has(.mg-xcd-timer)) .mg-xcd-actions { display: none; }
.mg-xcd:not(:has(.mg-xcd-timer)):not(:has(.mg-xcd-ended)) { display: none; }

/* — عکس با نقطه‌های داغ — `Hotspot` (بی اسکریپت؛ `:hover`/`:focus-within`) */
.mg-xhs-stage { position: relative; border-radius: var(--mg-radius); overflow: visible; }
.mg-xhs-img { display: block; width: 100%; height: auto; border-radius: var(--mg-radius); }
.mg-xhs-spot { position: absolute; left: var(--x, 50%); top: var(--y, 50%); transform: translate(-50%, -50%); z-index: 1; }
.mg-xhs-spot:hover, .mg-xhs-spot:focus-within { z-index: 3; }
.mg-xhs-dot { position: relative; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 3px solid #fff; border-radius: 50%; background: var(--xhs-dot, var(--mg-primary)); color: #fff; font-size: 1.1rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.mg-xhs-dot::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--xhs-dot, var(--mg-primary)); animation: mgXhsPulse 2s ease-out infinite; pointer-events: none; }
.mg-xhs-dot:focus-visible { outline: 3px solid var(--mg-accent); outline-offset: 3px; }
.mg-xhs-dot span { transition: transform .2s ease; }
.mg-xhs-spot:is(:hover, :focus-within) .mg-xhs-dot span { transform: rotate(45deg); }
@keyframes mgXhsPulse { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mg-xhs-dot::after { animation: none; } }
.mg-xhs-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); width: max-content; max-width: min(240px, 70vw); display: flex; flex-direction: column; gap: .3rem; padding: .7rem .85rem; border-radius: var(--mg-radius-sm); background: #fff; color: var(--mg-text); box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .35); text-align: right; visibility: hidden; opacity: 0; transition: opacity .15s ease, visibility .15s; }
.mg-xhs-spot:is(:hover, :focus-within) .mg-xhs-tip { visibility: visible; opacity: 1; }
.mg-xhs-spot--down .mg-xhs-tip { bottom: auto; top: calc(100% + 10px); }
.mg-xhs-spot--start .mg-xhs-tip { left: 0; transform: none; }
.mg-xhs-spot--end .mg-xhs-tip { left: auto; right: 0; transform: none; }
.mg-xhs-tip-title { font-size: .9rem; font-weight: 700; }
.mg-xhs-tip-text { font-size: .8rem; line-height: 1.7; color: var(--mg-text-muted); white-space: pre-line; }
.mg-xhs-tip-link { align-self: flex-start; font-size: .8rem; font-weight: 700; color: var(--mg-primary); }
@media (max-width: 576px) { .mg-xhs-dot { width: 26px; height: 26px; border-width: 2px; font-size: .95rem; } }

/* فرمِ «تماس با ما» (۱۴۰۵/۰۷/۲۵) — پیامِ وضعیت زیرِ فرم (`bridge.js`). */
.mg-contact-form-block .mg-contact-form { max-width: 860px; margin-inline: auto; }
.mg-cf-status { margin: 0; padding: 10px 14px; border-radius: var(--mg-radius); font-size: .92rem; }
.mg-cf-status.is-ok { background: rgba(21, 128, 61, .1); color: #15803d; }
.mg-cf-status.is-bad { background: rgba(185, 28, 28, .08); color: #b91c1c; }

/* ردیفِ بنر روی سایت: عکس داخلِ <picture> است و خانه flex ⇒ <picture> به اندازهٔ طبیعیِ عکس جمع می‌شد و
   بنر باریک‌تر از خانه‌اش با فاصلهٔ خالی دیده می‌شد (در ویرایشگر درست). <picture> باید کلِ خانه را پر کند. */
.mg-banner-cell > picture { flex: 1 1 auto; width: 100%; height: 100%; min-width: 0; }

/* آیکونِ پاپ‌آپ (۱۴۰۵/۰۷/۲۵): آیکونِ آمادهٔ قالب یا عکسِ دلخواه؛ رنگ از پالت (`--mg-popup-icon`). */
.mg-popup-icon { --_c: var(--mg-popup-icon, var(--mg-primary)); width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; color: var(--_c); justify-self: start; }
.mg-popup-icon svg { width: 34px; height: 34px; }
.mg-popup-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mg-popup-icon--circle, .mg-popup-icon--square { background: color-mix(in srgb, var(--_c) 12%, transparent); }
.mg-popup-icon--circle { border-radius: 50%; }
.mg-popup-icon--square { border-radius: 16px; }
.mg-popup-icon--circle img, .mg-popup-icon--square img { width: 70%; height: 70%; }
.mg-popup-icon--plain svg { width: 48px; height: 48px; }
.mg-popup--top .mg-popup-icon { width: 40px; height: 40px; }
.mg-popup--top .mg-popup-icon svg { width: 22px; height: 22px; }

/* «بنرِ کالا» (`storefront/partials/banner-card`، ۱۴۰۵/۰۷/۲۵): همان کارتِ «پیشنهاد ویژه»ی مهرگان (`mg-mini-*`).
   در ردیفِ بنر قابِ کارت کلِ خانه را پر می‌کند؛ «عکس سمتِ راست» = جابه‌جاییِ دو ستون. */
.mg-banner-cell--card { background: none; }
.mg-banner-cell--card > .mg-bcard-cell { width: 100%; height: 100%; border-radius: inherit; }
.mg-bcard { width: 100%; background: var(--mg-hb-card-bg, #f3f5f8); }
.mg-bcard--img-right { flex-direction: row-reverse; }
.mg-hb-card--bcard { display: block; color: inherit; text-decoration: none; }
.mg-hb-card--bcard:hover { color: inherit; }
/* بنرِ کالا در خانهٔ کوتاه (ردیفِ بنر روی گوشی/تبلت): اول زیرتیتر، بعد برچسب و شمارنده کنار می‌روند تا تیتر،
   قیمت و دکمه بریده نشوند (`.mg-hb-card` خودش ظرفِ اندازه است). */
@container (max-height: 210px) {
    .mg-bcard .mg-mini-meta { display: none; }
    .mg-bcard .mg-mini-body { gap: 4px; padding: 10px 14px 12px; }
    .mg-bcard .mg-mini-title { -webkit-line-clamp: 1; }
}
@container (max-height: 160px) {
    .mg-bcard .mg-mini-label, .mg-bcard .mg-mini-countdown { display: none; }
}

/* ظاهرِ جدای هر «بنرِ کالا» (۱۴۰۵/۰۷/۲۶، `BannerCard::styleAttrs`): هر کلاس فقط وقتی هست که همان کلید تنظیم شده؛
   نبودنش = همان اندازه/رنگِ قالب. در کارتِ باریک (گوشی) نوشته‌ها ۸۵٪ می‌شوند (`--bc-k`). */
.mg-bcard.bc-fs-label .mg-mini-label { font-size: calc(var(--bc-label-fs) * var(--bc-k, 1)); }
.mg-bcard.bc-fs-title .mg-mini-title { font-size: calc(var(--bc-title-fs) * var(--bc-k, 1)); }
.mg-bcard.bc-fs-subtitle .mg-mini-meta { font-size: calc(var(--bc-subtitle-fs) * var(--bc-k, 1)); }
.mg-bcard.bc-fs-price .mg-mini-price :is(ins .amount, .mg-price-col > .amount) { font-size: calc(var(--bc-price-fs) * var(--bc-k, 1)); }
.mg-bcard.bc-fs-button .mg-mini-btn { font-size: calc(var(--bc-button-fs) * var(--bc-k, 1)); }
.mg-bcard.bc-c-label .mg-mini-label { color: var(--bc-label-c); }
.mg-bcard.bc-c-title .mg-mini-title { color: var(--bc-title-c); }
.mg-bcard.bc-c-subtitle .mg-mini-meta { color: var(--bc-subtitle-c); }
.mg-bcard.bc-c-price .mg-mini-price :is(ins, ins .amount, .mg-price-col > .amount) { color: var(--bc-price-c); }
.mg-bcard.bc-c-button .mg-mini-btn { color: var(--bc-button-c); }
/* قلم و ضخامتِ هر متن (۱۴۰۵/۰۷/۲۶). ضخامت با خانوادهٔ جدای «Vazirmatn BC» که هر هفت وزن را واقعاً دارد —
   `@font-face`های بالای فایل ۳۰۰/۹۰۰ را با معمولی/خیلی‌پررنگ پر می‌کنند و دست‌زدن به آن‌ها ظاهرِ کلِ سایت را عوض می‌کرد.
   فایلِ هر وزن فقط وقتی بار می‌شود که بنری همان وزن را بخواهد. */
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Vazirmatn BC'; src: url('../../../fonts/Vazirmatn-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }
.mg-bcard.bc-w-label .mg-mini-label,
.mg-bcard.bc-w-title .mg-mini-title,
.mg-bcard.bc-w-subtitle .mg-mini-meta,
.mg-bcard.bc-w-price .mg-mini-price :is(ins, ins .amount, .mg-price-col > .amount),
.mg-bcard.bc-w-button .mg-mini-btn { font-family: 'Vazirmatn BC', var(--mg-font-family); }
.mg-bcard.bc-w-label .mg-mini-label { font-weight: var(--bc-label-w); }
.mg-bcard.bc-w-title .mg-mini-title { font-weight: var(--bc-title-w); }
.mg-bcard.bc-w-subtitle .mg-mini-meta { font-weight: var(--bc-subtitle-w); }
.mg-bcard.bc-w-price .mg-mini-price :is(ins, ins .amount, .mg-price-col > .amount) { font-weight: var(--bc-price-w); }
.mg-bcard.bc-w-button .mg-mini-btn { font-weight: var(--bc-button-w); }
/* قلم‌های جدای بنر (`BannerCard::FONTS`، همه OFL). قلمِ دووزنی: معمولی برای ۱۰۰–۵۰۰، پررنگ برای ۶۰۰–۹۰۰
   تا ضخامتِ انتخابی به نزدیک‌ترین وزنِ واقعی برسد؛ تک‌وزنی‌ها همهٔ بازه را می‌گیرند (بی پررنگیِ ساختگی).
   قلم‌های گوگل فقط زیرمجموعهٔ عربی/فارسی‌اند؛ رقم و حرفِ لاتین از وزیرمتن (دنبالهٔ font-family). */
@font-face { font-family: 'BC Estedad'; src: url('../../../fonts/banner/estedad-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Estedad'; src: url('../../../fonts/banner/estedad-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Sahel'; src: url('../../../fonts/banner/sahel-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Sahel'; src: url('../../../fonts/banner/sahel-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Shabnam'; src: url('../../../fonts/banner/shabnam-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Shabnam'; src: url('../../../fonts/banner/shabnam-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Samim'; src: url('../../../fonts/banner/samim-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Samim'; src: url('../../../fonts/banner/samim-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Tanha'; src: url('../../../fonts/banner/tanha-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'BC Parastoo'; src: url('../../../fonts/banner/parastoo-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Parastoo'; src: url('../../../fonts/banner/parastoo-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Gandom'; src: url('../../../fonts/banner/gandom-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'BC Lalezar'; src: url('../../../fonts/banner/lalezar-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'BC Kufi'; src: url('../../../fonts/banner/kufi-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'BC Amiri'; src: url('../../../fonts/banner/amiri-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Amiri'; src: url('../../../fonts/banner/amiri-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Ruqaa'; src: url('../../../fonts/banner/ruqaa-400.woff2') format('woff2'); font-weight: 100 500; font-display: swap; }
@font-face { font-family: 'BC Ruqaa'; src: url('../../../fonts/banner/ruqaa-700.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'BC Nastaliq'; src: url('../../../fonts/banner/nastaliq-400.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
.mg-bcard.bc-f-label .mg-mini-label { font-family: var(--bc-label-f); }
.mg-bcard.bc-f-title .mg-mini-title { font-family: var(--bc-title-f); }
.mg-bcard.bc-f-subtitle .mg-mini-meta { font-family: var(--bc-subtitle-f); }
.mg-bcard.bc-f-price .mg-mini-price :is(ins, ins .amount, .mg-price-col > .amount) { font-family: var(--bc-price-f); }
.mg-bcard.bc-f-button .mg-mini-btn { font-family: var(--bc-button-f); }
.mg-bcard.bc-btn-bg .mg-mini-btn, .mg-bcard.bc-btn-bg:hover .mg-mini-btn { background: var(--bc-button-bg); }
.mg-bcard.bc-bg, .mg-hb-card--products .mg-bcard.bc-bg { background: var(--bc-bg); }
.mg-bcard.bc-img .mg-mini-media { flex-basis: clamp(22%, calc(42% * var(--bc-img)), 63%); }
@container (max-width: 250px) {
    .mg-bcard { --bc-k: .85; }
    .mg-bcard.bc-img .mg-mini-media { flex-basis: clamp(30%, calc(46% * var(--bc-img)), 70%); }
}

/* ارتفاعِ هر کارتِ کناریِ اسلایدر جدا (`MgHero.split`؛ فقط کنارِ اسلایدر با دو کارت، کامپیوتر). */
@media (min-width: 992px) {
    .mg-hero-block.mg-hb--split.mg-hb--layout-side-left .mg-hb-small,
    .mg-hero-block.mg-hb--split.mg-hb--layout-side-right .mg-hb-small {
        grid-template-rows: minmax(0, var(--mg-hb-r1, 1fr)) minmax(0, var(--mg-hb-r2, 1fr));
    }
}

/* اندازهٔ نوشته‌های هر بخش (`CellStyle` ‹tfs›/‹xfs›): کلاسِ هر دستگاه فقط وقتی مقدار دارد؛ کوچک‌تر از بزرگ‌تر ارث می‌برد. */
.pg-tfs-d :is(.mg-section-title, h2) { font-size: var(--st-tfs); }
.pg-xfs-d :is(.mg-section-subtitle, p) { font-size: var(--st-xfs); }
@media (max-width: 1023px) {
    .pg-tfs-t :is(.mg-section-title, h2) { font-size: var(--st-tfs-t); }
    .pg-xfs-t :is(.mg-section-subtitle, p) { font-size: var(--st-xfs-t); }
}
@media (max-width: 767px) {
    .pg-tfs-m :is(.mg-section-title, h2) { font-size: var(--st-tfs-m); }
    .pg-xfs-m :is(.mg-section-subtitle, p) { font-size: var(--st-xfs-m); }
}

/* ── قابِ عکسِ کارتِ کالا: عکس کلِ باکس را پر کند — همه‌جا، بی استثنا (خواستِ مالک ۱۴۰۵/۰۷/۲۸) ──
   تنها خانهٔ این قانون. شکل‌های قالب (شناور/بلیتی/لوکس/ساده و نسخهٔ بخش‌به‌بخشِ `.mg-cs-*`) عکس را
   `contain` با ۱۰٪ فاصله و multiply نشان می‌دادند (برای عکسِ دوربریده روی سفید) و قانونِ قبلیِ «پرکردن»
   با `body:not(.mg-supplier)` نوشته شده بود: «کالکشن نقره» (فاطر) بیرون می‌ماند و هر بخشی که شکلِ کارتِ
   خودش را داشت با انتخابگرِ قوی‌ترش آن را می‌شکست. حالا `!important` و بی‌استثنا ⇒ هر کالای تازه،
   هر صفحه (فروشگاه، دسته، جست‌وجو، کالکشن نقره، علاقه‌مندی‌ها) و هر شکلِ کارت همین قاب را دارد.
   نگهبان: `ShopCardPhotoFrameTest`. */
.mg-product-card .mg-product-image-wrapper { background: #fff !important; overflow: hidden !important; }
.mg-product-card .mg-product-image-wrapper > a {
    display: block !important; width: 100% !important; height: 100% !important; padding: 0 !important;
    background: transparent !important; border-radius: inherit;
}
.mg-product-card .mg-product-image-wrapper img {
    width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
    object-fit: cover !important; object-position: center !important; padding: 0 !important; margin: 0 !important;
    mix-blend-mode: normal !important; border-radius: inherit;
}
.mg-product-card .mg-product-image-wrapper::after { content: none !important; }
.mg-product-card .mg-product-image-wrapper::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
    background: linear-gradient(180deg, rgba(var(--mg-primary-rgb), .10) 0%, rgba(var(--mg-primary-rgb), 0) 22%);
}

/* ── دسته‌ها: دکمه‌های ورق (۱۴۰۵/۰۷/۲۸) — دسته‌های بیشتر از یک ردیف غیب نمی‌شوند، ورق می‌خورند ── */
.mg-categories-wrapper { position: relative; }
.mg-cat-nav {
    position: absolute; top: 42%; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
    background: #fff; color: var(--mg-primary); border: 1px solid rgba(var(--mg-primary-rgb), .18);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); transform: translateY(-50%); transition: background .2s, color .2s, opacity .2s;
}
.mg-cat-nav:hover { background: var(--mg-primary); color: #fff; }
.mg-cat-prev { inset-inline-start: -6px; }
.mg-cat-next { inset-inline-end: -6px; }
.mg-cat-nav.swiper-button-disabled { opacity: .35; cursor: default; }
.mg-cat-nav.swiper-button-lock { display: none; }
@media (max-width: 767px) { .mg-cat-nav { width: 34px; height: 34px; } .mg-cat-prev { inset-inline-start: 0; } .mg-cat-next { inset-inline-end: 0; } }
/* رنگِ دلخواهِ دسته در شکل‌های قدیمی (دایره/کارت/جعبه) ⇒ زمینه و حاشیهٔ عکس. */
.mg-category-card[style*="--mg-cat-c"] .mg-category-image-wrapper {
    background: color-mix(in srgb, var(--mg-cat-c) 14%, #fff); box-shadow: 0 0 0 2px color-mix(in srgb, var(--mg-cat-c) 45%, transparent);
}
