@font-face {
  font-family: "LocalNazanin";
  src: local("B Nazanin"), local("BNazanin"), local("Nazanin"), url("fonts/BNazanin.woff2") format("woff2");
  font-display: swap;
}

:root {
  --font-main: "LocalNazanin", "B Nazanin", "Nazanin", "XB Niloofar", Tahoma, serif;
  --red-950: #641017;
  --red-900: #7f111a;
  --red-800: #991b1b;
  --red-700: #bd1f25;
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --red-50: #fff1f2;
  --bg: #f6f7f9;
  --surface: #fff;
  --surface-2: #fbfbfc;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --green: #047857;
  --green-bg: #ecfdf5;
  --shadow-sm: 0 6px 18px rgba(15, 23, 42, .06);
  --shadow: 0 22px 55px rgba(15, 23, 42, .12);
  --shadow-red: 0 18px 38px rgba(189, 31, 37, .20);
  --radius-xs: 12px;
  --radius-sm: 16px;
  --radius: 24px;
  --radius-lg: 34px;
  --container: 1180px;
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-main);
  font-size: 19px;
  line-height: 1.8;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(220, 38, 38, .09), transparent 32%),
    linear-gradient(180deg, #fff 0, var(--bg) 440px);
  overflow-x: hidden;
}

body.drawer-open {
  overflow: hidden;
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(var(--container), calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.skip-link:focus {
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  top: 12px;
  right: 12px;
  border-radius: var(--radius-xs);
  background: var(--red-700);
  color: #fff;
  padding: 10px 14px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(229,231,235,.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.header-inner {
  min-height: var(--header-h);
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.header-start {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red-700), var(--red-950));
  box-shadow: var(--shadow-red);
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}

.brand strong {
  display: block;
  font-size: 25px;
  line-height: 1.1;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #374151;
  font-size: 17px;
}

.desktop-nav a {
  min-height: 42px;
  border-radius: 999px;
  padding: 8px 13px;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--red-800);
  background: var(--red-50);
}

.header-search {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f1f2f4;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  padding: 0 15px;
  transition: .18s ease;
}

.header-search:focus-within,
.hero-search:focus-within {
  background: #fff;
  border-color: rgba(189,31,37,.34);
  box-shadow: 0 0 0 4px rgba(189,31,37,.08);
}

.header-search input,
.hero-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.outline-btn {
  min-height: 46px;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  white-space: nowrap;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.primary-btn {
  color: #fff;
  background: var(--red-700);
  box-shadow: 0 14px 28px rgba(189,31,37,.22);
}

.primary-btn:hover {
  background: var(--red-800);
  transform: translateY(-1px);
}

.secondary-btn {
  color: var(--red-800);
  background: var(--red-50);
  border: 1px solid rgba(189,31,37,.14);
}

.outline-btn {
  background: #fff;
  color: var(--red-800);
  border: 1px solid rgba(189,31,37,.28);
}

.ghost-btn {
  background: #fff;
  color: #374151;
  border: 1px solid var(--line);
}

.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  display: none;
  place-items: center;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  margin: 3px auto;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(17,24,39,.44);
  backdrop-filter: blur(3px);
}

.drawer {
  position: fixed;
  z-index: 90;
  inset: 0 0 0 auto;
  width: min(390px, calc(100vw - 20px));
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform .24s ease;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.drawer-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 30px;
}

.drawer-links {
  display: grid;
  gap: 8px;
  padding-top: 18px;
}

.drawer-links a {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.drawer-links a:hover {
  background: var(--red-50);
  color: var(--red-800);
}

.hero {
  padding: 54px 0 22px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 26px;
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  color: var(--red-800);
  background: var(--red-50);
  border: 1px solid rgba(189,31,37,.14);
  padding: 4px 12px;
  font-size: 16px;
  font-weight: 900;
}

.hero h1 {
  max-width: 820px;
  margin: 14px 0 0;
  color: #111827;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.12;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 820px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 23px;
}

.hero-search {
  margin-top: 28px;
  min-height: 70px;
  width: min(820px, 100%);
  border: 1px solid rgba(189,31,37,.18);
  border-radius: 999px;
  background: #fff;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow);
}

.hero-search input {
  font-size: 22px;
}

.hero-search button {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--red-700);
  padding: 0 30px;
  box-shadow: var(--shadow-red);
}

.hero-actions,
.popular-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 20px;
}

.popular-row {
  margin-top: 14px;
}

.popular-row button {
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  border-radius: 999px;
  padding: 8px 14px;
}

.popular-row button:hover {
  color: var(--red-800);
  background: var(--red-50);
  border-color: rgba(189,31,37,.22);
}

.hero-side {
  display: grid;
  gap: 14px;
}

.hero-card,
.stats-grid > div,
.path-card,
.category-card,
.product-card,
.job-card,
.resume-card,
.how-grid article,
.home-filter,
.safe-cards article {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.hero-card {
  padding: 22px;
  display: grid;
  gap: 10px;
}

.red-card {
  color: #fff;
  background: linear-gradient(135deg, var(--red-700), var(--red-950));
  border-color: transparent;
  box-shadow: var(--shadow-red);
}

.red-card span {
  font-size: 42px;
}

.red-card strong {
  font-size: 30px;
  line-height: 1.25;
}

.red-card small {
  color: rgba(255,255,255,.78);
}

.red-card a {
  width: fit-content;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.20);
  padding: 8px 14px;
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.stats-grid > div {
  padding: 16px;
}

.stats-grid strong {
  display: block;
  color: var(--red-800);
  font-size: 30px;
  line-height: 1.1;
}

.stats-grid span {
  color: var(--muted);
}

.publish-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 18px 0 26px;
}

.path-card {
  min-height: 140px;
  padding: 18px;
  display: grid;
  gap: 4px;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.path-card:hover,
.category-card:hover,
.product-card:hover,
.job-card:hover,
.resume-card:hover {
  transform: translateY(-3px);
  border-color: rgba(189,31,37,.24);
  box-shadow: var(--shadow);
}

.path-card span {
  font-size: 34px;
}

.path-card strong {
  color: #111827;
  font-size: 24px;
}

.path-card small {
  color: var(--muted);
}

.section {
  padding: 38px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 10px 0 0;
  color: #111827;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.text-link {
  color: var(--red-800);
  font-weight: 900;
}

.category-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 2px 0 12px;
}

.category-chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  border-radius: 999px;
  min-height: 44px;
  padding: 8px 14px;
}

