/* Jobs Directory Modern CSS */
:root {
  --font-sans: "Vazirmatn", Tahoma, sans-serif;
  --color-jdm-primary: #059669;
  --color-jdm-on-primary: #ffffff;
  --color-jdm-secondary: #10b981;
  --color-jdm-accent: #d97706;
  --color-jdm-bg: #e9edf7;
  --color-jdm-fg: #064e3b;
  --color-jdm-muted: #e8f1f3;
  --color-jdm-muted-text: #047857;
  --color-jdm-border: #e2e8f0;
  --color-jdm-surface: #ffffff;
  --color-jdm-soft: #f0fdf4;
  --color-jdm-gold: #f59e0b;
  --color-jdm-destructive: #dc2626;
  --radius-jdm: 14px;
  --radius-jdm-lg: 18px;
  --shadow-jdm: 0 8px 28px rgba(6, 78, 59, 0.08);
}
/*
 * کامپوننت‌های فرانت — بدون @layer تا روی استایل هسته وردپرس اولویت داشته باشند
 */

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  color: var(--color-jdm-fg, #064e3b);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* پس‌زمینه صفحه اصلی / آرشیو / تک‌آگهی — از تنظیمات استایل */
  background: var(--color-background, var(--color-jdm-bg, #e9edf7));
}

body.single-business {
  background: var(--color-background, var(--color-jdm-bg, #e9edf7));
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-nav {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--jdm-header-border, var(--color-jdm-border, #e2e8f0));
  backdrop-filter: blur(12px);
  background: color-mix(
    in oklab,
    var(--jdm-header-bg, var(--color-jdm-soft, #f0fdf4)) 88%,
    var(--color-jdm-surface, #fff)
  );
  color: var(--jdm-header-fg, var(--color-jdm-fg, #064e3b));
}

.site-nav__inner {
  max-width: var(--jdm-site-width, 1120px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  min-height: var(--nav-h, 68px);
  box-sizing: border-box;
  width: 100%;
}

.site-nav__start {
  justify-self: start;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  min-width: min-content;
  max-width: 100%;
}

/* فقط برند مستقیم داخل گرید هدر اصلی (نه لوگو در ثانویه) */
.site-nav__inner > .site-nav__brand {
  justify-self: center;
  grid-column: 2;
}

.site-nav__end {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

/* لوگو کنار منوی همبرگری (راست) — ستون شروع به اندازه محتوا */
.site-nav__inner--logo-start {
  grid-template-columns: max-content minmax(0, 1fr);
}

.site-nav__inner--logo-start .site-nav__brand,
.site-nav__inner--logo-start > .site-nav__brand {
  grid-column: auto;
  justify-self: start;
  flex-shrink: 0;
}

.site-nav__inner--logo-start .site-nav__end {
  justify-self: end;
}

/* لوگو سمت اکشن‌ها (چپ) */
.site-nav__inner--logo-end {
  grid-template-columns: auto minmax(0, 1fr);
}

.site-nav__inner--logo-end .site-nav__brand,
.site-nav__inner--logo-end > .site-nav__brand {
  grid-column: auto;
  justify-self: end;
  flex-shrink: 0;
}

/* لوگو در هدر ثانویه — اکشن‌ها با margin منطقی به سمت چپ (inline-end) می‌چسبند */
.site-nav__inner.site-nav__inner--logo-none {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  grid-template-columns: unset !important;
}

.site-nav__inner--logo-none .site-nav__start {
  grid-column: unset !important;
  justify-self: unset !important;
  flex: 0 1 auto;
}

.site-nav__inner--logo-none .site-nav__end {
  grid-column: unset !important;
  justify-self: unset !important;
  flex: 0 0 auto;
  margin-inline-start: auto; /* RTL: می‌چسبد به چپ */
}

/* منوی هدر اصلی / ثانویه — پایه؛ رنگ نهایی پالت در frontend-shape */
.jdm-hnav {
  border-bottom: 1px solid var(--jdm-header-border, var(--color-jdm-border, #e2e8f0));
  background: color-mix(
    in oklab,
    var(--jdm-header-bg, var(--color-jdm-soft, #f0fdf4)) 92%,
    var(--color-jdm-surface, #fff)
  );
  color: var(--jdm-header-fg, var(--color-jdm-fg, #064e3b));
}

.jdm-hnav--secondary {
  background: color-mix(
    in oklab,
    var(--jdm-header-secondary-bg, var(--color-jdm-bg, #e9edf7)) 92%,
    var(--color-jdm-surface, #fff)
  );
}

.jdm-hnav__inner {
  max-width: var(--jdm-site-width, 1120px);
  width: 100%;
  margin-inline: auto;
  padding: 0.35rem 1.25rem 0.55rem;
  box-sizing: border-box;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}

.jdm-hnav__inner::-webkit-scrollbar {
  display: none;
  height: 0;
}

/* تگ‌های هوشمند / موبایل: یک سطر افقی اسلایدری، بدون شکست خط */
.jdm-hnav--secondary .jdm-hnav__inner,
.jdm-hnav--secondary .jdm-hnav__menu {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}

.jdm-hnav--secondary .jdm-hnav__inner::-webkit-scrollbar,
.jdm-hnav--secondary .jdm-hnav__menu::-webkit-scrollbar {
  display: none;
  height: 0;
}

.jdm-hnav--secondary .jdm-hnav__list,
.jdm-hnav--secondary .jdm-hnav__list--smart-tags {
  flex-wrap: nowrap;
  flex: 0 0 auto;
  width: max-content;
  min-width: max-content;
  max-width: none;
}

@media (max-width: 960px) {
  .jdm-hnav--secondary.jdm-hnav--align-center .jdm-hnav__inner,
  .jdm-hnav--secondary.jdm-hnav--align-end .jdm-hnav__inner,
  .jdm-hnav--secondary .jdm-hnav__menu--align-center,
  .jdm-hnav--secondary .jdm-hnav__menu--align-end {
    justify-content: flex-start;
  }

  .jdm-hnav--secondary .jdm-hnav__inner,
  .jdm-hnav--secondary .jdm-hnav__menu {
    padding-inline: 0.85rem;
  }
}

.jdm-hnav--align-start .jdm-hnav__inner {
  justify-content: flex-start;
}

.jdm-hnav--align-center .jdm-hnav__inner {
  justify-content: center;
}

.jdm-hnav--align-end .jdm-hnav__inner {
  justify-content: flex-end;
}

/* نوار ثانویه با لوگو — همان عرض هدر اصلی / قالب */
.jdm-hnav__bar {
  max-width: var(--jdm-site-width, 1120px);
  width: 100%;
  margin-inline: auto;
  padding: 0.35rem 1.25rem 0.55rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* راست: ابتدا لوگو، بعد منو */
.jdm-hnav__bar--logo-start {
  justify-content: flex-start;
}

.jdm-hnav__bar--logo-start .jdm-hnav__brand {
  order: 0;
  flex: 0 0 auto;
}

.jdm-hnav__bar--logo-start .jdm-hnav__menu {
  order: 1;
  flex: 1 1 auto;
}

/* چپ: منو، بعد لوگو در انتهای سطر */
.jdm-hnav__bar--logo-end {
  justify-content: flex-start;
}

.jdm-hnav__bar--logo-end .jdm-hnav__menu {
  flex: 1 1 auto;
}

.jdm-hnav__bar--logo-end .jdm-hnav__brand {
  flex: 0 0 auto;
  margin-inline-start: auto;
}

/* وسط: گرید سه‌ستونه */
.jdm-hnav__bar--logo-center {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.jdm-hnav__bar-start {
  justify-self: start;
  min-width: 0;
  display: flex;
  align-items: center;
}

.jdm-hnav__bar-end {
  justify-self: end;
  min-width: 0;
}

.jdm-hnav__brand {
  flex-shrink: 0;
}

.jdm-hnav__bar--logo-center .jdm-hnav__brand {
  justify-self: center;
  grid-column: auto;
}

.jdm-hnav__menu {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.jdm-hnav__menu--align-start {
  justify-content: flex-start;
}

.jdm-hnav__menu--align-center {
  justify-content: center;
}

.jdm-hnav__menu--align-end {
  justify-content: flex-end;
}

.jdm-hnav--has-brand .jdm-hnav__list {
  min-width: max-content;
}

/* منوی اصلی اینلاین — فقط عرض محتوا؛ چسبیده به ابتدای سطر (بدون margin وسط‌چین) */
.jdm-hnav--inline {
  border: 0;
  background: transparent;
  flex: 0 0 auto;
  min-width: auto;
  max-width: none;
  overflow: visible;
}

.site-nav .jdm-hnav--inline .jdm-hnav__inner,
.site-chrome .site-nav .jdm-hnav--inline .jdm-hnav__inner {
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  margin-inline: 0 !important;
  padding: 0 !important;
  justify-content: flex-start !important;
  overflow: visible !important;
}

.jdm-hnav--inline .jdm-hnav__list {
  min-width: max-content;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

/* منوی اصلی ردیف زیر نوار برند (در صورت استفاده) */
.jdm-hnav--in-main {
  border: 0;
  border-top: 1px solid color-mix(in oklab, var(--jdm-header-border, #e2e8f0) 70%, transparent);
  background: transparent;
}

.jdm-hnav--in-main .jdm-hnav__inner {
  padding-block: 0.25rem 0.55rem;
  justify-content: flex-start;
}

.jdm-hnav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.15rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  min-width: max-content;
}

.jdm-hnav__list .sub-menu {
  display: none;
}

.jdm-hnav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.jdm-hnav__link:hover,
.jdm-hnav__link:focus-visible {
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 12%, transparent);
  color: var(--color-jdm-primary, #059669);
  outline: none;
}

.jdm-hnav__ico {
  display: inline-flex;
  flex-shrink: 0;
  color: currentColor;
}

.jdm-hnav__ico svg {
  width: 18px;
  height: 18px;
}

.jdm-hnav--bottom {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 45;
  border-bottom: 0;
  border-top: 1px solid var(--jdm-header-border, var(--color-jdm-border, #e2e8f0));
  box-shadow: 0 -6px 20px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 8%, transparent);
}

body.has-jdm-hnav-bottom {
  padding-bottom: 3.25rem;
}

@media (max-width: 960px) {
  .jdm-hnav--inline .jdm-hnav__label,
  .jdm-hnav--in-main .jdm-hnav__label {
    font-size: 0.8rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 800;
  color: var(--jdm-header-fg, var(--color-jdm-fg, #064e3b));
  text-decoration: none;
}

.brand__logo {
  display: block;
  max-height: 52px;
  width: auto;
  height: auto;
}

.brand__text {
  font-size: var(--jdm-logo-text-size-desktop, 18px);
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--jdm-logo-text-color, var(--jdm-header-fg, var(--color-jdm-fg, #064e3b)));
}

@media (max-width: 960px) {
  .brand__text {
    font-size: var(--jdm-logo-text-size-mobile, 16px);
  }
}

.brand__text--vazirmatn {
  font-family: "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 800;
}

.brand__text--virgoul {
  font-family: "Virgoul", "Vazirmatn", Tahoma, sans-serif !important;
  font-weight: 400;
  letter-spacing: 0;
}

/* دکمه همبرگر — فقط آیکون، بدون باکس رنگی */
.nav-cats-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius, 12px);
  cursor: pointer;
  color: var(--color-jdm-fg, #064e3b);
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  touch-action: manipulation;
}

.nav-cats-toggle:hover,
.nav-cats-toggle:focus-visible {
  background: rgba(6, 78, 59, 0.06);
  outline: none;
}

.nav-cats-toggle:active {
  transform: scale(0.96);
}

.nav-cats-toggle[aria-expanded="true"] {
  background: rgba(6, 78, 59, 0.1);
  color: #047857;
}

.nav-cats-toggle__icon {
  display: inline-flex;
  line-height: 0;
}

.nav-cats-toggle__icon svg {
  width: 28px;
  height: 28px;
}

/* منوی اصلی موبایل: همان دکمه/کشوی مشاغل؛ اینلاین فقط دسکتاپ */
.nav-primary-toggle {
  display: none;
}

@media (max-width: 900px) {
  .nav-primary-toggle {
    display: inline-flex;
  }

  .site-nav__start .jdm-hnav--inline {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .nav-primary-toggle {
    display: none !important;
  }
}

.nav-toggle {
  display: none;
}

.nav-links {
  display: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* —— کشوی دسته‌بندی هدر —— */
body.jdm-cats-drawer-open {
  overflow: hidden;
}

.jdm-cats-drawer[hidden] {
  display: none !important;
}

.jdm-cats-drawer {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  /* LTR: از چپ */
  justify-content: flex-start;
}

.jdm-cats-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.jdm-cats-drawer__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(22rem, 92vw);
  height: 100%;
  max-height: 100dvh;
  background: #fff;
  border-inline-end: 1px solid #d8deeb;
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.14);
  animation: jdmCatsSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* فارسی RTL: پنل از لبه فیزیکی راست (flex-start در RTL = راست) */
html[dir="rtl"] .jdm-cats-drawer {
  justify-content: flex-start;
}

html[dir="rtl"] .jdm-cats-drawer__panel {
  /* لبه روبه‌رو به محتوا = چپ پنل = inline-end در RTL */
  border-inline-start: 0;
  border-inline-end: 1px solid #d8deeb;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.14);
  animation-name: jdmCatsSlideInFromRight;
}

@keyframes jdmCatsSlideIn {
  from { transform: translateX(-100%); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes jdmCatsSlideInFromRight {
  from { transform: translateX(100%); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.jdm-cats-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid #e8ecf4;
  background: #f8fafc;
}

.jdm-cats-drawer__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #064e3b;
}

.jdm-cats-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 0;
  border-radius: var(--radius, 12px);
  background: #e9edf7;
  color: #064e3b;
  cursor: pointer;
}

.jdm-cats-drawer__close:hover {
  background: #dce3f2;
}

.jdm-cats-drawer__body {
  overflow: auto;
  padding: 0.65rem;
  -webkit-overflow-scrolling: touch;
}

.jdm-cats-drawer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.jdm-cats-drawer__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius, 14px);
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.jdm-cats-drawer__link:hover,
.jdm-cats-drawer__link:focus-visible {
  background: var(--color-jdm-soft, var(--color-soft, #f0fdf4));
  border-color: var(--color-jdm-border, #e2e8f0);
  outline: none;
}

.jdm-cats-drawer__icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius, 12px);
  background: var(--color-jdm-soft, var(--color-soft, #ecfdf5));
  color: var(--color-jdm-primary, #059669);
}

.jdm-cats-drawer__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.jdm-cats-drawer__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: #064e3b;
  line-height: 1.3;
}

.jdm-cats-drawer__count {
  font-size: 0.72rem;
  color: #047857;
}

.jdm-cats-drawer__chev {
  flex-shrink: 0;
  color: #94a3b8;
  display: inline-flex;
}

html[dir="rtl"] .jdm-cats-drawer__chev {
  transform: scaleX(-1);
}

.jdm-cats-drawer__empty {
  margin: 1.5rem 0.75rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

@media (prefers-reduced-motion: reduce) {
  .jdm-cats-drawer__panel,
  html[dir="rtl"] .jdm-cats-drawer__panel {
    animation: none !important;
  }
}


.nav-links .menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 768px) {
  .nav-links .menu {
    display: flex;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-map-search {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 2.5rem;
  height: 2.5rem;
  padding-inline: 0;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border, var(--color-jdm-border, #e2e8f0));
  background: var(--color-surface, var(--color-jdm-surface, #fff));
  color: var(--color-foreground, var(--color-jdm-fg, #064e3b));
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-map-search__label {
  display: none;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-map-search:hover {
  background: var(--color-primary, var(--color-jdm-primary, #059669));
  border-color: var(--color-primary, var(--color-jdm-primary, #059669));
  color: var(--color-on-primary, #fff);
}

/* ثبت آگهی: موبایل فقط آیکون */
.nav-cta {
  gap: 0.4rem;
}

.nav-cta__icon {
  display: inline-flex;
  line-height: 0;
}

.nav-cta__label {
  display: none;
}

@media (max-width: 767px) {
  .nav-cta {
    min-width: 2.5rem;
    width: 2.5rem;
    min-height: 2.5rem;
    padding: 0;
    border-radius: var(--radius, 12px);
  }
}

@media (min-width: 768px) {
  .nav-map-search {
    width: auto;
    min-width: 2.5rem;
    padding-inline: 0.7rem;
  }

  .nav-map-search__label,
  .nav-cta__label {
    display: inline;
  }
}

.nav-back {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-jdm-muted-text, #047857);
}

.btn {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: var(--radius, 14px);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: 0;
  transition: 0.2s ease;
}

.btn--primary {
  background: var(--color-jdm-primary, #059669);
  color: #fff;
  box-shadow: 0 8px 28px rgba(6, 78, 59, 0.08);
}

.btn--primary:hover {
  background: var(--color-jdm-secondary, #10b981);
}

.btn--accent {
  --bs-btn-bg: var(--color-jdm-accent, var(--color-accent, #b45309));
  --bs-btn-hover-bg: color-mix(in oklab, var(--color-jdm-accent, var(--color-accent, #b45309)) 78%, #000);
  --bs-btn-border-color: transparent;
  background-color: var(--color-jdm-accent, var(--color-accent, #b45309));
  background-image: none;
  color: #fff;
  box-shadow: 0 6px 18px color-mix(in oklab, var(--color-jdm-accent, var(--color-accent, #b45309)) 28%, transparent);
}

.btn--accent:hover {
  background-color: color-mix(in oklab, var(--color-jdm-accent, var(--color-accent, #b45309)) 78%, #000);
  background-image: none;
}

.btn--outline {
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  color: var(--color-jdm-fg, #064e3b);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 1.75rem 1.25rem 2rem;
  min-height: min(44vh, 360px);
}

.hero__bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--jdm-grad-hero-a, var(--color-jdm-secondary, #10b981)) 18%, transparent), transparent 40%),
    radial-gradient(circle at 80% 10%, color-mix(in oklab, var(--jdm-grad-hero-b, var(--color-jdm-accent, #d97706)) 12%, transparent), transparent 35%);
}

.hero__content {
  position: relative;
  max-width: var(--jdm-site-width, 64rem);
  margin-inline: auto;
  text-align: center;
  padding-bottom: 1.5rem;
}

.hero__brand {
  margin: 0;
  font-family: "Virgoul", "Vazirmatn", Tahoma, sans-serif !important;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  background: linear-gradient(
    105deg,
    var(--color-jdm-soft, var(--color-soft, #ecfdf5)) 0%,
    var(--color-jdm-secondary, var(--color-secondary, #6ee7b7)) 30%,
    var(--color-jdm-gold, var(--gold, #fcd34d)) 68%,
    var(--color-jdm-accent, var(--color-accent, #f59e0b)) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero__lead {
  margin: 0.75rem auto 0;
  max-width: 36rem;
  color: color-mix(in oklab, var(--color-jdm-soft, var(--color-soft, #ecfdf5)) 92%, #fff);
  font-size: 1.05rem;
  font-weight: 500;
  text-shadow: 0 1px 2px color-mix(in oklab, var(--color-jdm-fg, var(--color-foreground, #064e3b)) 35%, transparent);
}

.search-panel {
  margin: 2rem auto 0;
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 0.75rem;
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg, 0 8px 28px rgba(6, 78, 59, 0.08));
}

@media (max-width: 900px) {
  .search-panel {
    grid-template-columns: 1fr;
  }
}

.search-panel__submit {
  white-space: nowrap;
  min-height: 2.75rem;
}

.search-panel__submit svg {
  flex-shrink: 0;
}

.search-field {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--radius, 14px);
  border: 1px solid color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 80%, transparent);
  background: var(--color-jdm-soft, #f0fdf4);
  padding-inline: 0.75rem;
  color: var(--color-jdm-muted-text, #047857);
}

.search-field input,
.search-field select {
  width: 100%;
  border: 0;
  background: transparent;
  padding-block: 0.625rem;
  color: var(--color-jdm-fg, #064e3b);
  outline: none;
}

.popular {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: color-mix(in oklab, var(--color-jdm-soft, var(--color-soft, #ecfdf5)) 90%, #fff);
}

.chip {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--color-jdm-soft, #fff) 28%, transparent);
  background: color-mix(in oklab, var(--color-jdm-soft, #fff) 16%, transparent);
  padding: 0.25rem 0.75rem;
  color: var(--color-jdm-soft, var(--color-soft, #ecfdf5));
}

.chip:hover {
  background: color-mix(in oklab, var(--color-jdm-soft, #fff) 30%, transparent);
  border-color: color-mix(in oklab, var(--jdm-grad-hero-a, var(--color-jdm-secondary, #10b981)) 45%, transparent);
}

.section {
  max-width: var(--jdm-site-width, 64rem);
  margin-inline: auto;
  padding: 3rem 1.25rem;
}

/** صفحهٔ اصلی — بخش‌های فشرده با عنوان عمودی کنار باکس */
.section--rail {
  padding-block: 0.85rem;
}

#categories.section--rail {
  padding-top: 1.1rem;
}

#listings.section--rail,
#provinces.section--rail {
  padding-block: 0.75rem;
}

.section-rail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: stretch;
}

.section-rail__aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding-inline-end: 0.5rem;
  border-inline-end: 3px solid var(--color-jdm-primary, #059669);
  min-width: 2.25rem;
}

.section-rail__body {
  min-width: 0;
}

.section-rail__body--facet {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.45rem;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.section-rail__body--facet .facet-rail {
  width: 100%;
  padding-block: 0.1rem 0.15rem;
  background: transparent;
}

/* نوار «مشاهده بیشتر» — بالا سمت چپ (RTL: inline-end) */
.facet-rail__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
}

.facet-rail__more {
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.15rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-jdm-secondary, var(--color-secondary, #10b981));
  background: transparent;
  border: 0;
  cursor: pointer;
}

/* فقط کارت‌ها سطح دارند؛ باکس بیرونی شفاف */
.section-rail__body--listings {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.section-rail--listings .section-rail__aside {
  align-self: start;
  position: sticky;
  top: calc(var(--nav-h, 64px) + 0.75rem);
}

.section__title--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin: 0;
  font-weight: 800;
  font-size: clamp(0.9rem, 1.05rem, 1.15rem);
  line-height: 1.15;
  letter-spacing: 0.04em;
  white-space: nowrap;
  background: linear-gradient(
    180deg,
    var(--color-jdm-secondary, var(--color-secondary, #6ee7b7)) 0%,
    var(--color-jdm-primary, var(--color-primary, #059669)) 55%,
    var(--color-jdm-fg, var(--color-foreground, #064e3b)) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 color-mix(in oklab, var(--color-jdm-surface, #fff) 95%, transparent))
    drop-shadow(0 0 10px color-mix(in oklab, var(--color-jdm-soft, #ecfdf5) 90%, transparent));
}

.section-rail__aside:has(+ .section-rail__body--facet) .section__title--vertical {
  font-size: clamp(0.95rem, 1.1rem, 1.2rem);
}

.section__sub--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  margin: 0;
  font-size: 0.72rem;
  max-height: 8rem;
  overflow: hidden;
  color: var(--color-jdm-muted-text, #047857);
}

@media (max-width: 640px) {
  .section-rail {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .section-rail__aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border-inline-end: 0;
    border-bottom: 2px solid var(--color-jdm-primary, #059669);
    padding-inline-end: 0;
    padding-bottom: 0.35rem;
  }

  .section__title--vertical,
  .section__sub--vertical {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 1.15rem;
  }

  .section-rail--listings .section-rail__aside {
    position: static;
  }
}

.section__head {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-jdm-fg, #064e3b);
}

.section__sub {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-jdm-muted-text, #047857);
}

/* آرشیو دسته / شهر / جستجو — dir-archive */
.tax-crumbs {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--color-jdm-muted-text, #047857);
}

.tax-crumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tax-crumbs__list li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tax-crumbs__list li + li::before {
  content: "/";
  opacity: 0.45;
}

.tax-crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tax-crumbs a:hover {
  color: var(--color-jdm-primary, #059669);
}

.tax-crumbs a:focus-visible {
  outline: 2px solid var(--color-jdm-primary, #059669);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 900px) {
  .dir-archive__crumbs {
    margin-bottom: 0.4rem;
  }

  .dir-archive__crumbs .tax-crumbs__list {
    font-size: 0.72rem;
  }
}

.dir-archive {
  padding-bottom: 3rem;
}

.dir-archive__hero {
  position: relative;
  overflow: visible;
  margin-bottom: 0.5rem;
  padding-bottom: 2rem;
  min-height: 17rem;
  border-bottom: 1px solid color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 70%, transparent);
  background: var(--color-jdm-soft, #f0fdf4);
  box-shadow: 0 14px 36px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 10%, transparent);
}

@media (max-width: 900px) {
  .dir-archive__hero {
    min-height: 0;
    padding-bottom: 0.65rem;
    margin-bottom: 0.25rem;
    box-shadow: 0 8px 20px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 7%, transparent);
  }
}

/**
 * عکس پس‌زمینه — تمام عرض هیرو، زیر گرادینت و محتوا.
 */
.dir-archive__hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--dir-hero-photo);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
}

.dir-archive__hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* گرادینت هیرو از تنظیمات استایل (soft + hero A/B) */
  background:
    linear-gradient(
      118deg,
      color-mix(in oklab, var(--color-jdm-soft, #ecfdf5) 38%, transparent) 0%,
      color-mix(in oklab, var(--color-jdm-soft, #f3fbf7) 22%, transparent) 42%,
      color-mix(in oklab, var(--color-jdm-soft, #ecfdf5) 34%, transparent) 100%
    ),
    radial-gradient(
      ellipse 85% 90% at 12% 0%,
      color-mix(in oklab, var(--jdm-grad-hero-a, #059669) 12%, transparent),
      transparent 58%
    ),
    radial-gradient(
      ellipse 70% 70% at 88% 100%,
      color-mix(in oklab, var(--jdm-grad-hero-b, #d97706) 8%, transparent),
      transparent 55%
    );
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, var(--color-jdm-surface, #fff) 35%, transparent),
    inset 0 -24px 48px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 8%, transparent);
}

.dir-archive__hero-inner {
  position: relative;
  z-index: 2;
  /* عرض از تنظیمات کلی (--jdm-site-width) */
  max-width: var(--jdm-site-width, 1120px);
  margin-inline: auto;
  padding: 1.75rem 1.25rem 2rem;
}

@media (max-width: 900px) {
  .dir-archive__hero-inner {
    padding: 0.85rem 1rem 0.75rem;
  }
}

/**
 * فلش تزئینی — بعد از عنوان، سایز کامل، امتداد رو به پایین روی باکس سرچ.
 */
.dir-archive__search-wrap {
  position: relative;
  margin-top: 2.75rem;
}

/* نوار شهرستان‌های استان — زیر سرچ */
.jdm-province-counties {
  margin-top: 1rem;
  padding: 0.75rem 0.85rem 0.85rem;
  border-radius: var(--radius, 14px);
  border: 1px solid color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 70%, transparent);
  background: color-mix(in oklab, var(--color-jdm-surface, #fff) 88%, var(--color-jdm-soft, #f0fdf4));
}

.jdm-province-counties__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.jdm-province-counties__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-jdm-muted-text, #047857);
}

.jdm-province-counties__more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border: 0;
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 12%, transparent);
  color: var(--color-jdm-primary, #059669);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.jdm-province-counties__more:hover {
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 20%, transparent);
}

.jdm-province-counties__row {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.4rem;
}

.jdm-province-counties__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 0;
  padding: 0.45rem 0.25rem;
  border-radius: var(--radius, 10px);
  border: 1px solid color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 55%, transparent);
  background: #fff;
  color: inherit;
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.jdm-province-counties__item:hover {
  border-color: #cbd5e1;
  background: var(--color-jdm-soft, #f0fdf4);
}

.jdm-province-counties__icon {
  display: inline-flex;
  color: var(--color-jdm-primary, #059669);
}

.jdm-province-counties__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-jdm-fg, #064e3b);
  word-break: break-word;
}

.jdm-province-counties__count {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-jdm-muted-text, #047857);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 1100px) {
  .jdm-province-counties__row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .jdm-province-counties__row {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.4rem;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .jdm-province-counties__item {
    flex: 0 0 4.75rem;
    width: 4.75rem;
  }
}

.dir-archive__title-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem 1rem;
  overflow: visible;
}

.dir-archive__title-row .dir-archive__title {
  flex: 0 1 auto;
  max-width: calc(100% - 6.5rem);
}

.dir-archive__search-arrow {
  flex: 0 0 auto;
  position: relative;
  z-index: 4;
  top: 0.2rem;
  width: 5.5rem;
  height: auto;
  margin-bottom: -5.25rem;
  color: var(--color-jdm-accent, #d97706);
  pointer-events: none;
  opacity: 0.92;
  line-height: 0;
  /* RTL: آینه + کمی کج؛ سر بالای فلش به‌سمت عنوان */
  transform: scaleX(-1) rotate(-14deg);
  transform-origin: 50% 0%;
}

.dir-archive__search-arrow-svg {
  display: block;
  width: 100%;
  height: auto;
}

html[dir="ltr"] .dir-archive__search-arrow {
  /* LTR: سر بالا به‌سمت عنوان (چپ) */
  transform: rotate(14deg);
  transform-origin: 50% 0%;
}

@media (max-width: 900px) {
  .dir-archive__search-arrow {
    display: none;
  }

  .dir-archive__title-row .dir-archive__title {
    max-width: 100%;
  }

  .dir-archive__search-wrap {
    margin-top: 0.55rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .dir-archive__search-arrow {
    animation: dir-archive-arrow-nudge-rtl 2.8s ease-in-out infinite;
  }

  html[dir="ltr"] .dir-archive__search-arrow {
    animation-name: dir-archive-arrow-nudge;
  }
}

@keyframes dir-archive-arrow-nudge {
  0%,
  100% {
    transform: rotate(14deg) translateY(0);
  }
  50% {
    transform: rotate(14deg) translateY(0.35rem);
  }
}

@keyframes dir-archive-arrow-nudge-rtl {
  0%,
  100% {
    transform: scaleX(-1) rotate(-14deg) translateY(0);
  }
  50% {
    transform: scaleX(-1) rotate(-14deg) translateY(0.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dir-archive__search-arrow {
    animation: none;
  }
}

.dir-archive__intro {
  display: grid;
  /* آیکون | متن | آمار — همیشه یک سطر */
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem 0.75rem;
  align-items: center;
  margin-bottom: 0.35rem;
  overflow: visible;
}

.dir-archive__icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: var(--radius-lg, 16px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  color: var(--color-jdm-primary, #059669);
  box-shadow: var(--shadow-jdm, 0 8px 28px rgba(6, 78, 59, 0.08));
}

.dir-archive__copy {
  min-width: 0;
}

.dir-archive__eyebrow {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-jdm-primary, #059669);
}

.dir-archive__title {
  margin: 0;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--color-jdm-fg, #064e3b);
}

.dir-archive__desc {
  margin: 0.55rem 0 0;
  max-width: 54ch;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-jdm-muted-text, #047857);
}

.dir-archive--desc-inline .dir-archive__desc {
  max-width: none;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.dir-archive__stat {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.1rem;
  width: fit-content;
  margin-top: 0;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  box-shadow: 0 4px 16px rgba(6, 78, 59, 0.06);
  flex-shrink: 0;
}

.dir-archive__stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-jdm-fg, #064e3b);
  font-variant-numeric: tabular-nums;
}

.dir-archive__stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-jdm-muted-text, #047857);
}

/* موبایل: یک سطر فشرده + سرچ کوتاه‌تر */
@media (max-width: 900px) {
  .dir-archive__intro {
    gap: 0.45rem 0.5rem;
    margin-bottom: 0.15rem;
  }

  .dir-archive__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius, 12px);
  }

  .dir-archive__icon svg {
    width: 20px;
    height: 20px;
  }

  .dir-archive__eyebrow {
    margin: 0 0 0.1rem;
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .dir-archive__title {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .dir-archive__stat {
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius, 10px);
  }

  .dir-archive__stat-num {
    font-size: 1rem;
  }

  .dir-archive__stat-label {
    font-size: 0.62rem;
  }

  .dir-archive__search {
    margin: 0;
  }

  .dir-archive__search.search-panel,
  .dir-archive__search .search-panel,
  .search-panel.dir-archive__search {
    margin-top: 0;
    padding: 0.45rem;
    gap: 0.4rem;
    border-radius: var(--radius, 14px);
    box-shadow: var(--shadow-soft, 0 4px 14px rgba(6, 78, 59, 0.06));
  }

  .dir-archive__search .search-field {
    border-radius: var(--radius, 10px);
    padding-inline: 0.55rem;
  }

  .dir-archive__search .search-field input,
  .dir-archive__search .search-field select {
    padding-block: 0.45rem;
    font-size: 0.88rem;
  }

  .dir-archive__search .search-panel__submit,
  .dir-archive__search .btn {
    min-height: 2.35rem;
    padding-inline: 0.85rem;
  }

  .dir-archive__body {
    padding-top: 0.65rem;
  }
}

.dir-archive__search {
  max-width: none;
  margin: 0;
  width: 100%;
}

.dir-archive__search .search-field select {
  cursor: pointer;
}

.dir-archive__body {
  max-width: var(--jdm-site-width, 1120px);
  margin-inline: auto;
  padding: 1.25rem 1.25rem 0;
}

/* —— نوار دسته‌های شغلی داخل شهر (اسکرول افقی) —— */
.jdm-city-cats {
  margin: 0 0 1rem;
  padding: 0.85rem 0 0.25rem;
}

.jdm-city-cats__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
  padding-inline: 0.15rem;
}

.jdm-city-cats__label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-jdm-muted-text, #047857);
}

/* «مشاهده بیشتر» — بالا سمت چپ (RTL: inline-end) مثل صفحه اصلی */
.jdm-city-cats__toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-inline-start: auto;
}

.jdm-city-cats__more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.15rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-jdm-secondary, var(--color-secondary, #10b981));
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.jdm-city-cats__more:hover {
  color: var(--color-jdm-primary, var(--color-primary, #059669));
  background: transparent;
}

.jdm-city-cats__more:focus-visible {
  outline: 2px solid var(--color-jdm-primary, #059669);
  outline-offset: 2px;
}

.jdm-city-cats__modal-grid .facet-rail__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.75rem;
  padding-inline: 0.4rem;
  border-radius: var(--radius, 8px);
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 10%, #fff);
  color: var(--color-jdm-primary, #059669);
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.jdm-city-cats__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  /* اسکرول‌بار مخفی؛ درگ/چرخ موس همچنان کار می‌کند */
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.25rem;
  margin-inline: -0.15rem;
  padding-inline: 0.15rem;
}

.jdm-city-cats__viewport::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.jdm-city-cats__viewport.is-dragscroll {
  cursor: grab;
}

.jdm-city-cats__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.jdm-city-cats__track {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  width: max-content;
  padding-block: 0.15rem;
}

.jdm-city-cats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  width: 5.5rem;
  min-height: 5.5rem;
  padding: 0.65rem 0.4rem 0.55rem;
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: #fff;
  color: var(--color-jdm-fg, #064e3b);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow, 0 4px 14px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 6%, transparent));
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

a.jdm-city-cats__item {
  color: inherit;
  text-decoration: none;
}

.jdm-city-cats__item:hover {
  border-color: color-mix(in oklab, var(--color-jdm-primary, #059669) 35%, var(--color-jdm-border, #e2e8f0));
  background: var(--color-jdm-soft, var(--color-soft, #ecfdf5));
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover, 0 14px 28px color-mix(in oklab, var(--color-jdm-primary, #059669) 14%, transparent));
}

.jdm-city-cats__item:focus-visible {
  outline: 2px solid var(--color-jdm-primary, #059669);
  outline-offset: 2px;
}

.jdm-city-cats__item.is-active {
  border-color: #cbd5e1;
  background: linear-gradient(160deg, #f8fafc 0%, #eef2f7 100%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  color: var(--color-jdm-primary, #059669);
}

.jdm-city-cats__icon,
.jdm-city-cats__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding-inline: 0.35rem;
  border-radius: var(--radius, 10px);
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 10%, #fff);
  color: var(--color-jdm-primary, #059669);
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.jdm-city-cats__item.is-active .jdm-city-cats__icon,
.jdm-city-cats__item.is-active .jdm-city-cats__count {
  background: var(--color-jdm-primary, #059669);
  color: #fff;
}

.jdm-city-cats__name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

/* گرید آرشیو: از ~۱۱۰۰px چهار ستون */
@media (min-width: 1100px) {
  .dir-archive__grid.listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.dir-archive__related {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-jdm-lg, 18px);
  border: 1px solid color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 75%, transparent);
  background: color-mix(in oklab, var(--color-jdm-surface, #fff) 88%, var(--color-jdm-soft, #f0fdf4));
}

.dir-archive__related-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-jdm-muted-text, #047857);
}

.dir-archive__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.dir-archive__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.dir-archive__chip:hover {
  border-color: #cbd5e1;
  background: var(--color-jdm-soft, #f0fdf4);
  transform: translateY(-1px);
}

.dir-archive__chip:focus-visible {
  outline: 2px solid var(--color-jdm-primary, #059669);
  outline-offset: 2px;
}

.dir-archive__chip-count {
  display: inline-flex;
  min-width: 1.35rem;
  justify-content: center;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 12%, transparent);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-jdm-primary, #059669);
  font-variant-numeric: tabular-nums;
}

.dir-archive__item {
  min-width: 0;
  animation: dir-archive-fade 0.35s ease both;
}

.dir-archive__item:nth-child(2) { animation-delay: 0.04s; }
.dir-archive__item:nth-child(3) { animation-delay: 0.08s; }
.dir-archive__item:nth-child(4) { animation-delay: 0.12s; }
.dir-archive__item:nth-child(5) { animation-delay: 0.16s; }
.dir-archive__item:nth-child(6) { animation-delay: 0.2s; }

@keyframes dir-archive-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dir-archive__item {
    animation: none;
  }
  .dir-archive__chip:hover {
    transform: none;
  }
}

.dir-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.65rem;
  padding: 2.75rem 1.25rem;
  border-radius: var(--radius-jdm-lg, 18px);
  border: 1px dashed var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
}

.dir-empty__icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-lg, 18px);
  background: var(--color-jdm-soft, #f0fdf4);
  color: var(--color-jdm-primary, #059669);
  margin-bottom: 0.35rem;
}

.dir-empty__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-jdm-fg, #064e3b);
}

.dir-empty__hint {
  margin: 0;
  max-width: 36ch;
  font-size: 0.9rem;
  color: var(--color-jdm-muted-text, #047857);
}

.dir-empty__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.dir-archive__pager {
  margin-top: 1.75rem;
}

.dir-archive__pager .nav-links,
.dir-archive__pager .dir-pager {
  display: flex !important;
  position: static !important;
  inset: auto !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.dir-archive__pager .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  color: var(--color-jdm-fg, #064e3b);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.dir-archive__pager a.page-numbers:hover {
  border-color: var(--color-jdm-primary, #059669);
  color: var(--color-jdm-primary, #059669);
}

.dir-archive__pager .page-numbers.current {
  border-color: var(--color-jdm-primary, #059669);
  background: var(--color-jdm-primary, #059669);
  color: #fff;
  cursor: default;
}

.dir-archive__pager .page-numbers.dots {
  border: 0;
  background: transparent;
  min-width: auto;
  padding-inline: 0.25rem;
}

/* سازگاری نام‌های قبلی */
.tax-archive__head {
  margin-bottom: 0.25rem;
}

.tax-archive__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-jdm-primary, #059669);
}

.tax-archive__desc {
  margin-top: 0.5rem;
  max-width: 62ch;
  line-height: 1.7;
}

.tax-archive__meta {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-jdm-muted-text, #047857);
}

.tax-archive__item {
  min-width: 0;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-jdm-primary, #059669);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.cat-grid {
  display: none;
}

/* —— نوار افقی دسته / استان —— */
.facet-section {
  max-width: 72rem;
  background: transparent;
}

.facet-section.section--rail {
  padding-block: 0.75rem;
  background: transparent;
}

/* عنوان عمودی بالای سکشن؛ دکمه دیگر زیر عنوان نیست */
.section-rail:has(> .section-rail__body--facet) {
  align-items: start;
}

.section-rail:has(> .section-rail__body--facet) > .section-rail__aside {
  justify-content: flex-start;
  padding-top: 0.15rem;
}

.facet-rail {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  padding-block: 0.15rem 0.25rem;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  /* اسکرول‌بار مخفی؛ درگ/چرخ موس همچنان کار می‌کند */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.facet-rail::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.facet-rail.is-dragscroll {
  cursor: grab;
  touch-action: pan-x;
  user-select: none;
}

.facet-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.facet-rail.is-dragging .facet-rail__item {
  pointer-events: none;
}

.facet-rail__cell {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.facet-rail__item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.35rem;
  width: max-content;
  max-width: 11rem;
  min-width: 5.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius, 14px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  box-shadow: var(--shadow, 0 6px 18px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 6%, transparent));
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.facet-rail__item:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--color-jdm-primary, #059669) 35%, var(--color-jdm-border, #e2e8f0));
  background: var(--color-jdm-soft, var(--color-soft, #f0fdf4));
  box-shadow: var(--shadow-hover, 0 14px 28px color-mix(in oklab, var(--color-jdm-primary, #059669) 14%, transparent));
}

.facet-rail__icon {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  background: var(--color-jdm-soft, #f0fdf4);
  color: var(--color-jdm-primary, #059669);
}

.facet-rail__name {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--color-jdm-fg, #064e3b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.facet-rail__count {
  font-size: 0.7rem;
  color: var(--color-jdm-muted-text, #047857);
  white-space: nowrap;
}

body.jdm-facet-modal-open {
  overflow: hidden;
}

.jdm-facet-modal[hidden] {
  display: none !important;
}

.jdm-facet-modal {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.jdm-facet-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 78, 59, 0.45);
}

.jdm-facet-modal__panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(85vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  box-shadow: 0 24px 60px rgba(6, 78, 59, 0.2);
  overflow: hidden;
}

.jdm-facet-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--color-jdm-border, #e2e8f0);
}

.jdm-facet-modal__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-jdm-fg, #064e3b);
}

.jdm-facet-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-jdm-soft, #f0fdf4);
  color: var(--color-jdm-fg, #064e3b);
  cursor: pointer;
}

.jdm-facet-modal__close:hover {
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 15%, transparent);
}

.jdm-facet-modal__body {
  overflow: auto;
  padding: 1rem 1.15rem 1.25rem;
}

.jdm-facet-modal__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-start;
}

.jdm-facet-modal__grid .facet-rail__item {
  max-width: 12rem;
}

.cat {
  display: flex;
  cursor: pointer;
  flex-direction: column;
  gap: 0.5rem;
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  padding: 1rem;
  box-shadow: var(--shadow, 0 8px 28px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 8%, transparent));
  transition: 0.2s ease;
}

.cat:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--color-jdm-primary, #059669) 35%, var(--color-jdm-border, #e2e8f0));
  background: var(--color-jdm-soft, var(--color-soft, #f0fdf4));
  box-shadow: var(--shadow-hover, 0 14px 32px color-mix(in oklab, var(--color-jdm-primary, #059669) 14%, transparent));
}

.cat__icon {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--color-jdm-soft, #f0fdf4);
  color: var(--color-jdm-primary, #059669);
}

.cat__name {
  font-weight: 600;
  color: var(--color-jdm-fg, #064e3b);
}

.cat__count {
  font-size: 0.75rem;
  color: var(--color-jdm-muted-text, #047857);
}

.toolbar {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-pill {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: var(--color-jdm-fg, #064e3b);
}

.filter-pill.is-active {
  border-color: var(--color-jdm-primary, #059669);
  background: var(--color-jdm-primary, #059669);
  color: #fff;
}

.toolbar__meta {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--color-jdm-muted-text, #047857);
}

.jdm-ppp {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: 0.35rem;
  font-size: 0.8rem;
  color: var(--color-jdm-muted-text, #047857);
}

.jdm-ppp__select {
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  border-radius: var(--radius, 10px);
  background: #fff;
  color: var(--color-jdm-fg, #064e3b);
  padding: 0.3rem 0.55rem;
  font-family: inherit;
  font-size: 0.8rem;
}

.jdm-listing-pager {
  margin-top: 1.5rem;
}

.jdm-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
}

/* قبلی/بعدی و شماره صفحه: یک باکس و یک پالت */
.jdm-pager__btn,
.jdm-pager__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.55rem;
  border-radius: var(--radius, 10px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: #fff;
  color: var(--color-jdm-fg, #064e3b);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.jdm-pager__btn:hover:not(:disabled):not(.is-disabled),
a.jdm-pager__page:hover,
button.jdm-pager__page:hover:not(:disabled) {
  border-color: var(--color-jdm-primary, #059669);
  color: var(--color-jdm-primary, #059669);
  background: #fff;
}

.jdm-pager__btn.is-disabled,
.jdm-pager__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.jdm-pager__pages {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

button.jdm-pager__page:disabled {
  cursor: default;
}

.jdm-pager__page.is-current {
  background: var(--color-jdm-primary, #059669);
  border-color: var(--color-jdm-primary, #059669);
  color: #fff;
}

.jdm-pager__page.is-current:hover {
  background: var(--color-jdm-primary, #059669);
  border-color: var(--color-jdm-primary, #059669);
  color: #fff;
}

.jdm-pager__dots {
  color: var(--color-jdm-muted-text, #047857);
  padding: 0 0.15rem;
  user-select: none;
}

.jdm-pager__status {
  font-size: 0.85rem;
  color: var(--color-jdm-muted-text, #047857);
  font-weight: 600;
  white-space: nowrap;
}

.jdm-pager__btn,
.jdm-pager__page,
.jdm-pager__dots {
  flex-shrink: 0;
}

.jdm-pager__nav {
  display: flex;
  align-items: center;
}

body.is-jdm-listings-loading #listing-grid {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.jdm-listings-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-jdm-muted-text, #047857);
}

.listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .listing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .listing-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.listing {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-jdm-lg, 18px);
  border: 0;
  /* سطح سفید کارت روی پس‌زمینه صفحه (نه muted که با bg صفحه قاطی شود) */
  background: var(--color-surface, var(--color-jdm-surface, #fff));
  box-shadow: 0 1px 3px color-mix(in oklab, var(--color-jdm-fg, #0f172a) 6%, transparent);
  transition: 0.2s ease;
  cursor: pointer;
}

.listing:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover, 0 16px 36px color-mix(in oklab, var(--color-jdm-primary, #059669) 16%, transparent));
}

/* سازگاری با کارت‌های قدیمی که هنوز listing__link دارند */
.listing__link {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.listing__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-jdm-soft, #f0fdf4);
}

.listing__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing__media .jdm-thumb-ph {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  color: var(--color-jdm-primary, #059669);
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}

.listing__media.is-empty {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
}

.listing__media.is-empty .jdm-thumb-ph {
  display: flex;
}

.listing__media .jdm-thumb-ph svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.listing__badge {
  position: absolute;
  inset-inline-start: 0.5rem;
  top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--color-jdm-primary, #059669) 95%, transparent);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
}

.listing__body {
  padding: 1rem 1rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
}

.listing__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-jdm-fg, #064e3b);
  line-height: 1.35;
}

/**
 * لینک عنوان — برای کراول گوگل؛ ::after کل کارت را قابل‌کلیک می‌کند.
 */
.listing__title-link {
  color: inherit;
  text-decoration: none;
}

.listing__title-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.listing__hours {
  margin: 0;
  margin-inline-start: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.15rem 0.25rem;
  vertical-align: baseline;
  font-size: 0.78em;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-jdm-primary, #059669);
  white-space: nowrap;
}

.listing__hours-sep {
  color: #94a3b8;
  font-weight: 500;
}

.listing__hours-icon {
  flex: 0 0 auto;
  color: currentColor;
}

.listing__hours-label {
  font-weight: 700;
}

.listing__hours-time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.listing__meta,
.listing__tagline {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-jdm-muted-text, #047857);
}

.listing__tagline {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.listing__address {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing__foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.5rem;
  padding: 0.55rem 1rem 1rem;
  margin-top: auto;
}

.listing__stats {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  min-width: 0;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-jdm-muted-text, #047857);
}

.listing__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}

.listing__stat svg {
  flex-shrink: 0;
  color: var(--color-jdm-accent, #d97706);
}

.listing__price {
  font-weight: 600;
  color: var(--color-jdm-fg, #064e3b);
}

/**
 * امتیاز روی گوشه بالای چپ عکس؛ رنگ از تنظیمات طلایی / امتیاز (--gold).
 */
.listing__media .listing__rating {
  position: absolute;
  top: 0.55rem;
  inset-inline-end: 0.55rem; /* چپ در RTL */
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  /* سفید پاستیلی ملایم روی عکس */
  background: #FFF8F2;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--color-jdm-fg, #0f172a) 10%, transparent);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  color: var(--gold, var(--color-jdm-gold, #f59e0b));
  pointer-events: none;
  margin: 0;
}

.listing__media .listing__rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  color: var(--gold, var(--color-jdm-gold, #f59e0b));
}

.listing__media .listing__rating svg {
  color: var(--gold, var(--color-jdm-gold, #f59e0b));
  flex-shrink: 0;
}

.listing__rating-num {
  font-variant-numeric: tabular-nums;
}

.listing__contact,
.listing__cta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-inline-start: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: #fff;
  color: var(--color-jdm-primary, #059669);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: none;
}

.listing__link:hover .listing__cta,
.listing__link:focus-visible .listing__cta,
.listing:hover .listing__cta {
  background: var(--color-jdm-surface, #f8fafc);
  border-color: var(--color-jdm-border, #cbd5e1);
}

.listing__cta svg,
.listing__contact svg {
  flex-shrink: 0;
}

/* موبایل: کارت افقی شبیه سایدبار سرچ نقشه */
@media (max-width: 900px) {
  .listing-grid {
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
  }

  .listing {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0.3rem 0.75rem;
    align-items: start;
    padding: 0.625rem;
    border-radius: var(--radius, 12px);
    border: 0;
    background: var(--color-jdm-surface, #fff);
    box-shadow: 0 1px 3px color-mix(in oklab, var(--color-jdm-fg, #0f172a) 5%, transparent);
  }

  .listing:hover {
    transform: none;
    box-shadow: 0 2px 10px color-mix(in oklab, var(--color-jdm-primary, #059669) 12%, transparent);
  }

  /* سازگاری کارت قدیمی با listing__link */
  .listing__link {
    display: contents;
  }

  /* عکس دو ردیف را می‌پوشاند تا زیرش فضای خالی نماند */
  .listing__media {
    grid-column: 1;
    grid-row: 1 / -1;
    align-self: stretch;
    width: 4.5rem;
    min-height: 4.5rem;
    height: auto;
    aspect-ratio: auto;
    border-radius: var(--radius, 12px);
    flex-shrink: 0;
  }

  .listing__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* موبایل: امتیاز فشرده روی بندانگشتی */
  .listing__media .listing__rating {
    top: 4px;
    inset-inline-end: 4px;
    padding: 2px 5px;
    gap: 2px;
    font-size: 0.68rem;
  }

  .listing__media .listing__rating-stars svg:nth-child(n+2) {
    display: none;
  }

  .listing__media .listing__rating-stars svg {
    width: 10px;
    height: 10px;
  }

  .listing__badge {
    display: none;
  }

  .listing__body {
    padding: 0;
    gap: 0.15rem;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .listing__title {
    font-size: 0.9375rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .listing__meta,
  .listing__tagline {
    font-size: 0.75rem;
  }

  .listing__address {
    font-size: 0.72rem;
    -webkit-line-clamp: 1;
  }

  /* موبایل افقی: آمار و دکمه کنار هم جا می‌شوند */
  .listing__foot {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-top: 0;
    gap: 0.35rem;
    border-top: 0;
    min-width: 0;
  }

  .listing__stats {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    width: auto;
    overflow: hidden;
  }

  .listing__stat {
    font-size: 0.7rem;
  }

  /* منطقه در موبایل پنهان تا سطر نشکند */
  .listing__stat--district {
    display: none;
  }

  .listing__contact,
  .listing__cta {
    flex-shrink: 0;
    width: auto;
    margin-inline-start: auto;
    padding: 0.2rem 0.45rem;
    font-size: 0.65rem;
    gap: 0.2rem;
  }

  .listing__cta svg {
    width: 12px;
    height: 12px;
  }
}

/* آرشیو دسته در شهر/استان: لیست عمودی فشرده (همیشه شبیه سایدبار نقشه) */
.dir-archive--city-category .listing-grid {
  grid-template-columns: 1fr !important;
  gap: 0.65rem;
  max-width: 52rem;
  margin-inline: auto;
  padding-inline-start: 1.15rem;
}

.dir-archive--city-category .listing {
  position: relative;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.dir-archive--city-category .listing--has-map {
  gap: 0;
}

.dir-archive--city-category .listing--has-map .listing__inner {
  position: relative;
  z-index: 2;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.dir-archive--city-category .listing--has-map .listing__map {
  position: relative;
  z-index: 1;
  margin-top: -0.75rem;
  border-top: 0;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  padding-top: 0.75rem;
}

.dir-archive--city-category .listing__inner {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0.3rem 0.75rem;
  align-items: start;
  min-height: 5.5rem;
  padding: 0.625rem;
  border-radius: var(--radius, 12px);
  border: 1px solid color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 55%, transparent);
  background: var(--color-jdm-surface, #fff);
  box-shadow: 0 1px 3px color-mix(in oklab, var(--color-jdm-fg, #0f172a) 5%, transparent);
}

.dir-archive--city-category .listing:hover,
.dir-archive--city-category .listing:hover .listing__inner,
.dir-archive--city-category .listing:hover .listing__map {
  transform: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
  outline: none !important;
}

.dir-archive--city-category .listing:hover .listing__inner {
  border-color: color-mix(in oklab, var(--color-jdm-border, #e2e8f0) 55%, transparent) !important;
  box-shadow: 0 1px 3px color-mix(in oklab, var(--color-jdm-fg, #0f172a) 5%, transparent) !important;
}

.dir-archive--city-category .listing:hover .listing__map {
  border-color: color-mix(in oklab, var(--color-jdm-primary, #059669) 14%, var(--color-jdm-border, #d8e0ec)) !important;
  box-shadow:
    0 2px 10px color-mix(in oklab, var(--color-jdm-fg, #064e3b) 7%, transparent),
    inset 0 1px 0 color-mix(in oklab, var(--color-jdm-surface, #fff) 65%, transparent) !important;
}

.dir-archive--city-category .listing:hover .listing__cta,
.dir-archive--city-category .listing__link:hover .listing__cta {
  background: var(--color-jdm-surface, #fff) !important;
  border-color: var(--color-jdm-border, #e2e8f0) !important;
  color: inherit !important;
}

.dir-archive--city-category .listing__link {
  display: contents;
}

.dir-archive--city-category .listing__media {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: stretch;
  width: 4.5rem;
  min-height: 4.5rem;
  height: auto;
  aspect-ratio: auto;
  border-radius: var(--radius, 12px);
  flex-shrink: 0;
  position: relative;
}

.dir-archive--city-category .listing__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing__rank {
  display: none;
}

.dir-archive--city-category .listing__rank {
  position: absolute;
  top: 50%;
  inset-inline-start: -1.125rem;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius, 8px);
  background: var(--color-jdm-primary, #059669);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.25);
  pointer-events: none;
}

.dir-archive--city-category .listing__badge {
  display: none;
}

.dir-archive--city-category .listing__body {
  padding: 0;
  gap: 0.15rem;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
}

.dir-archive--city-category .listing__title {
  font-size: 0.9375rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.35rem;
  overflow: hidden;
  max-width: 100%;
}

.dir-archive--city-category .listing__title-link {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dir-archive--city-category .listing__hours {
  flex: 0 0 auto;
  margin-inline-start: 0;
  font-size: 0.72rem;
}

.dir-archive--city-category .listing__meta,
.dir-archive--city-category .listing__tagline {
  font-size: 0.75rem;
}

.dir-archive--city-category .listing__address {
  font-size: 0.72rem;
  -webkit-line-clamp: 1;
}

.dir-archive--city-category .listing__foot {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  margin-top: 0;
  gap: 0.35rem;
  border-top: 0;
  min-width: 0;
}

.dir-archive--city-category .listing__stats {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  overflow: hidden;
}

.dir-archive--city-category .listing__stat {
  font-size: 0.7rem;
}

.dir-archive--city-category .listing__stat--district {
  display: none;
}

.dir-archive--city-category .listing__contact,
.dir-archive--city-category .listing__cta {
  flex-shrink: 0;
  padding: 0.2rem 0.45rem;
  font-size: 0.65rem;
  gap: 0.2rem;
}

.dir-archive--city-category .listing__cta svg {
  width: 12px;
  height: 12px;
}

/* نقشه — جدا از باکس سفید، همان عرض/سایز، وسط‌چین زیر کارت */
.dir-archive--city-category .listing__map {
  --listing-row-h: 5.5rem;
  --listing-map-inset: 0.85rem;
  width: calc(100% - (var(--listing-map-inset) * 2));
  margin-inline: auto;
  margin-top: 0;
  height: calc(var(--listing-row-h) * 2);
  min-height: 11rem;
  border-radius: var(--radius, 12px);
  overflow: hidden;
  background: linear-gradient(160deg, #eef2f8 0%, #e3eaf4 100%);
  border: 1px solid color-mix(in oklab, var(--color-jdm-primary, #059669) 14%, #d8e0ec);
  box-shadow:
    0 2px 10px rgba(6, 78, 59, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.dir-archive--city-category .listing__map-canvas {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.dir-archive--city-category .listing__map .leaflet-container {
  border-radius: inherit;
  font-family: inherit;
}

.dir-archive--city-category .listing__map .leaflet-control-attribution {
  font-size: 9px;
  line-height: 1.2;
  padding: 2px 6px;
  margin: 0 4px 4px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* پین لوکیشن (مشترک با سرچ نقشه) */
.jdm-map-pin-wrap {
  background: transparent !important;
  border: 0 !important;
}

.jdm-map-pin {
  display: block;
  width: 32px;
  height: 48px;
  line-height: 0;
  filter: drop-shadow(0 3px 6px rgba(6, 78, 59, 0.35));
}

.jdm-map-pin__svg {
  display: block;
  overflow: visible;
}

.jdm-map-pin__body {
  fill: var(--color-jdm-primary, #059669);
  stroke: #fff;
  stroke-width: 1.25;
}

.jdm-map-pin__dot {
  fill: #fff;
}

.jdm-map-pin__shadow {
  fill: rgba(6, 78, 59, 0.28);
}

/**
 * Trust: هاله رنگی مرکزش روی سه باکس است (نه کل سکشن)،
 * به بالا/پایین مات می‌شود و با bg صفحه ادغام می‌شود.
 */
.trust {
  background: transparent;
  /* ::before هاله ۱۳۰٪ نباید اسکرول افقی صفحه بسازد */
  overflow-x: clip;
  overflow-y: visible;
}

.trust .section {
  overflow-x: clip;
  overflow-y: visible;
}

.trust-grid {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 1rem;
  overflow: hidden;
}

.trust-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 130%;
  height: 240%;
  transform: translate(-50%, -50%);
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 48% at 50% 50%,
    color-mix(in oklab, var(--color-secondary, var(--color-jdm-secondary, #A7F3D0)) 44%, transparent) 0%,
    color-mix(in oklab, var(--color-secondary, var(--color-jdm-secondary, #A7F3D0)) 24%, transparent) 42%,
    transparent 74%
  );
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  border-radius: var(--radius-lg, 18px);
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-surface, #fff);
  padding: 1rem 1.1rem;
  box-shadow: 0 8px 28px rgba(6, 78, 59, 0.08);
}

.trust-item__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius, 12px);
  background: var(--color-jdm-soft, #f0fdf4);
  color: var(--color-jdm-primary, #059669);
}

.trust-item__text {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--color-jdm-fg, #064e3b);
}

.trust-item h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.trust-item p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-jdm-muted-text, #047857);
}

.cta-band {
  max-width: var(--jdm-site-width, 64rem);
  margin: 2.5rem auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-radius: var(--radius-lg, 18px);
  background: linear-gradient(
    125deg,
    var(--color-jdm-fg, var(--color-foreground, #064e3b)) 0%,
    var(--color-jdm-primary, var(--color-primary, #059669)) 55%,
    var(--color-jdm-secondary, var(--color-secondary, #10b981)) 100%
  );
  padding: 2rem 1.5rem;
  color: var(--color-jdm-on-primary, var(--color-on-primary, #fff));
  box-shadow: var(--shadow-lg, var(--shadow-jdm, 0 8px 28px rgba(6, 78, 59, 0.08)));
}

@media (min-width: 768px) {
  .cta-band {
    flex-direction: row;
    align-items: center;
  }
}

.cta-band h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.cta-band p {
  margin-top: 0.5rem;
  color: color-mix(in oklab, var(--color-jdm-on-primary, #fff) 90%, transparent);
}

/* —— فوتر Tablo-style (رنگ‌های JDM) —— */
.jdm-ft {
  /* هم‌عرض محتوای سایت از تنظیمات کلی */
  max-width: var(--jdm-site-width, 1120px);
  margin: 3rem auto 2.5rem;
  padding-inline: 1.25rem;
  --jdm-ft-dark: var(--jdm-footer-bg, #064e3b);
  --jdm-ft-dark-2: var(--jdm-footer-bg-2, #033528);
}

.jdm-ft__shell {
  width: 100%;
  margin-inline: auto;
}

.jdm-ft__dark {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 16rem;
  /* فضای ثابت ریل سوشال سمت چپ باکس */
  padding: 2rem 1.5rem 1.75rem 4.25rem;
  border-radius: var(--radius-jdm-lg, 18px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 45% 70% at 8% 100%, color-mix(in oklab, var(--jdm-footer-accent, #10b981) 22%, transparent), transparent 60%),
    linear-gradient(180deg, var(--jdm-ft-dark) 0%, var(--jdm-ft-dark-2) 100%);
  color: var(--jdm-footer-fg, #fff);
  box-shadow: var(--shadow-jdm, 0 8px 28px rgba(6, 78, 59, 0.08));
}

.jdm-ft__dark-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  width: 100%;
}

.jdm-ft__dark-shell {
  width: 100%;
}

.jdm-ft__col {
  flex: 1 1 8rem;
  min-width: 7.5rem;
}

.jdm-ft__col--badges {
  flex: 0 1 12rem;
}

.jdm-ft__col-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.jdm-ft__col-ico {
  display: inline-flex;
  color: var(--jdm-footer-accent, var(--color-jdm-secondary, #10b981));
}

.jdm-ft__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.jdm-ft__links a {
  color: color-mix(in oklab, var(--jdm-footer-fg, #fff) 88%, transparent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.jdm-ft__links a:hover {
  color: var(--jdm-footer-fg, #fff);
}

.jdm-ft__social-rail {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 2.75rem;
  min-height: 10.5rem;
  padding: 1.15rem 0.55rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-jdm, 14px);
  background: rgba(3, 53, 40, 0.45);
}

.jdm-ft__social-rail a {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  color: rgba(236, 253, 245, 0.78);
  text-decoration: none;
  transition: color 0.15s ease, transform 0.15s ease;
}

.jdm-ft__social-rail a:hover {
  color: #fff;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .jdm-ft {
    margin-bottom: 1.75rem;
  }

  .jdm-ft__dark {
    border-radius: var(--radius-jdm, 14px);
    padding: 1.5rem 1rem 1.35rem 3.65rem;
  }

  .jdm-ft__col {
    flex: 1 1 calc(50% - 1rem);
  }

  .jdm-ft__social-rail {
    left: 0.55rem;
    width: 2.5rem;
    min-height: 9rem;
    padding: 0.85rem 0.4rem;
    gap: 0.65rem;
  }
}

.hide-sm {
  display: none;
}

@media (min-width: 640px) {
  .hide-sm {
    display: inline;
  }
}

@media (max-width: 767px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--color-jdm-border, #e2e8f0);
    background: rgba(236, 253, 245, 0.95);
    padding: 1rem 1.25rem;
  }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links.is-open .menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* —— مودال نتایج جستجو —— */
body.jdm-search-modal-open {
  overflow: hidden;
}

.jdm-search-modal[hidden] {
  display: none !important;
}

.jdm-search-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.jdm-search-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 78, 59, 0.55);
  backdrop-filter: blur(6px);
}

.jdm-search-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  max-height: min(92vh, 920px);
  margin: auto;
  border-radius: 20px;
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: var(--color-jdm-bg, #ecfdf5);
  box-shadow: 0 28px 80px rgba(6, 78, 59, 0.28);
  overflow: hidden;
}

.jdm-search-modal__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem 1rem;
  padding: 0.85rem 1.15rem;
  background: #fff;
  border-bottom: 1px solid var(--color-jdm-border, #e2e8f0);
}

.jdm-search-modal__titles {
  min-width: 0;
  grid-column: 1;
  justify-self: start;
}

.jdm-search-modal__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-jdm-fg, #064e3b);
}

.jdm-search-modal__meta {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--color-jdm-muted-text, #047857);
}

/* صفحه‌بندی وسط همان ردیف هدر */
.jdm-search-modal__pager {
  grid-column: 2;
  justify-self: center;
  min-width: 0;
}

.jdm-search-modal__pager[hidden] {
  display: none !important;
}

.jdm-search-modal__pager .jdm-pager {
  width: auto;
  flex-wrap: nowrap;
  gap: 0.25rem;
}

.jdm-search-modal__pager .jdm-pager__btn,
.jdm-search-modal__pager .jdm-pager__page {
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.45rem;
}

.jdm-search-modal__pager .jdm-pager__page:disabled.is-current {
  opacity: 1;
  cursor: default;
}

.jdm-search-modal__head-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  grid-column: 3;
  justify-self: end;
}

.jdm-search-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius, 12px);
  background: var(--color-jdm-soft, var(--color-soft, #ecfdf5));
  color: var(--color-jdm-fg, #064e3b);
  cursor: pointer;
}

.jdm-search-modal__close:hover {
  background: color-mix(in oklab, var(--color-jdm-soft, #ecfdf5) 65%, var(--color-jdm-secondary, #10b981));
}

.jdm-search-modal__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 1rem 1.15rem 1.25rem;
}

.jdm-search-modal__grid.listing-grid {
  margin: 0;
}

.jdm-search-modal__grid[aria-busy="true"] {
  opacity: 0.55;
  pointer-events: none;
}

@media (max-width: 720px) {
  .jdm-search-modal {
    padding: 0;
  }

  .jdm-search-modal__panel {
    width: 100%;
    max-height: 100%;
    border-radius: 0;
  }

  .jdm-search-modal__head {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "titles close"
      "pager pager";
  }

  .jdm-search-modal__titles {
    grid-area: titles;
  }

  .jdm-search-modal__pager {
    grid-area: pager;
    justify-self: center;
    width: 100%;
  }

  .jdm-search-modal__pager .jdm-pager {
    width: 100%;
    flex-wrap: wrap;
  }

  .jdm-search-modal__head-end {
    grid-area: close;
    justify-self: end;
  }
}

/* —— مودال زنگ خطر قبل از معامله —— */
body.jdm-safety-modal-open {
  overflow: hidden;
}

.jdm-safety-modal[hidden] {
  display: none !important;
}

.jdm-safety-modal {
  position: fixed;
  inset: 0;
  z-index: 100060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.jdm-safety-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 78, 59, 0.48);
  backdrop-filter: blur(2px);
}

.jdm-safety-modal__panel {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  max-height: min(88vh, 640px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  background: #fff;
  box-shadow: 0 28px 64px rgba(6, 78, 59, 0.22);
  overflow: hidden;
  animation: jdm-safety-in 0.22s ease-out;
}

@keyframes jdm-safety-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.jdm-safety-modal__head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 0.75rem;
  padding: 1rem 1.15rem 1rem 3rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(180deg, var(--color-jdm-soft, var(--color-soft, #ecfdf5)) 0%, var(--color-jdm-surface, #fff) 100%);
}

.jdm-safety-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-jdm-fg, #064e3b);
  text-align: center;
  line-height: 1.45;
}

.jdm-safety-modal__close {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--radius, 10px);
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.jdm-safety-modal__close:hover,
.jdm-safety-modal__close:focus-visible {
  background: #f3f4f6;
  color: #111827;
  outline: none;
}

.jdm-safety-modal__body {
  padding: 1.15rem 1.25rem 1.35rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.jdm-safety-modal__section + .jdm-safety-modal__section {
  margin-top: 1.35rem;
}

.jdm-safety-modal__h {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.4;
}

.jdm-safety-modal__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.jdm-safety-modal__list li {
  position: relative;
  padding-inline-start: 0.95rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #374151;
}

.jdm-safety-modal__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.7em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #9ca3af;
}

.jdm-safety-modal__cautions {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.jdm-safety-modal__cautions li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #1f2937;
}

.jdm-safety-modal__ban {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  margin-top: 1px;
  color: #ef4444;
}

.jdm-safety-modal__ban svg {
  display: block;
}

.jdm-safety-modal__disclaimer {
  margin: 1.4rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius, 12px);
  background: var(--color-jdm-soft, var(--color-soft, #ecfdf5));
  border: 1px solid var(--color-jdm-border, #e2e8f0);
  font-size: 0.84rem;
  line-height: 1.75;
  color: #064e3b;
}

@media (max-width: 520px) {
  .jdm-safety-modal {
    padding: 0;
    align-items: flex-end;
  }

  .jdm-safety-modal__panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation: jdm-safety-sheet 0.24s ease-out;
  }

  @keyframes jdm-safety-sheet {
    from {
      opacity: 0;
      transform: translateY(24px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
