/* صفحه اول — الهام از آسان‌یاب، دو ستون آگهی */
.asy-home {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 12px 24px;
}
.asy-brand {
  text-align: center;
  padding: 12px 8px 8px;
}
.asy-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text, #e2e8f0);
}
.asy-logo-mark {
  color: #ef4444;
  font-size: 1.4rem;
}
.asy-logo-text {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.asy-tagline {
  margin: 6px 0 0;
  font-size: .88rem;
  color: var(--muted, #94a3b8);
}

/* دسته‌ها — شبکه گرد مثل آسان‌یاب */
.asy-cats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 6px;
  margin: 14px 0 18px;
}
.asy-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 4px;
}
.asy-cat-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #1e293b;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.asy-cat-emoji { font-size: 1.45rem; }
.asy-cat-ico .icon { width: 26px; height: 26px; }
.asy-cat-name {
  font-size: .72rem;
  text-align: center;
  line-height: 1.3;
  color: var(--muted, #94a3b8);
  max-width: 72px;
}

/* استوری حلقه‌ای */
.asy-stories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.asy-stories::-webkit-scrollbar { display: none; }
.asy-story-ring {
  flex: 0 0 auto;
  width: 72px;
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-align: center;
}
.asy-story-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #f59e0b, #ef4444, #a855f7);
  display: block;
  margin: 0 auto 6px;
}
.asy-story-avatar img,
.asy-story-avatar span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  border: 2px solid #0f172a;
}
.asy-story-label {
  font-size: .68rem;
  color: var(--muted, #94a3b8);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asy-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 10px;
  font-weight: 700;
  font-size: .95rem;
}
.asy-section-head a {
  font-size: .8rem;
  color: var(--primary, #3b82f6);
  text-decoration: none;
}

/* دو ستون آگهی */
.asy-ads-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.asy-ad-card {
  display: flex;
  flex-direction: column;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}
.asy-ad-card.is-viewed { opacity: 1; }
.asy-ad-thumb {
  position: relative;
  aspect-ratio: 1.15 / 1;
  background: #0f172a;
}
.asy-ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.asy-ad-noimg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  opacity: .35;
}
/* برچسب‌های کارت — یک تعریف واحد و سبک */
.asy-ad-badges,
.asy-ad-badges-top {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  max-width: 48%;
  pointer-events: none;
}
.asy-ad-badges span,
.asy-ad-badges-top span {
  font-size: .58rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 2px 6px;
  border-radius: 5px;
  color: #fff;
  letter-spacing: 0;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  white-space: nowrap;
}
.b-feat,
.asy-ad-badges .b-feat,
.asy-ad-badges-top .b-feat {
  background: rgba(220, 38, 38, .88);
}
.b-boost,
.asy-ad-badges .b-boost,
.asy-ad-badges-top .b-boost {
  background: rgba(37, 99, 235, .88);
}
.b-job,
.asy-ad-badges .b-job {
  background: rgba(5, 150, 105, .9);
}
.asy-ad-body { padding: 8px 10px 10px; }
.asy-ad-title {
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.2em;
}
.asy-ad-price {
  margin-top: 6px;
  font-size: .88rem;
  font-weight: 800;
  color: #86efac;
}
.asy-ad-meta {
  margin-top: 4px;
  font-size: .68rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.asy-empty {
  text-align: center;
  padding: 28px 12px;
  color: #64748b;
}

/* پلیر استوری */
.story-player {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.story-player[hidden] { display: none !important; }
.story-player-inner {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  max-height: 100dvh;
  background: #0f172a;
  overflow: hidden;
}
.story-progress {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  gap: 4px;
}
.story-progress span {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,.25);
  overflow: hidden;
}
.story-progress span i {
  display: block;
  height: 100%;
  width: 0;
  background: #fff;
}
.story-progress span.done i { width: 100%; }
.story-progress span.active i {
  animation: storyFill linear forwards;
}
@keyframes storyFill {
  from { width: 0; }
  to { width: 100%; }
}
.story-player-top {
  position: absolute;
  top: 18px;
  left: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.story-player-top button {
  background: rgba(0,0,0,.35);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
}
.story-player-media {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}
.story-player-media img,
.story-player-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.story-player-media .story-text-only {
  padding: 32px 20px;
  font-size: 1.15rem;
  line-height: 1.7;
  text-align: center;
  color: #fff;
}
.story-player-tap {
  position: absolute;
  top: 48px;
  bottom: 80px;
  width: 40%;
  z-index: 4;
}
.story-tap-prev { right: 0; }
.story-tap-next { left: 0; }
.story-cta {
  position: absolute;
  bottom: 28px;
  left: 16px;
  right: 16px;
  z-index: 6;
  display: block;
  text-align: center;
  padding: 12px;
  background: #3b82f6;
  color: #fff;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
}
.story-cta[hidden] { display: none !important; }

@media (min-width: 900px) {
  .asy-home { max-width: 1100px; padding-top: 16px; }
  .asy-cats { grid-template-columns: repeat(8, 1fr); }
}

/* مخفی کردن هیروی قدیمی اگر جایی مانده */
body.home-page .hero { display: none; }

/* ——— منوی همبرگری کشویی (آسان‌یاب) ——— */
.asy-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  padding-top: max(8px, env(safe-area-inset-top));
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 100;
}
.asy-topbar .hm-loc-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 34%;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-family: inherit;
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
}
.asy-topbar .hm-loc-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.asy-topbar .hm-search-wrap {
  flex: 1;
  min-width: 0;
}
.asy-topbar .hm-search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #1e293b;
  border: 1px solid #334155;
}
.asy-topbar .hm-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  min-width: 0;
  width: 100%;
}
.hm-menu-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: #e2e8f0;
}
.hm-menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}
.hm-menu-icon span {
  display: block;
  height: 2px;
  background: #e2e8f0;
  border-radius: 2px;
}