.category-chip:hover,
.category-chip.is-active {
  color: var(--red-800);
  background: var(--red-50);
  border-color: rgba(189,31,37,.24);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.category-card {
  min-height: 142px;
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 4px;
}

.category-card span {
  font-size: 34px;
}

.category-card strong {
  color: #111827;
  font-size: 22px;
}

.category-card small {
  color: var(--muted);
}

.content-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.home-filter {
  position: sticky;
  top: calc(var(--header-h) + 18px);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.home-filter h2 {
  margin: 0 0 6px;
  color: #111827;
  font-size: 24px;
}

.home-filter button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  text-align: right;
  padding: 8px 14px;
}

.home-filter button:hover,
.home-filter button.is-active {
  color: var(--red-800);
  background: var(--red-50);
  border-color: rgba(189,31,37,.24);
}

.product-grid,
.job-grid,
.resume-grid {
  display: grid;
  gap: 14px;
}

.product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.product-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  min-height: 186px;
}

.product-thumb {
  position: relative;
  border-left: 1px solid var(--line);
  background: linear-gradient(135deg, var(--red-50), #eef2f7);
  display: grid;
  place-items: center;
  font-size: 58px;
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  color: var(--red-800);
  border: 1px solid rgba(189,31,37,.15);
  padding: 3px 9px;
  font-size: 14px;
}

.product-body {
  padding: 16px;
  display: grid;
  gap: 7px;
  align-content: space-between;
}

.product-body h3 {
  margin: 0;
  color: #111827;
  font-size: 23px;
  line-height: 1.4;
}

.meta {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 15px;
}

.price {
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.card-action {
  color: var(--red-800);
  font-weight: 900;
}

.jobs-section {
  margin-top: 28px;
  padding: 58px 0;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,.15), transparent 25%),
    linear-gradient(135deg, var(--red-950), var(--red-700));
}

.section-head.light h2 {
  color: #fff;
}

.light-badge {
  color: #fff;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.22);
}

.light-link {
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.55);
  font-weight: 900;
}

.tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tabs-row button {
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.10);
  color: #fff;
  border-radius: 999px;
  min-height: 42px;
  padding: 8px 15px;
}

.tabs-row button.is-active,
.tabs-row button:hover {
  background: #fff;
  color: var(--red-800);
}

.job-grid {
  grid-template-columns: repeat(3, 1fr);
}

.job-card {
  color: var(--text);
  padding: 18px;
  display: grid;
  gap: 9px;
}

.job-card h3,
.resume-card h3 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.35;
}

.job-tags,
.resume-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.job-tags span,
.resume-tags span {
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  padding: 3px 9px;
  font-size: 14px;
}

.job-salary {
  color: var(--red-800);
  font-weight: 900;
  font-size: 22px;
}

.resume-section {
  padding-top: 52px;
}

