/* ============================================================
   MarketPersian CMS v3 — assets/mpb.css
   Shared visual styles for the page-builder blocks (.mpb-*).
   Theme-agnostic contract:
   - never sets page/body background or font-family (themes own those)
   - neutral semi-transparent surfaces work on dark AND light themes
   - accent = var(--primary) / var(--secondary) (set by every theme)
   - color-mix() lines always come AFTER a plain rgba fallback
   - RTL-first: logical properties only (site is dir="rtl")
   Breakpoints: 1200 / 1120 / 992 / 900 / 860 / 768 / 700 / 600 / 560 / 400
   ============================================================ */

/* ---------- scoped resets & shared bits ---------- */
.mpb,
.mpb *,
.mp-pag,
.mp-pag * { box-sizing: border-box; }

.mpb img { max-width: 100%; height: auto; }

.mp-ic { flex: 0 0 auto; vertical-align: middle; }

.mpb a:focus-visible,
.mpb button:focus-visible,
.mp-pag a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- container + section rhythm ---------- */
.mpb-container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 18px;
}

.mpb { padding-block: 32px; }
.mpb-hero { padding-block: 0; } /* hero is full-bleed and manages its own padding */

/* ---------- reveal on scroll (hook class added by mpb.js) ---------- */
.mpb-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}
.mpb-reveal.is-in { opacity: 1; transform: none; }

/* ---------- section head ---------- */
.mpb-sect-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 20px;
}
.mpb-sect-title {
  position: relative;
  margin: 0;
  padding-inline-start: 16px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.5;
  color: inherit;
  overflow-wrap: anywhere;
}
.mpb-sect-title::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.mpb-sect-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-inline-start: auto;
  padding: 7px 15px;
  border-radius: 99px;
  background: rgba(127,127,127,.07);
  border: 1px solid rgba(127,127,127,.18);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.mpb-sect-more:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ---------- buttons ---------- */
.mpb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .25s, background-color .25s, border-color .25s, color .2s;
}
.mpb-btn:active { transform: translateY(0) scale(.98); }

.mpb-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 35%, transparent);
}
.mpb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.22);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 45%, transparent);
}

.mpb-btn-ghost {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid rgba(127,127,127,.4);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
}
.mpb-btn-ghost:hover {
  background: rgba(127,127,127,.08);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  transform: translateY(-2px);
}

.mpb-btn-light {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.mpb-btn-light:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}

/* ============================================================
   Slider core (hero + carousel) — behavior lives in mpb.js
   ============================================================ */
.mpb-slider-viewport {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mpb-slider-viewport::-webkit-scrollbar { display: none; }

.mpb-slider-track {
  display: flex;
  gap: 16px;
}

.mpb-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

/* ---------- arrows (glass circles) ---------- */
.mpb-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(127,127,127,.3);
  background: rgba(127,127,127,.15);
  color: inherit;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: background-color .25s, border-color .25s, color .2s, opacity .25s, box-shadow .25s;
}
.mpb-arr:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.mpb-arr.is-end { opacity: .35; pointer-events: none; }
.mpb-arr-prev { inset-inline-start: 14px; }
.mpb-arr-next { inset-inline-end: 14px; }
/* in RTL the arrows travel the other way — mirror their chevrons */
[dir="rtl"] .mpb-arr .mp-ic { transform: scaleX(-1); }

/* ---------- dots (30px+ tap area via ::before) ---------- */
.mpb-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.mpb-dot {
  appearance: none;
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.mpb-dot::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(127,127,127,.35);
  transition: width .25s, background-color .25s;
}
.mpb-dot.active::before {
  width: 26px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* ============================================================
   Hero slider (full-bleed)
   ============================================================ */
.mpb-hero {
  position: relative;
  overflow: hidden;
}
.mpb-slide-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(300px, 42vw, 560px);
  padding: 72px 0 84px;
  padding-inline: 18px;
  padding-inline: max(18px, calc((100% - 1144px) / 2)); /* mirrors .mpb-container math */
  background: linear-gradient(135deg, rgba(127,127,127,.06), rgba(127,127,127,.02));
  background-size: cover;
  background-position: center;
}
/* dark scrim only when a real photo is present → white text stays readable
   on every theme (including light ones) */
.mpb-slide-hero.has-bg {
  color: #fff;
  background-size: cover;
  background-position: center;
}
.mpb-slide-hero.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,6,24,.25), rgba(10,6,24,.78));
}
.mpb-slide-inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin-inline-end: auto; /* hug the inline-start (right) side in RTL */
  text-shadow: 0 1px 2px rgba(0,0,0,.18), 0 4px 18px rgba(0,0,0,.12);
}
.mpb-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(127,127,127,.1);
  border: 1px solid rgba(127,127,127,.28);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}