.asy-drawer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2000 !important;
  display: block !important;
  background: transparent !important;
  padding: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}
.asy-drawer[hidden] { display: none !important; }
.asy-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  opacity: 0;
  transition: opacity .25s ease;
}
.asy-drawer.open .asy-drawer-backdrop { opacity: 1; }
.asy-drawer-panel {
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  right: 0 !important;
  left: auto !important;
  width: min(82vw, 320px) !important;
  max-height: none !important;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 0 !important;
  border: none !important;
  border-left: 1px solid #1e293b !important;
  background: #0f172a !important;
  box-shadow: -12px 0 40px rgba(0,0,0,.35) !important;
  padding: 0 !important;
  overflow-y: auto !important;
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.22,1,.36,1);
  display: flex;
  flex-direction: column;
}
.asy-drawer.open .asy-drawer-panel {
  transform: translateX(0);
}
.asy-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #1e293b;
  font-size: 1rem;
}
.asy-drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 1rem;
}
.asy-drawer-nav {
  padding: 8px 0;
  flex: 1;
}
.asy-drawer-nav a {
  display: flex !important;
  align-items: center;
  gap: 14px;
  padding: 14px 18px !important;
  min-height: 48px !important;
  color: #e2e8f0 !important;
  text-decoration: none;
  font-size: .95rem !important;
  font-weight: 500 !important;
  border-radius: 0 !important;
  border-bottom: none !important;
}
.asy-drawer-nav a:active,
.asy-drawer-nav a:hover {
  background: #1e293b !important;
}
.asy-drawer-nav a.danger { color: #fca5a5 !important; }
.asy-di {
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: .9;
  color: #94a3b8;
}
.asy-drawer-nav a .nd {
  margin-right: auto;
  background: #ef4444;
  color: #fff;
  font-size: .7rem;
  font-style: normal;
  padding: 2px 7px;
  border-radius: 999px;
}
.asy-drawer-social {
  padding: 16px;
  border-top: 1px solid #1e293b;
  text-align: center;
}
.asy-social-muted {
  font-size: .75rem;
  color: #64748b;
  display: block;
  margin-bottom: 10px;
}
.asy-social-row {
  display: flex;
  justify-content: center;
  gap: 12px;
}
.asy-soc {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #1e293b;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
}

@media (min-width: 900px) {
  .asy-topbar { display: none !important; }
  .asy-drawer, .asy-drawer.open { display: none !important; }
}

/* میانبرهای ثبت آگهی / کسب‌وکار */
.asy-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 4px 0 14px;
}
.asy-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
  border: 1px solid #334155;
}
.asy-cta-primary {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: #fff !important;
  border-color: transparent;
  grid-column: 1 / -1;
}
.asy-cta-ghost {
  background: #1e293b;
  color: #e2e8f0 !important;
}
.asy-cta-ico {
  display: flex;
  opacity: .95;
}
@media (min-width: 600px) {
  .asy-cta-row {
    grid-template-columns: repeat(4, 1fr);
  }
  .asy-cta-primary { grid-column: auto; }
}