.resume-grid {
  grid-template-columns: repeat(3, 1fr);
}

.resume-card {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.resume-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red-700), var(--red-950));
  color: #fff;
  font-weight: 900;
  font-size: 24px;
}

.resume-card p,
.job-card p {
  margin: 0;
  color: #4b5563;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.how-grid article {
  padding: 18px;
}

.how-grid span {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--red-700);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.how-grid strong {
  display: block;
  margin-top: 12px;
  color: #111827;
  font-size: 22px;
}

.how-grid p {
  margin: 6px 0 0;
  color: var(--muted);
}

.safe-section {
  padding: 58px 0;
  color: #fff;
  background: #111827;
}

.safe-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 24px;
  align-items: center;
}

.safe-section h2 {
  margin: 14px 0 0;
  color: #fff;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.25;
}

.safe-section p {
  color: rgba(255,255,255,.78);
}

.safe-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.safe-cards article {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
  padding: 18px;
}

.safe-cards span {
  font-size: 32px;
}

.safe-cards strong,
.safe-cards small {
  display: block;
}

.safe-cards strong {
  margin-top: 10px;
  color: #fff;
  font-size: 22px;
}

.safe-cards small {
  margin-top: 4px;
  color: rgba(255,255,255,.70);
}

.site-footer {
  background: #0b1220;
  color: #e5e7eb;
  padding: 44px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 24px;
}

.site-footer h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
}

.site-footer p,
.site-footer small {
  color: #aeb6c2;
}

.site-footer a {
  display: block;
  margin: 5px 0;
}

.footer-brand .brand-mark {
  box-shadow: none;
}

.owner-line {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.12);
  text-align: center;
}

.owner-line strong {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  padding: 8px 16px;
}

.mobile-bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 65;
  min-height: 66px;
  display: none;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  border: 1px solid rgba(229,231,235,.92);
  border-radius: 24px;
  background: rgba(255,255,255,.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding: 6px;
}

.mobile-bottom-nav a {
  flex: 1;
  min-width: 0;
  border-radius: 18px;
  min-height: 52px;
  display: grid;
  place-items: center;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.2;
}

.mobile-bottom-nav span {
  display: block;
  font-size: 20px;
}

.mobile-bottom-nav .mobile-post {
  color: #fff;
  background: var(--red-700);
}

.location-modal {
  width: min(460px, calc(100% - 28px));
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: var(--shadow);
}

.location-modal::backdrop {
  background: rgba(17,24,39,.44);
  backdrop-filter: blur(3px);
}

.modal-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h2 {
  margin: 0;
}

.modal-head button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 30px;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.city-grid button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 16px;
  padding: 12px;
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: auto minmax(200px, 1fr) auto;
  }

  .desktop-nav {
    display: none;
  }

  .icon-btn {
    display: grid;
  }

  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .product-grid,
  .job-grid,
  .resume-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .safe-grid,
  .content-layout {
    grid-template-columns: 1fr;
  }

  .home-filter {
    position: static;
    display: flex;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .home-filter h2 {
    display: none;
  }

  .home-filter button {
    flex: 0 0 auto;
  }
}

@media (max-width: 920px) {
  body {
    padding-bottom: 88px;
  }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    min-height: 66px;
  }

  .brand small {
    display: none;
  }

  .brand strong {
    font-size: 22px;
  }

  .header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-bottom: 10px;
  }

  .header-actions .ghost-btn {
    display: none;
  }

  .hero {
    padding-top: 32px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .publish-paths {
    grid-template-columns: 1fr;
  }

  .how-grid,
  .safe-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .mobile-bottom-nav {
    display: flex;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 18px;
  }

  .container {
    width: min(100% - 22px, var(--container));
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: 38px;
  }

  .hero p {
    font-size: 19px;
  }

  .hero-search {
    grid-template-columns: auto 1fr;
    min-height: auto;
    border-radius: 24px;
    padding: 12px;
  }

  .hero-search input {
    font-size: 18px;
  }

  .hero-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions a {
    width: 100%;
  }

  .stats-grid,
  .category-grid,
  .product-grid,
  .job-grid,
  .resume-grid,
  .how-grid,
  .safe-cards,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 126px 1fr;
    min-height: 170px;
  }

  .product-thumb {
    font-size: 44px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .section-head h2 {
    font-size: 31px;
  }

  .jobs-section,
  .safe-section {
    padding: 42px 0;
  }

  .site-footer {
    padding-bottom: 104px;
  }
}