.mpb-slide-hero.has-bg .mpb-slide-badge {
  color: #fff;
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.35);
}
.mpb-slide-title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 4.5vw, 2.7rem);
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.mpb-slide-sub {
  margin: 0 0 20px;
  max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.9;
  opacity: .85;
}
.mpb-slide-inner .mpb-btn { margin-top: 6px; }

/* hero dots float over the slide */
.mpb-hero .mpb-dots {
  position: absolute;
  bottom: 18px;
  inset-inline: 0;
  justify-content: center;
  z-index: 2;
}

/* ============================================================
   App carousel — contained viewport, 4/3/2/1 per view
   (breakpoints kept in sync with perView() in mpb.js)
   ============================================================ */
.mpb-carousel .mpb-slider-viewport {
  max-width: 1216px; /* 1180 + 2×18 padding */
  margin-inline: auto;
  padding-inline: 18px;
  scroll-padding-inline: 18px; /* snap against content edges, not padding */
}
.mpb-carousel .mpb-slide { display: flex; }
.mpb-carousel .mpb-app-card { flex: 1; width: 100%; height: 100%; }
[data-mpb-carousel] .mpb-slide { flex-basis: calc((100% - 48px) / 4); }

.mpb-carousel-nav {
  position: relative; /* arrows anchor to this control bar */
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  margin-top: 16px;
}
.mpb-carousel .mpb-dots {
  justify-content: center;
  margin-inline: auto;
}

/* ============================================================
   Category icons strip (touch scroll row)
   ============================================================ */
.mpb-caticons-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(96px, 1fr);
  gap: 12px;
  padding-block: 6px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mpb-caticons-row::-webkit-scrollbar { display: none; }
.mpb-caticons-row > * { scroll-snap-align: start; }

.mpb-catitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 8px;
  border-radius: 16px;
  background: rgba(127,127,127,.06);
  border: 1px solid rgba(127,127,127,.14);
  color: inherit;
  text-align: center;
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s, background-color .25s;
}
.mpb-catitem:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 10px 22px rgba(0,0,0,.1);
}
.mpb-catitem-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--primary);
  background: rgba(127,127,127,.08);
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}
.mpb-catitem-name {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.mpb-catitem-n {
  font-size: 11px;
  opacity: .6;
}

/* ============================================================
   Featured app (Digikala-style banner)
   ============================================================ */
.mpb-feat-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 34px;
  align-items: center;
}
.mpb-feat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--secondary);
  background: rgba(127,127,127,.1);
  background: color-mix(in srgb, var(--secondary) 14%, transparent);
  border: 1px solid rgba(127,127,127,.22);
  border-color: color-mix(in srgb, var(--secondary) 35%, transparent);
}
.mpb-feat-title {
  margin: 14px 0 10px;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.5;
  color: inherit;
  overflow-wrap: anywhere;
}
.mpb-feat-title .mp-verified,
.mpb-ac-title .mp-verified { flex: 0 0 auto; }
.mpb-feat-desc {
  margin: 0;
  line-height: 2;
  opacity: .85;
}
.mpb-feat-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin: 18px 0 4px;
}
.mpb-feat-stat { min-width: 90px; }
.mpb-feat-stat b {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.mpb-feat-stat span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  opacity: .6;
}
.mpb-feat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.mpb-feat-shot {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
.mpb-feat-icon {
  width: auto;
  max-width: 220px;
  border-radius: 28px;
  border: 1px solid rgba(127,127,127,.15);
  box-shadow: 0 18px 44px rgba(0,0,0,.16);
}
/* phone mockup */
.mpb-phone {
  position: relative;
  width: 100%;
  max-width: 250px;
  aspect-ratio: 9 / 19;
  border-radius: 34px;
  border: 6px solid rgba(127,127,127,.28);
  overflow: hidden;
  background: rgba(127,127,127,.08);
  box-shadow: 0 26px 54px rgba(0,0,0,.2);
}
.mpb-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mpb-phone-notch {
  position: absolute;
  top: 8px;
  inset-inline: 0;
  margin-inline: auto;
  width: 86px;
  height: 20px;
  border-radius: 99px;
  background: rgba(0,0,0,.55);
  z-index: 2;
}

/* ============================================================
   App grid + card
   ============================================================ */
.mpb-app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mpb-app-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(127,127,127,.06);
  border: 1px solid rgba(127,127,127,.14);
  color: inherit;
  text-decoration: none;
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.mpb-app-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
}
.mpb-ac-ic {
  display: block;
  line-height: 0;
}
.mpb-ac-ic img {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}
.mpb-ac-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.mpb-ac-cat {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}
.mpb-ac-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.8;
  opacity: .65;
}
.mpb-ac-meta {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  border-top: 1px dashed rgba(127,127,127,.16);
}
.mpb-ac-meta > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: .7;
}
.mpb-ac-open {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--primary);
  font-weight: 700;
}