/* ——— UX سراسری ——— */
.ux-toast-host {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  left: 12px;
  right: 12px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  align-items: center;
}
.ux-toast {
  max-width: 420px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid #334155;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  font-size: .88rem;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease;
  text-align: center;
}
.ux-toast.show { opacity: 1; transform: translateY(0); }
.ux-toast.is-success { border-color: #166534; background: #14532d; color: #bbf7d0; }
.ux-toast.is-error { border-color: #7f1d1d; background: #450a0a; color: #fecaca; }

.ux-scroll-top {
  position: fixed;
  left: 14px;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.ux-scroll-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
@media (min-width: 900px) {
  .ux-scroll-top { bottom: 24px; left: 24px; }
  .ux-toast-host { bottom: 24px; }
}

.btn.is-loading { opacity: .75; pointer-events: none; }
.ux-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: uxSpin .7s linear infinite;
  vertical-align: middle;
  margin-right: 4px;
}
@keyframes uxSpin { to { transform: rotate(360deg); } }

/* لمس بهتر کارت‌ها */
.asy-ad-card:active { transform: scale(.98); opacity: .92; }
.asy-cat:active .asy-cat-ico { transform: scale(.94); }
.asy-cat-ico { transition: transform .15s ease; }

/* فاصله امن از منوی پایین در همه صفحات موبایل */
@media (max-width: 899px) {
  .site-main {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
  .site-footer {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  }
}

/* ——— ریسپانسیو آگهی: دسکتاپ کوچک‌تر و چندستونه ——— */
@media (min-width: 700px) {
  .asy-home { max-width: 1100px; }
  .asy-ads-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
  }
  .asy-ad-thumb { aspect-ratio: 1.2 / 1; }
  .asy-ad-title { font-size: .82rem; min-height: 2.1em; }
  .asy-ad-price { font-size: .85rem; }
  .asy-ad-body { padding: 8px 10px 10px; }
}

@media (min-width: 1100px) {
  .asy-home { max-width: 1200px; padding-left: 16px; padding-right: 16px; }
  .asy-ads-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 12px !important;
  }
  .asy-ad-thumb { aspect-ratio: 1.15 / 1; max-height: 160px; }
  .asy-ad-card { border-radius: 12px; }
  .asy-ad-title { font-size: .8rem; }
  .asy-ad-price { font-size: .82rem; margin-top: 4px; }
  .asy-ad-meta { font-size: .65rem; }
  .asy-cats { grid-template-columns: repeat(8, 1fr); }
}

/* لیست /ads هم در دسکتاپ فشرده‌تر */
@media (min-width: 900px) {
  .ads-grid.grid-3,
  .grid.grid-3.ads-grid,
  main .grid.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 14px;
  }
  .listing-card .thumb {
    aspect-ratio: 4 / 3 !important;
    max-height: 180px;
  }
  .listing-card .title { font-size: .88rem !important; }
  .listing-card .price { font-size: .95rem !important; }
  .listing-card .body { padding: 10px 12px 12px !important; }
}

@media (min-width: 1200px) {
  .ads-grid.grid-3,
  .grid.grid-3.ads-grid,
  main .grid.grid-3 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px;
  }
  .listing-card .thumb {
    aspect-ratio: 1.2 / 1 !important;
    max-height: 150px;
  }
  .listing-card {
    max-width: 100%;
  }
}

/* موبایل: دو ستون جمع‌وجور */
@media (max-width: 699px) {
  .asy-ads-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .asy-ad-thumb { aspect-ratio: 1 / 1; }
  .asy-ad-title { font-size: .78rem; }
  .asy-ad-price { font-size: .8rem; }
  .asy-ad-body { padding: 6px 8px 8px; }
}

/* لوگو */
.asy-logo-img {
  max-height: 48px;
  max-width: 200px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.site-logo-img {
  max-height: 40px;
  max-width: 180px;
  object-fit: contain;
  vertical-align: middle;
}
/* desk-loc از header-topbar کنترل می‌شود — اینجا مخفی اجباری نباشد */
.desk-loc-btn {
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--bg-2, #f8fafc);
  color: inherit;
  font-family: inherit;
  font-size: .85rem;
  cursor: pointer;
  max-width: 180px;
}
.desk-loc-btn .hm-loc-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .desk-loc-btn { display: inline-flex; }
}