@media (max-width: 390px) {
  .product-card {
    grid-template-columns: 108px 1fr;
  }

  .header-actions .primary-btn {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .header-actions .primary-btn::after {
    content: "+";
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}


/* V5: hamburger menu for categories */
.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.category-menu-btn {
  min-height: 44px;
  border: 1px solid rgba(189,31,37,.18);
  background: var(--red-50);
  color: var(--red-800);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-weight: 900;
}

.category-menu-btn:hover {
  background: var(--red-100);
}

.hamburger-mini {
  display: inline-grid;
  gap: 3px;
}

.hamburger-mini i {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.drawer-title {
  display: block;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}

.drawer-subtitle {
  display: block;
  color: var(--muted);
  font-size: 14px;
  margin-top: 3px;
}

.drawer-search-box {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #f9fafb;
  padding: 0 14px;
  margin: 18px 0;
}

.drawer-search-box:focus-within {
  background: #fff;
  border-color: rgba(189,31,37,.34);
  box-shadow: 0 0 0 4px rgba(189,31,37,.08);
}

.drawer-search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.category-drawer-list {
  display: grid;
  gap: 9px;
}

.category-drawer-item {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: right;
  transition: .16s ease;
}

.category-drawer-item:hover {
  background: var(--red-50);
  border-color: rgba(189,31,37,.28);
  transform: translateY(-1px);
}

.category-drawer-item .drawer-cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--red-50);
  border: 1px solid rgba(189,31,37,.12);
  font-size: 24px;
}

.category-drawer-item strong {
  display: block;
  color: #111827;
  font-size: 18px;
  line-height: 1.25;
}

.category-drawer-item small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.category-drawer-item .drawer-arrow {
  color: var(--red-800);
  font-size: 22px;
}

.drawer-publish-box {
  margin-top: 18px;
  border: 1px solid rgba(189,31,37,.14);
  background: linear-gradient(135deg, #fff, var(--red-50));
  border-radius: 20px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.drawer-publish-box strong {
  color: #111827;
  font-size: 20px;
}

.drawer-publish-box a {
  border: 1px solid rgba(189,31,37,.12);
  background: #fff;
  color: var(--red-800);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
}

.mobile-bottom-nav button {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  border-radius: 18px;
  min-height: 52px;
  display: grid;
  place-items: center;
  color: #4b5563;
  font-size: 13px;
  line-height: 1.2;
}

.mobile-bottom-nav button span {
  display: block;
  font-size: 20px;
}

@media (max-width: 640px) {
  .section-actions {
    width: 100%;
  }

  .category-menu-btn,
  .section-actions .text-link {
    width: 100%;
    justify-content: center;
  }
}


/* V6: category menu moved into header only */
.nav-category-btn {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  background: transparent;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-category-btn:hover {
  color: var(--red-800);
  background: var(--red-50);
}

.header-category-btn {
  min-height: 46px;
  border: 1px solid rgba(189,31,37,.18);
  background: var(--red-50);
  color: var(--red-800);
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  font-weight: 900;
  white-space: nowrap;
}

.header-category-btn:hover {
  background: var(--red-100);
}

@media (max-width: 1180px) {
  .header-category-btn {
    display: inline-flex;
  }
}

@media (min-width: 1181px) {
  .header-category-btn {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .header-category-btn {
    min-width: 42px;
    width: 42px;
    padding: 0;
  }

  .header-category-btn span:last-child {
    display: none;
  }

  .header-category-btn .hamburger-mini i {
    width: 15px;
  }
}

/* Section category menu button is removed in V6; keep compatibility if old markup remains */
.category-menu-btn {
  display: none !important;
}


/* V7 clean homepage:
   The large in-page category section is removed.
   Category access remains only through the header hamburger category drawer. */
#categories,
.category-strip,
.category-grid {
  display: none !important;
}

.quick-publish {
  margin-top: 8px;
  margin-bottom: 10px;
  min-height: 58px;
  border: 1px solid rgba(229,231,235,.88);
  background: rgba(255,255,255,.76);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 12px;
  flex-wrap: wrap;
}

.quick-publish span {
  color: var(--muted);
  font-size: 15px;
}

.quick-publish a {
  min-height: 38px;
  border: 1px solid rgba(189,31,37,.16);
  background: var(--red-50);
  color: var(--red-800);
  border-radius: 999px;
  padding: 6px 13px;
  font-weight: 900;
  font-size: 15px;
}

.quick-publish a:first-of-type {
  color: #fff;
  background: var(--red-700);
  border-color: var(--red-700);
}

.hero {
  padding-bottom: 10px;
}

.content-layout.section {
  padding-top: 26px;
}

@media (max-width: 640px) {
  .quick-publish {
    border-radius: 22px;
    justify-content: flex-start;
    padding: 10px;
  }

  .quick-publish span {
    width: 100%;
    padding-inline: 4px;
  }

  .quick-publish a {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }

  .content-layout.section {
    padding-top: 18px;
  }
}


/* V8 content-focused homepage:
   Hero removed, published content is the main visual focus. */
.top-content-bar {
  margin-top: 24px;
  margin-bottom: 8px;
  border: 1px solid rgba(229,231,235,.9);
  background: rgba(255,255,255,.86);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-content-bar strong,
.top-content-bar span {
  display: block;
}

.top-content-bar strong {
  color: #111827;
  font-size: 25px;
  line-height: 1.3;
}

.top-content-bar span {
  color: var(--muted);
  font-size: 15px;
}

.top-content-bar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-content-bar a {
  min-height: 40px;
  border: 1px solid rgba(189,31,37,.16);
  background: var(--red-50);
  color: var(--red-800);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 900;
  font-size: 15px;
}

.top-content-bar a:first-child {
  color: #fff;
  background: var(--red-700);
  border-color: var(--red-700);
}

.content-layout.section {
  padding-top: 20px;
}

.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-card {
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 174px;
}

.product-thumb {
  font-size: 48px;
}

.product-body h3 {
  font-size: 21px;
}

.price {
  font-size: 20px;
}

.job-grid,
.resume-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.jobs-section {
  margin-top: 14px;
  padding: 46px 0;
}

.resume-section {
  padding-top: 40px;
}

.about-section {
  padding-top: 28px;
}

.about-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(20px, 4vw, 32px);
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 22px;
  align-items: center;
}

.about-card h2 {
  margin: 10px 0 0;
  color: #111827;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.25;
  letter-spacing: -.03em;
}

.about-card p {
  color: #4b5563;
  margin: 14px 0 0;
}

.about-points {
  display: grid;
  gap: 10px;
}

.about-points article {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 20px;
  padding: 14px;
}

.about-points strong,
.about-points small {
  display: block;
}

.about-points strong {
  color: #111827;
  font-size: 20px;
}

.about-points small {
  color: var(--muted);
  margin-top: 3px;
}

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

  .job-grid,
  .resume-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .top-content-bar {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 14px;
  }

  .top-content-bar nav {
    width: 100%;
  }

  .top-content-bar a {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .product-grid,
  .job-grid,
  .resume-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 118px 1fr;
  }

  .top-content-bar strong {
    font-size: 22px;
  }

  .about-card {
    border-radius: 24px;
  }
}


/* V9 fixes:
   - Content renders immediately after hero removal.
   - Header has one clean row on responsive.
   - Category hamburger is restored in header.
   - Header search is hidden on mobile to avoid the "two headers" look. */
.header-category-btn {
  min-height: 46px;
  border: 1px solid rgba(189,31,37,.18);
  background: var(--red-50);
  color: var(--red-800);
  border-radius: 999px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  font-weight: 900;
  white-space: nowrap;
}

.header-category-btn:hover {
  background: var(--red-100);
}

.desktop-nav .nav-category-btn {
  border: 1px solid rgba(189,31,37,.14);
  background: var(--red-50);
  color: var(--red-800);
  font-weight: 900;
}

@media (min-width: 1181px) {
  .header-actions .header-category-btn {
    display: none !important;
  }
}

@media (max-width: 920px) {
  .site-header {
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    min-height: 68px;
    gap: 8px;
  }

  .header-start {
    min-width: 0;
  }

  .header-search {
    display: none !important;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .primary-btn {
    min-width: 42px;
  }

  .header-actions .ghost-btn {
    display: none !important;
  }

  .icon-btn {
    display: grid;
    flex: 0 0 auto;
  }

  .brand {
    min-width: 0;
  }

  .brand strong {
    max-width: 126px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 18px, var(--container));
  }

  .header-inner {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    font-size: 22px;
  }

  .brand strong {
    font-size: 19px;
    max-width: 108px;
  }

  .header-category-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .header-category-btn span:last-child {
    display: none;
  }

  .header-actions .primary-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    font-size: 0;
  }

  .header-actions .primary-btn::after {
    content: "+";
    font-size: 26px;
    line-height: 1;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 360px) {
  .brand strong {
    max-width: 92px;
  }

  .header-inner {
    gap: 5px;
  }
}


/* V10 responsive cleanup:
   The simple main hamburger in mobile is removed; only category hamburger remains.
   Search is added back to the responsive top header.
   The dark trust/security section is removed. */
.safe-section {
  display: none !important;
}

@media (max-width: 920px) {
  .menu-toggle {
    display: none !important;
  }

  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand category post"
      "search search search";
    align-items: center;
    gap: 8px;
    padding-block: 8px;
  }

  .header-start {
    grid-area: brand;
  }

  .header-actions {
    display: contents;
  }

  .header-category-btn {
    grid-area: category;
    display: inline-flex !important;
  }

  .header-actions .primary-btn {
    grid-area: post;
  }

  .header-search {
    grid-area: search;
    display: flex !important;
    min-height: 44px;
    margin: 2px 0 0;
    border-radius: 999px;
    background: #f4f5f7;
    box-shadow: none;
  }

  .header-search input {
    font-size: 16px;
  }

  .brand strong {
    max-width: 160px;
  }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) 42px 42px;
  }

  .header-search {
    min-height: 42px;
    padding-inline: 12px;
  }

  .brand strong {
    max-width: 136px;
  }

  .header-category-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .header-category-btn span:last-child {
    display: none;
  }

  .header-actions .primary-btn {
    width: 42px;
    min-width: 42px;
    padding: 0;
    font-size: 0;
  }

  .header-actions .primary-btn::after {
    content: "+";
    font-size: 26px;
    line-height: 1;
  }
}

/* richer quick filter */
.home-filter {
  gap: 7px;
}

.home-filter button {
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .home-filter {
    padding: 10px;
    border-radius: 20px;
  }
}


/* V11: Dark mode + auth actions */
.theme-toggle,
.login-btn,
.signup-btn {
  min-height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  white-space: nowrap;
  font-weight: 900;
  transition: .16s ease;
}

.theme-toggle {
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-btn {
  border: 1px solid rgba(189,31,37,.20);
  background: #fff;
  color: var(--red-800);
}

.signup-btn {
  border: 1px solid var(--red-700);
  background: var(--red-700);
  color: #fff;
  box-shadow: 0 12px 24px rgba(189,31,37,.18);
}

.theme-toggle:hover,
.login-btn:hover,
.signup-btn:hover {
  transform: translateY(-1px);
}

/* general dark palette */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  --bg: #0b1220;
  --surface: #121a2a;
  --surface-2: #172033;
  --text: #f8fafc;
  --muted: #aab4c5;
  --line: rgba(148,163,184,.22);
  background:
    radial-gradient(circle at 12% 0%, rgba(220, 38, 38, .16), transparent 34%),
    linear-gradient(180deg, #0b1220 0, #101827 440px);
  color: var(--text);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .drawer,
html[data-theme="dark"] .location-modal,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .top-content-bar,
html[data-theme="dark"] .home-filter,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .job-card,
html[data-theme="dark"] .resume-card,
html[data-theme="dark"] .about-card,
html[data-theme="dark"] .path-card,
html[data-theme="dark"] .category-card,
html[data-theme="dark"] .stats-grid > div,
html[data-theme="dark"] .mobile-bottom-nav,
html[data-theme="dark"] .drawer-publish-box,
html[data-theme="dark"] .category-drawer-item,
html[data-theme="dark"] .drawer-search-box,
html[data-theme="dark"] .city-grid button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .login-btn {
  background: rgba(18, 26, 42, .94);
  border-color: var(--line);
  color: var(--text);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .mobile-bottom-nav {
  box-shadow: 0 14px 36px rgba(0,0,0,.34);
}

html[data-theme="dark"] .header-search,
html[data-theme="dark"] .hero-search,
html[data-theme="dark"] .drawer-search-box {
  background: rgba(15, 23, 42, .88);
  border-color: var(--line);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  color: var(--text);
}

html[data-theme="dark"] .brand strong,
html[data-theme="dark"] .desktop-nav a,
html[data-theme="dark"] .nav-category-btn,
html[data-theme="dark"] .drawer-title,
html[data-theme="dark"] .section-head h2,
html[data-theme="dark"] .product-body h3,
html[data-theme="dark"] .job-card h3,
html[data-theme="dark"] .resume-card h3,
html[data-theme="dark"] .about-card h2,
html[data-theme="dark"] .about-points strong,
html[data-theme="dark"] .top-content-bar strong,
html[data-theme="dark"] .price,
html[data-theme="dark"] .drawer-cat-icon,
html[data-theme="dark"] .mobile-bottom-nav a,
html[data-theme="dark"] .mobile-bottom-nav button {
  color: var(--text);
}

html[data-theme="dark"] .brand small,
html[data-theme="dark"] .top-content-bar span,
html[data-theme="dark"] .product-body .meta,
html[data-theme="dark"] .job-card p,
html[data-theme="dark"] .resume-card p,
html[data-theme="dark"] .about-card p,
html[data-theme="dark"] .about-points small,
html[data-theme="dark"] .category-drawer-item small,
html[data-theme="dark"] .drawer-subtitle {
  color: var(--muted);
}

html[data-theme="dark"] .product-thumb,
html[data-theme="dark"] .avatar,
html[data-theme="dark"] .drawer-cat-icon,
html[data-theme="dark"] .about-points article {
  background: linear-gradient(135deg, rgba(189,31,37,.22), rgba(30,41,59,.84));
  border-color: var(--line);
}

html[data-theme="dark"] .badge,
html[data-theme="dark"] .job-tags span,
html[data-theme="dark"] .resume-tags span,
html[data-theme="dark"] .category-chip,
html[data-theme="dark"] .home-filter button,
html[data-theme="dark"] .top-content-bar a {
  background: rgba(15,23,42,.86);
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .home-filter button.is-active,
html[data-theme="dark"] .home-filter button:hover,
html[data-theme="dark"] .category-chip:hover,
html[data-theme="dark"] .category-chip.is-active,
html[data-theme="dark"] .desktop-nav a:hover,
html[data-theme="dark"] .desktop-nav a.active,
html[data-theme="dark"] .desktop-nav .nav-category-btn,
html[data-theme="dark"] .header-category-btn,
html[data-theme="dark"] .eyebrow {
  background: rgba(189,31,37,.18);
  border-color: rgba(248,113,113,.30);
  color: #fecaca;
}

html[data-theme="dark"] .primary-btn,
html[data-theme="dark"] .signup-btn,
html[data-theme="dark"] .mobile-bottom-nav .mobile-post {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

html[data-theme="dark"] .secondary-btn,
html[data-theme="dark"] .outline-btn,
html[data-theme="dark"] .text-link,
html[data-theme="dark"] .card-action,
html[data-theme="dark"] .job-salary {
  color: #fecaca;
}

html[data-theme="dark"] .site-footer {
  background: #050914;
}

html[data-theme="dark"] .drawer-backdrop {
  background: rgba(0,0,0,.62);
}

html[data-theme="dark"] .theme-icon {
  content: "☀️";
}

/* responsive auth in header */
@media (max-width: 1180px) {
  .auth-actions {
    display: inline-flex;
  }
}

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) 42px 42px 42px;
    grid-template-areas:
      "brand theme category post"
      "search search search search";
  }

  .theme-toggle {
    grid-area: theme;
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .theme-toggle .theme-text {
    display: none;
  }

  .auth-actions {
    display: none;
  }

  .header-actions {
    display: contents;
  }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) 40px 40px 40px;
  }

  .theme-toggle,
  .header-category-btn,
  .header-actions .primary-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .theme-toggle .theme-icon {
    font-size: 18px;
  }
}


/* V12: unified login only */
.auth-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.login-btn {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(189,31,37,.22);
  background: #fff;
  color: var(--red-800);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 15px;
  white-space: nowrap;
  font-weight: 900;
}

.login-btn::before {
  content: "👤";
  font-size: 15px;
}

.signup-btn {
  display: none !important;
}

html[data-theme="dark"] .login-btn {
  background: rgba(18, 26, 42, .94);
  border-color: var(--line);
  color: #fecaca;
}

@media (max-width: 920px) {
  .auth-actions {
    display: inline-flex !important;
    grid-area: login;
  }

  .login-btn {
    width: auto;
    min-width: 58px;
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 15px;
  }

  .login-btn::before {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-btn {
    min-width: 54px;
    padding: 0 10px;
    font-size: 14px;
  }
}



@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto 42px 42px 42px;
    grid-template-areas:
      "brand login theme category post"
      "search search search search search";
  }

  .auth-actions {
    grid-area: login;
  }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto 40px 40px 40px;
  }

  .brand strong {
    max-width: 94px;
  }
}