/* ============================================================
   Stats row (animated counters)
   ============================================================ */
.mpb-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
}
.mpb-stat {
  padding: 22px 14px;
  border-radius: 18px;
  background: rgba(127,127,127,.06);
  border: 1px solid rgba(127,127,127,.14);
  text-align: center;
}
.mpb-stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--primary); /* fallback if background-clip:text is unsupported */
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .mpb-stat-num {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.mpb-stat-lbl {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  opacity: .65;
}

/* ============================================================
   Rich text block
   ============================================================ */
.mpb-rt-title {
  position: relative;
  margin: 0 0 16px;
  padding-inline-start: 16px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.5;
  color: inherit;
  overflow-wrap: anywhere;
}
.mpb-rt-title::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  bottom: 5px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}
.mpb-rt-body { overflow-wrap: break-word; }
.mpb-rt-body p { margin: 0 0 1.1em; line-height: 2.1; }
.mpb-rt-body h2,
.mpb-rt-body h3 { margin: 1.4em 0 .6em; line-height: 1.5; color: inherit; }
.mpb-rt-body h3 { font-size: 1.15rem; color: var(--primary); }
.mpb-rt-body ul,
.mpb-rt-body ol { margin: 0 0 1.1em; padding-inline-start: 1.2em; line-height: 2; }
.mpb-rt-body a { color: var(--primary); }
.mpb-rt-body img { border-radius: 12px; }
.mpb-rt-body blockquote {
  margin: 1.2em 0;
  padding: 14px 18px;
  border-inline-start: 4px solid var(--primary);
  border-radius: 12px;
  background: rgba(127,127,127,.06);
}
.mpb-rt-body code,
.mpb-rt-body pre {
  direction: ltr;
  unicode-bidi: embed;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: rgba(127,127,127,.12);
  border-radius: 8px;
}
.mpb-rt-body code { display: inline-block; padding: 2px 7px; font-size: .85em; }
.mpb-rt-body pre { padding: 14px; overflow-x: auto; text-align: start; }

/* ============================================================
   Image banner (inline border-radius comes from PHP)
   ============================================================ */
.mpb-banner .mpb-container > a,
.mpb-banner .mpb-container > div {
  display: block;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
}
.mpb-banner img {
  display: block;
  width: 100%;
  object-fit: cover;
}

/* ============================================================
   CTA gradient box
   ============================================================ */
.mpb-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 34px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.2);
}
.mpb-cta-box h3 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}
.mpb-cta-txt p {
  margin: 6px 0 0;
  line-height: 1.9;
  opacity: .92;
}

/* ============================================================
   Blog-latest block (post cards themselves live in blog.css)
   ============================================================ */
.mpb-blog .mpb-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ============================================================
   HTML block / spacer
   ============================================================ */
.mpb-html { overflow-wrap: break-word; }
.mpb-html p { line-height: 2; }
.mpb-html img { border-radius: 12px; }
.mpb-spacer { width: 100%; }

/* ============================================================
   Pagination (shared with blog pages — markup from helpers.php)
   ============================================================ */
.mp-pag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 28px 0 8px;
}
.mp-pag-info { font-size: 12.5px; opacity: .65; }
.mp-pag-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.mp-pag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 14px;
  border: 1px solid rgba(127,127,127,.22);
  background: rgba(127,127,127,.05);
  color: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color .2s, color .2s, background-color .2s, transform .2s;
}
.mp-pag-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.mp-pag-btn.is-active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  color: #fff;
}
.mp-pag-btn.is-dis { opacity: .4; pointer-events: none; }
.mp-pag-dots { align-self: center; opacity: .55; padding: 0 2px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
  .mpb-feat-grid { gap: 26px; }
}

@media (max-width: 1120px) {
  .mpb-app-grid { grid-template-columns: repeat(3, 1fr); }
  [data-mpb-carousel] .mpb-slide { flex-basis: calc((100% - 32px) / 3); }
}

@media (max-width: 992px) {
  .mpb { padding-block: 26px; }
  .mpb-carousel-nav { min-height: 48px; }
}

@media (max-width: 900px) {
  .mpb-feat-grid { grid-template-columns: 1fr; gap: 28px; }
  .mpb-feat-shot { justify-content: center; }
  .mpb-blog .mpb-post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .mpb-app-grid { grid-template-columns: repeat(2, 1fr); }
  [data-mpb-carousel] .mpb-slide { flex-basis: calc((100% - 16px) / 2); }
}