/* CTA پیشرفته صفحه اول */
.asy-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 8px 0 16px;
}
.asy-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 16px;
  text-decoration: none !important;
  font-size: .9rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.asy-cta:active { transform: scale(.97); }
.asy-cta-primary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .35);
}
.asy-cta-ghost {
  background: #1e293b;
  color: #e2e8f0 !important;
  border-color: #334155;
}
.asy-cta-ghost:hover {
  border-color: #3b82f6;
  background: #243447;
}
.asy-cta-ico {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255,255,255,.12);
}
.asy-cta-ghost .asy-cta-ico {
  background: rgba(59, 130, 246, .15);
  color: #60a5fa;
}
@media (min-width: 700px) {
  .asy-cta-row {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
  .asy-cta-primary { grid-column: auto; }
}

/* شیت شهر — بالاتر از منو */
.loc-sheet {
  z-index: 4000 !important;
}
.loc-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted, #94a3b8);
  font-size: .9rem;
}
.loc-error { color: #fca5a5 !important; }
.loc-item {
  width: 100%;
  text-align: right;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: .95rem;
  border-bottom: 1px solid var(--border, #1e293b);
  cursor: pointer;
}
.loc-item-all {
  font-weight: 800;
  color: #38bdf8 !important;
  background: rgba(14, 165, 233, .08) !important;
}
body.loc-open {
  overflow: hidden !important;
}

/* ——— کارت آگهی یکسان افقی (آسان‌یاب) ——— */
.asy-ads-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.asy-ads-featured {
  padding: 10px;
  border-radius: 16px;
  background: rgba(37, 99, 235, .06);
  border: 1px solid rgba(59, 130, 246, .2);
}
.asy-section-feat span {
  color: #60a5fa;
}

.asy-ad-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch;
  gap: 0;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  min-height: 112px;
  transition: border-color .15s ease, transform .12s ease;
}
.asy-ad-card:active { transform: scale(.99); }
.asy-ad-card.is-viewed { opacity: 1; }

.asy-ad-thumb {
  position: relative;
  width: 118px;
  min-width: 118px;
  max-width: 118px;
  aspect-ratio: auto !important;
  max-height: none !important;
  align-self: stretch;
  background: #0f172a;
  overflow: hidden;
}
.asy-ad-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 112px;
}
.asy-ad-noimg {
  min-height: 112px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  opacity: .3;
}

/* دسته اصلی روی گوشه تصویر */
.asy-ad-cat {
  position: absolute;
  bottom: 6px;
  right: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(15, 23, 42, .78);
  color: #f1f5f9;
  font-size: .65rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  backdrop-filter: blur(4px);
  z-index: 2;
}

.asy-ad-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.asy-ad-title {
  font-size: .9rem !important;
  font-weight: 600;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 0 !important;
}
.asy-ad-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}
.asy-ad-meta {
  font-size: .72rem !important;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}
.asy-ad-price {
  font-size: .92rem !important;
  font-weight: 800;
  color: #86efac !important;
  white-space: nowrap;
  margin-top: 0 !important;
}

/* دسکتاپ: دو ستون کارت افقی */
@media (min-width: 900px) {
  .asy-ads-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .asy-ad-thumb {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
  }
  .asy-ad-thumb img,
  .asy-ad-noimg { min-height: 120px; }
  .asy-ad-card { min-height: 120px; }
  .asy-ad-title { font-size: .95rem !important; }
  .asy-home { max-width: 1100px; }
}

@media (min-width: 1200px) {
  .asy-ads-list {
    grid-template-columns: 1fr 1fr;
  }
}

/* لغو گرید عمودی قبلی روی این کارت‌ها */
.asy-ads-grid .asy-ad-card {
  flex-direction: row !important;
}

/* badge rules consolidated above */

.asy-feed-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  color: #94a3b8;
  font-size: .85rem;
}
.asy-feed-status[hidden] { display: none !important; }
.asy-feed-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #334155;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: uxSpin .7s linear infinite;
}
.asy-feed-end {
  text-align: center;
  padding: 12px;
  color: #64748b;
  font-size: .82rem;
}
.asy-feed-end[hidden] { display: none !important; }

/* شغلی در فید */
.asy-ad-card.is-job {
  border-color: rgba(16, 185, 129, .35);
}
.asy-ad-price.is-salary {
  color: #34d399 !important;
  font-size: .85rem !important;
}