/* V13 clickable product ads */
.product-card.clickable-ad {
  color: inherit;
  cursor: pointer;
}

.product-card.clickable-ad .card-action {
  display: inline-flex;
  color: var(--red-800);
  font-weight: 900;
}

.product-card.clickable-ad:focus-visible {
  outline: 3px solid rgba(189,31,37,.34);
  outline-offset: 3px;
}


/* V14: header keeps only the primary "آگهی جدید" action, no publish nav link */
.desktop-nav a[href="create.html"] {
  display: none !important;
}

.header-actions .primary-btn {
  display: inline-flex;
}


/* V16 homepage cleanup */
.top-content-bar,
.how-section,
.about-section,
button[data-open-location],
.ghost-btn[data-open-location] {
  display: none !important;
}

.content-layout.section {
  padding-top: 28px;
}

@media (max-width: 920px) {
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto 42px 42px 42px;
    grid-template-areas:
      "brand login theme category post"
      "search search search search search";
  }
}


/* V17: every published card is clickable */
.product-card.clickable-ad,
.job-card.clickable-ad,
.resume-card.clickable-ad {
  color: inherit;
  cursor: pointer;
}

.job-card.clickable-ad,
.resume-card.clickable-ad {
  text-decoration: none;
}

.product-card.clickable-ad:focus-visible,
.job-card.clickable-ad:focus-visible,
.resume-card.clickable-ad:focus-visible {
  outline: 3px solid rgba(189,31,37,.34);
  outline-offset: 3px;
}