@media (max-width: 768px) {
  .mpb { padding-block: 22px; }
  .mpb-sect-title { font-size: 1.2rem; }
  .mpb-slide-hero {
    min-height: clamp(280px, 54vw, 440px);
    padding: 56px 0 80px;
  }
  .mpb-cta-box { padding: 24px 22px; }
  .mpb-cta-box h3 { font-size: 1.25rem; }
}

@media (max-width: 700px) {
  .mpb-cta-box {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 600px) {
  .mpb-blog .mpb-post-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .mpb-container { padding-inline: 16px; }
  .mpb-carousel .mpb-slider-viewport {
    padding-inline: 16px;
    scroll-padding-inline: 16px;
  }
  .mpb-slide-hero { padding-inline: 16px; }
  .mpb-app-grid { grid-template-columns: 1fr; gap: 12px; }
  [data-mpb-carousel] .mpb-slide { flex-basis: 100%; }
  .mpb-feat-stats { gap: 10px 18px; }
  .mpb-sect-more { padding: 6px 12px; }
}

@media (max-width: 400px) {
  .mpb-container { padding-inline: 14px; }
  .mpb-carousel .mpb-slider-viewport {
    padding-inline: 14px;
    scroll-padding-inline: 14px;
  }
  .mpb-slide-hero { padding-inline: 14px; }
  .mpb-slide-inner .mpb-btn { width: 100%; }
  .mpb-feat-actions .mpb-btn { flex: 1 1 100%; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .mpb-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .mpb-btn:hover,
  .mpb-sect-more:hover,
  .mpb-catitem:hover,
  .mpb-app-card:hover,
  .mp-pag-btn:hover {
    transform: none;
  }
  .mpb-dot::before { transition: none; }
}

/* =============================================================
   Footer social brand icons (shared across all themes)
   Real SVG brand marks + per-network hover colors.
   ============================================================= */
.mpf-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(127, 127, 127, 0.18);
  background: rgba(127, 127, 127, 0.06);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mpf-social .mp-so-ic { display: block; }
.mpf-social:hover {
  transform: translateY(-3px);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.mpf-social:focus-visible { outline: 2px solid var(--primary, #6366f1); outline-offset: 2px; }
.mpf-social.mp-so-telegram:hover  { background: #229ed9; }
.mpf-social.mp-so-instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.mpf-social.mp-so-eitaa:hover     { background: #ef7f1a; }
.mpf-social.mp-so-bale:hover      { background: #5e6ad2; }
.mpf-social.mp-so-aparat:hover    { background: #c4175b; }
.mpf-social.mp-so-twitter:hover   { background: #111; }
.mpf-social.mp-so-linkedin:hover  { background: #0a66c2; }
.mpf-social.mp-so-github:hover    { background: #24292e; }
.mpf-social.mp-so-whatsapp:hover  { background: #25d366; }
.mpf-social.mp-so-youtube:hover   { background: #ff0000; }
.mpf-social.mp-so-custom:hover    { background: var(--primary, #6366f1); }
.mpf-socials { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* =========================================================
   v3.2 — App banner (پوستر) + store badges (فروشگاه‌ها)
   Shared across all themes (auto-injected)
   ======================================================= */
.mp-app-banner {
  margin: 18px 0 6px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(128,140,160,.22);
  box-shadow: 0 10px 30px -18px rgba(20,20,60,.35);
  background: rgba(128,140,160,.08);
}
.mp-app-banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: cover;
}
.mp-stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 14px 0;
}
.mp-stores-label {
  font-size: 12.5px;
  opacity: .75;
  margin-inline-end: 2px;
}
.mp-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(128,140,160,.3);
  background: rgba(128,140,160,.08);
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.mp-store-btn:hover { transform: translateY(-2px); text-decoration: none; }
.mp-store-btn .mp-store-ic { flex: none; }
.mp-st-google:hover   { background: #34a8531f; border-color: #34a85366; color: #1e8e3e; }
.mp-st-apple:hover    { background: #a2aaad1f; border-color: #a2aaad66; color: inherit; }
.mp-st-bazaar:hover   { background: #ffd20026; border-color: #f7b50077; color: #a97b00; }
.mp-st-myket:hover    { background: #e4002d17; border-color: #e4002d66; color: #e4002d; }
.mp-st-web:hover      { background: #2563eb1f; border-color: #2563eb66; color: #2563eb; }
@media (max-width: 480px) {
  .mp-app-banner { border-radius: 13px; margin: 12px 0 4px; }
  .mp-app-banner img { max-height: 200px; }
  .mp-store-btn { flex: 1 1 44%; justify-content: center; }
}