/* تبلیغات سایت */
.site-ad {
  margin: 12px 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #334155;
  background: #1e293b;
}
.site-ad-link {
  display: block;
  color: inherit;
  text-decoration: none !important;
}
.site-ad-img {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  display: block;
}
.site-ad-body { padding: 10px 14px; }
.site-ad-label {
  display: inline-block;
  font-size: .65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .15);
  color: #fbbf24;
  margin-bottom: 6px;
}
.site-ad-title { display: block; font-size: .95rem; font-weight: 800; color: #e2e8f0; }
.site-ad-text { margin: 4px 0 0; font-size: .85rem; color: #94a3b8; line-height: 1.5; }
.site-ad-text.site-ad, .site-ad.site-ad-text { border-style: dashed; }
.asy-ads-list .site-ad,
.asy-banners .site-ad { margin: 10px 0; }

/* ——— تبلیغات سایت (UI تمیز) ——— */
.pm-ad {
  margin: 12px 0;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  border: none;
  box-shadow: none;
}
.pm-ad-hit {
  display: block;
  text-decoration: none !important;
  color: inherit !important;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
}
.pm-ad-hit:active { opacity: .96; }
.pm-ad-img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}
.pm-ad-caption {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pm-ad-hit--text {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(148, 163, 184, .12);
  background: linear-gradient(135deg, rgba(30, 41, 59, .95), rgba(15, 23, 42, .98));
}
.pm-ad-chip {
  align-self: flex-start;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(251, 191, 36, .12);
  color: #fbbf24;
  line-height: 1.2;
}
.pm-ad-title {
  font-size: .95rem;
  font-weight: 800;
  color: #f1f5f9;
  line-height: 1.4;
  display: block;
}
.pm-ad-desc {
  font-size: .84rem;
  color: #94a3b8;
  line-height: 1.65;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.pm-ad-html {
  border-radius: 16px;
  overflow: hidden;
  line-height: 1.5;
}
.pm-ad-html img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.pm-ad-html a { color: #93c5fd; }
.asy-banners .pm-ad { margin: 8px 0 14px; }
.asy-ads-list .pm-ad {
  margin: 4px 0 10px;
  grid-column: 1 / -1;
}
@media (min-width: 900px) {
  .pm-ad-img { max-height: 200px; }
  .asy-ads-list .pm-ad { grid-column: 1 / -1; }
}

/* سازگاری نام قدیمی */
.site-ad { margin: 12px 0; border: none !important; background: transparent !important; box-shadow: none !important; }
.site-ad-text { border: none !important; }

/* بنر دوستونه چپ/راست */
.asy-banners--duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 14px;
  align-items: stretch;
}
.asy-banners--duo .asy-banner-slot {
  min-width: 0;
}
.asy-banners--duo .asy-banner-slot.is-wide {
  grid-column: 1 / -1;
}
.asy-banners--duo .pm-ad {
  margin: 0;
  height: 100%;
}
.asy-banners--duo .pm-ad-hit {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.asy-banners--duo .pm-ad-img {
  max-height: 120px;
  object-fit: cover;
  flex-shrink: 0;
}
.asy-banners--duo .pm-ad-caption {
  flex: 1;
  padding: 10px 12px 12px;
}
.asy-banners--duo .pm-ad-title {
  font-size: .88rem;
}
.asy-banners--duo .pm-ad-desc {
  font-size: .78rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* یک تبلیغ تنها: تمام عرض */
.asy-banners--duo .asy-banner-slot:only-child {
  grid-column: 1 / -1;
}
.asy-banners--duo .asy-banner-slot:only-child .pm-ad-img {
  max-height: 160px;
}
@media (max-width: 520px) {
  .asy-banners--duo {
    gap: 8px;
  }
  .asy-banners--duo .pm-ad-img {
    max-height: 88px;
  }
  .asy-banners--duo .pm-ad-desc {
    -webkit-line-clamp: 2;
    font-size: .72rem;
  }
  .asy-banners--duo .pm-ad-title {
    font-size: .8rem;
  }
}

/* ——— بنر دوستونه مدرن (سراسری) ——— */
.asy-banners--duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0 16px;
  align-items: stretch;
}
.asy-banners--duo .asy-banner-slot {
  min-width: 0;
  display: flex;
}
.asy-banners--duo .asy-banner-slot > .pm-ad {
  width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.asy-banners--duo .asy-banner-slot.is-wide {
  grid-column: 1 / -1;
}
.asy-banners--duo .asy-banner-slot:only-child {
  grid-column: 1 / -1;
}
.asy-banners--duo .pm-ad-hit {
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(148, 163, 184, .12);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .12);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.asy-banners--duo .pm-ad-hit:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, .35);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}
.asy-banners--duo .pm-ad-img {
  width: 100%;
  height: 110px;
  max-height: none;
  object-fit: cover;
  flex-shrink: 0;
}
.asy-banners--duo .asy-banner-slot:only-child .pm-ad-img {
  height: 150px;
}
.asy-banners--duo .pm-ad-caption {
  flex: 1;
  padding: 11px 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.asy-banners--duo .pm-ad-title {
  font-size: .88rem;
  font-weight: 800;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.asy-banners--duo .pm-ad-desc {
  font-size: .78rem;
  line-height: 1.55;
  color: #94a3b8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border: none !important;
  background: none !important;
}
.asy-banners--duo .pm-ad-hit--text {
  min-height: 110px;
  justify-content: center;
  padding: 14px;
}
.asy-banners--duo .pm-ad-html {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .12);
  overflow: hidden;
  background: #0f172a;
}
@media (max-width: 560px) {
  .asy-banners--duo {
    gap: 8px;
  }
  .asy-banners--duo .pm-ad-img {
    height: 84px;
  }
  .asy-banners--duo .asy-banner-slot:only-child .pm-ad-img {
    height: 120px;
  }
  .asy-banners--duo .pm-ad-title { font-size: .8rem; }
  .asy-banners--duo .pm-ad-desc { font-size: .72rem; -webkit-line-clamp: 2; }
}
/* لایت مود در صورت وجود */
html[data-theme="light"] .asy-banners--duo .pm-ad-hit,
body.theme-light .asy-banners--duo .pm-ad-hit {
  background: linear-gradient(160deg, #fff 0%, #f8fafc 100%);
  border-color: rgba(15, 23, 42, .08);
  box-shadow: 0 2px 12px rgba(15, 23, 42, .06);
}
html[data-theme="light"] .asy-banners--duo .pm-ad-title,
body.theme-light .asy-banners--duo .pm-ad-title {
  color: #0f172a;
}

.asy-ad-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-size: .72rem;
  color: #fbbf24;
}
.asy-ad-stars { letter-spacing: 1px; }
.asy-ad-ravg { font-weight: 700; color: #fcd34d; }
.asy-ad-rcnt { color: #94a3b8; font-size: .68rem; }

/* اسلات رزرو خالی */
.pm-ad--reserve .pm-ad-hit--reserve {
  border: 1px dashed rgba(148, 163, 184, .35) !important;
  background: linear-gradient(160deg, rgba(30, 41, 59, .6), rgba(15, 23, 42, .85)) !important;
  box-shadow: none !important;
}
.pm-ad--reserve.is-full .pm-ad-hit--reserve {
  opacity: .65;
  cursor: default;
  border-style: solid !important;
}
.pm-ad-reserve-ph {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(148, 163, 184, .06),
    rgba(148, 163, 184, .06) 8px,
    transparent 8px,
    transparent 16px
  );
}
.pm-ad-reserve-ico { font-size: 2rem; opacity: .5; }
.pm-ad-cta {
  display: inline-block;
  margin-top: 6px;
  font-size: .78rem;
  font-weight: 800;
  color: #93c5fd;
}
.asy-banners--duo .pm-ad--reserve .pm-ad-img { height: 110px; object-fit: cover; }

/* راهنمای سفارش زیر هر تبلیغ (حتی وقتی اسلات پر است) */
.pm-ad-order-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  border: 1px dashed rgba(148, 163, 184, .28);
  background: rgba(15, 23, 42, .35);
  color: #94a3b8 !important;
  text-decoration: none !important;
  font-size: .72rem;
  font-weight: 600;
  transition: color .15s, border-color .15s, background .15s;
}
.pm-ad-order-hint:hover {
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, .45);
  background: rgba(59, 130, 246, .08);
}
.pm-ad-order-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(59, 130, 246, .15);
  color: #93c5fd;
  font-size: .75rem;
  font-weight: 800;
}
.asy-banners-wrap { margin: 10px 0 16px; }
.asy-banners-order-bar {
  margin-top: 8px;
  text-align: center;
}
.asy-banners-order-bar a {
  display: inline-block;
  font-size: .8rem;
  color: #94a3b8 !important;
  text-decoration: none !important;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: rgba(15, 23, 42, .4);
  transition: color .15s, border-color .15s;
}
.asy-banners-order-bar a:hover {
  color: #e2e8f0 !important;
  border-color: rgba(59, 130, 246, .4);
}
.asy-banners-order-bar strong { color: #93c5fd; font-weight: 800; }
html[data-theme="light"] .pm-ad-order-hint,
body.theme-light .pm-ad-order-hint {
  background: rgba(241, 245, 249, .9);
  border-color: rgba(15, 23, 42, .12);
  color: #64748b !important;
}
html[data-theme="light"] .asy-banners-order-bar a,
body.theme-light .asy-banners-order-bar a {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, .1);
  color: #64748b !important;
}


/* بنر: قوانین اصلی در ads-banners.css */

/* —— برچسب‌ها بدون تداخل: فوری/نردبان بالا، عرضه/تقاضا پایین-چپ، مشاهده‌شده وسط —— */
.asy-ad-thumb { position: relative; }
/* .asy-ad-badges-top merged */
/* عرضه / تقاضا کنار عنوان — نه روی تصویر */
.asy-ad-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 2px;
}
.asy-ad-title-row .asy-ad-title {
  flex: 1;
  min-width: 0;
  margin: 0;
}
.asy-ad-intent {
  flex: 0 0 auto;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.35;
  margin-top: 2px;
  white-space: nowrap;
}
.asy-ad-intent.is-offer {
  background: rgba(13, 148, 136, 0.12);
  color: #0f766e;
  border: 1px solid rgba(13, 148, 136, 0.28);
}
.asy-ad-intent.is-demand {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  border: 1px solid rgba(37, 99, 235, 0.28);
}
.asy-ad-intent.is-job-hire {
  background: rgba(124, 58, 237, 0.12);
  color: #6d28d9;
  border: 1px solid rgba(124, 58, 237, 0.28);
}
.asy-ad-intent.is-job-seek {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
  border: 1px solid rgba(234, 88, 12, 0.28);
}
.asy-ad-viewed {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 4;
  width: 22px;
  height: 22px;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .38);
  color: rgba(255, 255, 255, .9);
  border-radius: 50%;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  line-height: 0;
}
.asy-ad-viewed svg {
  width: 12px;
  height: 12px;
  display: block;
}
.asy-ad-card.is-viewed .asy-ad-viewed {
  display: flex;
}
.asy-ad-card.is-viewed .asy-ad-thumb img,
.asy-ad-card.is-viewed .asy-ad-thumb picture {
  filter: none;
  opacity: 1;
}