.product-card.clickable-ad .card-action,
.job-card.clickable-ad .card-action,
.resume-card.clickable-ad .card-action {
  display: inline-flex;
  color: var(--red-800);
  font-weight: 900;
}

html[data-theme="dark"] .product-card.clickable-ad .card-action,
html[data-theme="dark"] .job-card.clickable-ad .card-action,
html[data-theme="dark"] .resume-card.clickable-ad .card-action {
  color: #fecaca;
}


/* V18: category hamburger now filters visible ads instead of opening create flow */
.category-drawer-item[data-category-filter]::after,
.category-drawer-item[data-category-section]::after {
  content: "نمایش";
  border: 1px solid rgba(189,31,37,.14);
  background: var(--red-50);
  color: var(--red-800);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.category-drawer-item[data-category-filter] .drawer-arrow,
.category-drawer-item[data-category-section] .drawer-arrow {
  display: none;
}

html[data-theme="dark"] .category-drawer-item[data-category-filter]::after,
html[data-theme="dark"] .category-drawer-item[data-category-section]::after {
  background: rgba(189,31,37,.18);
  border-color: rgba(248,113,113,.22);
  color: #fecaca;
}


/* V20: main page category/menu links open separate category.html pages */
.home-filter .filter-link,
.category-chip.category-direct-link {
  border: 1px solid var(--line);
  background: #fff;
  color: #374151;
  border-radius: 999px;
  min-height: 42px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.home-filter .filter-link:hover,
.category-chip.category-direct-link:hover {
  color: var(--red-800);
  background: var(--red-50);
  border-color: rgba(189,31,37,.24);
}

html[data-theme="dark"] .home-filter .filter-link,
html[data-theme="dark"] .category-chip.category-direct-link {
  background: rgba(15,23,42,.86);
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] .home-filter .filter-link:hover,
html[data-theme="dark"] .category-chip.category-direct-link:hover {
  background: rgba(189,31,37,.18);
  border-color: rgba(248,113,113,.30);
  color: #fecaca;
}


/* V38 public account state + responsive drawer scrolling */
.category-drawer,
#mobileDrawer {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
@media (max-width: 980px) {
  .drawer,
  .category-drawer {
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    padding-bottom: calc(26px + env(safe-area-inset-bottom));
  }
  .category-drawer-list { min-height: max-content; }
}

/* V49 — clean responsive header and mobile navigation
   Mobile top row: logo + theme + categories only.
   Publish and account actions move to the bottom navigation. */
@media (max-width: 920px) {
  .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) 42px 42px !important;
    grid-template-areas:
      "brand theme category"
      "search search search" !important;
  }

  .site-header .header-start {
    grid-area: brand;
  }

  .site-header .header-actions {
    display: contents !important;
  }

  .site-header .theme-toggle {
    grid-area: theme;
    display: inline-flex !important;
  }

  .site-header .header-category-btn {
    grid-area: category;
    display: inline-flex !important;
  }

  .site-header .auth-actions,
  .site-header .header-actions > .primary-btn,
  .site-header .menu-toggle {
    display: none !important;
  }

  .site-header .header-search {
    grid-area: search;
  }

  .mobile-bottom-nav a.is-active:not(.mobile-post) {
    color: var(--red-800);
    background: var(--red-50);
  }

  .mobile-bottom-nav .mobile-nav-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-size: 21px;
    line-height: 1;
  }

  .mobile-bottom-nav .mobile-account-icon {
    font-size: 20px;
  }

  .mobile-bottom-nav .mobile-post .mobile-nav-icon {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
  }
}

@media (max-width: 640px) {
  .site-header .header-inner {
    grid-template-columns: minmax(0, 1fr) 40px 40px !important;
  }

  .site-header .theme-toggle,
  .site-header .header-category-btn {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  .mobile-bottom-nav {
    right: 7px;
    left: 7px;
    gap: 2px;
    padding: 5px;
  }

  .mobile-bottom-nav a {
    min-height: 54px;
    padding-inline: 2px;
    font-size: 12px;
  }
}
.product-thumb img{width:100%;height:100%;object-fit:cover;display:block;border-radius:inherit}