/* ریسپانسیو برچسب‌ها */
@media (max-width: 480px) {
  .asy-ad-badges span,
  .asy-ad-badges-top span {
    font-size: .52rem;
    padding: 1px 5px;
  }
  .asy-ad-viewed {
    width: 20px;
    height: 20px;
    top: 4px;
    left: 4px;
  }
  .asy-ad-viewed svg {
    width: 11px;
    height: 11px;
  }
  .asy-ad-intent {
    font-size: .58rem;
    padding: 1px 5px;
  }
  .asy-ad-cat {
    font-size: .62rem;
  }
}
@media (min-width: 900px) {
  .asy-ad-badges span,
  .asy-ad-badges-top span {
    font-size: .6rem;
    padding: 2px 7px;
  }
}
.asy-ad-cat {
  position: absolute;
  bottom: 8px;
  right: 8px;
  left: 8px;
  z-index: 2;
  max-width: none;
  width: auto;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* رندر تنبل کارت‌های خارج از دید */
.asy-ad-card {
  content-visibility: auto;
  contain-intrinsic-size: 120px 320px;
}
.asy-ad-thumb img,
.asy-ad-thumb picture {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}


/* حلقه «همه» در انتهای استوری‌ها */
.asy-story-all { text-decoration: none; color: inherit; }
.asy-story-all-av {
  background: linear-gradient(135deg, #1e293b, #334155) !important;
  border: 2px dashed #64748b !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  font-weight: 800;
  color: #e2e8f0;
}
.asy-story-all-av img { display: none; }
.asy-stories { margin: 8px 0 12px; }
