/* =========================
   ROOT VARIABLES
========================= */
:root {
  --primary: #3396D3;
  --secondary: #00b894;
  --dark: #1e1e1e;
  --gray: #6b7280;
  --light: #f9fafb;
  --border: #e5e7eb;
  --radius: 12px;
}

/* =========================
   HEADER
========================= */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 9999;
}

.auth-dropdown,
.user-menu,
.account-menu {
  position: absolute;
  z-index: 1001;
  background: #fff;
  display: none;
}

.auth-dropdown.open,
.user-menu.open,
.account-menu.open {
  display: block;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-size: 14px;
  color: var(--gray);
  transition: color 0.2s;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: var(--primary);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

.header-left>* {
  flex-shrink: 0;
}

/* =========================
   AUTH BUTTON (وقتی کاربر وارد نشده)
========================= */
.auth-btn {
  background: var(--primary);
  color: #fff;
  padding: 8px 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.auth-btn:hover {
  background: #0066cc;
}

/* =========================
   POST AD BUTTON - بدون کادر
========================= */
.post-ad-btn {
  background: transparent;
  color: var(--primary);
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.post-ad-btn:hover {
  background: var(--light);
  color: #0066cc;
}

.post-ad-btn i {
  font-size: 16px;
}

/* =========================
   USER DROPDOWN MENU - یکپارچه شده
========================= */
.user-dropdown {
  position: relative;
  display: inline-block;
}

/* استایل دکمه منوی کشویی - ترکیب کلاس‌ها */
.user-dropdown .auth-btn {
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.user-dropdown .auth-btn:hover {
  background: #0066cc;
}

.user-dropdown .auth-btn i {
  font-size: 16px;
  transition: transform 0.2s;
}

/* چرخش آیکون هنگام باز بودن منو */
.user-dropdown.active .auth-btn i.bi-chevron-down {
  transform: rotate(180deg);
}

.user-dropdown-content {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: auto;
  z-index: 999999;

  min-width: 240px;

  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);

  overflow: hidden;

  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

/* حالت باز فقط زمانی مجاز است که hidden برداشته شده باشد. */
.user-dropdown-content.is-open:not([hidden]) {
  display: block !important;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* hidden همیشه بر هر CSS دیگری غلبه کند. */
.user-dropdown-content[hidden] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* هدر منو */
.user-dropdown-info {
  padding: 15px;
  border-bottom: 1px solid var(--border);
  background: var(--light);
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: center;
}

.user-dropdown-phone {
  color: var(--primary);
  font-weight: 600;
  direction: ltr;
  font-size: 14px;
}

.user-dropdown-status {
  font-size: 12px;
  color: var(--gray);
  margin-top: 5px;
}

/* آیتم‌های منو */
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--dark);
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: right;
  font-size: 14px;
}

.user-dropdown-item:hover {
  background: #f0f7ff;
}

.user-dropdown-item i {
  color: var(--primary);
  font-size: 16px;
  width: 20px;
}

/* دکمه خروج */
.user-dropdown-item.logout {
  color: #ef4444;
  border-top: 1px solid var(--border);
}

.user-dropdown-item.logout i {
  color: #ef4444;
}

.user-dropdown-item.logout:hover {
  background: #fee2e2;
}

/* منوی قدیمی رو مخفی کن */
.user-dropdown-menu {
  display: none !important;
}

.user-dropdown-header {
  display: none !important;
}

/* =========================
   HERO - اصلاح شده با محوشدگی ۱۵٪ و فاصله مناسب
========================= */
.hero {
  position: relative;
  width: 100%;
  min-height: 750px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(to bottom,
      rgba(249, 250, 251, 0) 0%,
      rgba(249, 250, 251, 0) 85%,
      rgba(249, 250, 251, 0.15) 92%,
      rgba(249, 250, 251, 1) 100%), url('../../images/hero-image.png') no-repeat center center;
  background-size: cover;
  padding-bottom: 30px;
  margin-bottom: 60px;
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  text-align: center;
  z-index: 2;
  padding-bottom: 40px;
}

/* باکس جستجو */
.hero .search-box {
  position: absolute;
  top: -47px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  display: flex;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  border: 2px solid var(--primary);
  overflow: hidden;
}

.hero .search-box input {
  flex: 1;
  padding: 16px 20px;
  border: none;
  font-size: 15px;
  background: transparent;
  outline: none;
}

.hero .search-box button {
  background: var(--primary);
  color: #fff;
  padding: 0 30px;
  font-size: 15px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.hero .search-box button:hover {
  background: #0066cc;
}

.hero h1 {
  font-size: 38px;
  color: #0f172a;
  margin-bottom: 8px;
  font-weight: 900;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 5px 20px rgba(255, 255, 255, 1);
}

.hero h2 {
  font-size: 22px;
  color: #1e293b;
  margin-bottom: 10px;
  font-weight: 700;
  text-shadow:
    -1px -1px 0 #fff,
    1px -1px 0 #fff,
    -1px 1px 0 #fff,
    1px 1px 0 #fff,
    0 3px 15px rgba(255, 255, 255, 1);
}

/* =========================
   HOW IT WORKS
========================= */
.how-it-works {
  padding: 40px 0;
}

.how-it-works h3 {
  font-size: 24px;
  margin-bottom: 24px;
}

.toggle-buttons {
  display: inline-flex;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.toggle-btn {
  padding: 10px 24px;
  background: #fff;
  border: none;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.toggle-btn.active {
  background: var(--primary);
  color: #fff;
}

.boxes-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 16px;
}

.how-box {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 0 0 16px 0;
  transition: box-shadow 0.2s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.how-box:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.how-box .image-placeholder {
  height: 220px;
  width: 100%;
  overflow: hidden;
  margin-bottom: 16px;
}

.how-box .image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.how-box h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: center;
  padding: 0 16px;
}

.how-box p {
  font-size: 13px;
  color: var(--gray);
  margin: 0;
  text-align: center;
  line-height: 1.5;
  padding: 0 16px;
}

/* =========================
   GENERAL UTILITIES
========================= */
.text-center {
  text-align: center;
}

.muted {
  color: var(--gray);
}

.mt-40 {
  margin-top: 40px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-20 {
  margin-bottom: 20px;
}

.link-primary {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}

.link-primary:hover {
  text-decoration: underline;
}

/* =========================
   NEIGHBORHOODS
========================= */
.neighborhoods {
  padding: 20px 0;
}

.neighborhoods h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

/* =========================
   CATEGORIES
========================= */
.categories {
  padding: 30px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.categories-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  direction: ltr;
  scroll-behavior: smooth;
  padding-bottom: 10px;
}

.categories-slider::-webkit-scrollbar {
  display: none;
}

.category-card {
  direction: rtl;
  min-width: 160px;
  background: #fff;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  color: var(--dark);
}

.cat-icon-wrapper {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-icon-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.slider-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-btn:hover {
  background: var(--light);
}

/* =========================
   ADS GRID
========================= */
.latest-ads {
  padding: 30px 0;
}

.latest-ads h3 {
  font-size: 1rem;
  margin-bottom: 20px;
}

.ads-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.ad-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: var(--dark);
}

.ad-card:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.ad-image {
  height: 180px;
  background: #e5e7eb;
  overflow: hidden;
}

.ad-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ad-body {
  padding: 15px;
}

.ad-body h4 {
  font-size: 15px;
  margin-bottom: 8px;
  font-weight: 600;
}

.price {
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  display: block;
  margin-bottom: 5px;
}

/* =========================
   BUTTONS
========================= */
.btn-outline {
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-weight: 500;
  display: inline-block;
  transition: all 0.3s;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #0066cc;
}

/* =========================
   WHY US SECTION
========================= */
.why-us {
  padding: 40px 0;
  background: var(--light);
}

.why-us h3 {
  font-size: 24px;
  margin-bottom: 32px;
}

.why-boxes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.why-box {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.why-box:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.why-box .image-placeholder {
  height: 80px;
  width: 80px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--light);
}

.why-box .image-placeholder img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.why-box h4 {
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 600;
}

.why-box p {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.6;
}

/* =========================
   TESTIMONIALS
========================= */
.testimonials {
  padding: 40px 0;
}

.testimonials h3 {
  font-size: 24px;
  margin-bottom: 32px;
}

.testimonial-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.testimonial-box {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.testimonial-box:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.testimonial-text {
  font-size: 14px;
  color: var(--gray);
  margin-bottom: 15px;
  line-height: 1.6;
  font-style: italic;
}

.testimonial-owner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.testimonial-owner .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
}

.testimonial-owner .avatar.default {
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 20px;
}

.testimonial-owner .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-owner .name {
  font-weight: 600;
  display: block;
  font-size: 14px;
}

.testimonial-owner .location {
  font-size: 12px;
  color: var(--gray);
}

/* =========================
   SOCIAL IMPACT
========================= */
.social-impact {
  padding: 40px 0;
  background: var(--light);
}

.social-impact h3 {
  font-size: 24px;
  margin-bottom: 32px;
}

.social-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.social-box {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 15px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.social-box:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.social-box .logo-placeholder {
  height: 50px;
  width: 50px;
  margin: 0 auto 10px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-box .logo-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.social-box p {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}

/* =========================
   ALL PRODUCTS
========================= */
.all-products {
  padding: 40px 0;
}

.all-products h3 {
  font-size: 24px;
  margin-bottom: 32px;
}

.product-categories {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.product-category {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 15px;
  text-align: center;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: var(--dark);
}

.product-category:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.category-img-placeholder {
  height: 50px;
  width: 50px;
  margin: 0 auto 10px;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-category p {
  font-size: 13px;
  margin: 0;
  font-weight: 500;
}

/* =========================
   POPULAR PRODUCTS
========================= */
.popular-products {
  padding: 40px 0;
  background: var(--light);
}

.popular-products h3 {
  font-size: 24px;
  margin-bottom: 32px;
}

.popular-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.popular-box {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  text-align: right;
  transition: box-shadow 0.2s;
}

.popular-box:hover {
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.popular-box h4 {
  font-size: 16px;
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: 600;
  text-align: center;
}

.popular-box p {
  font-size: 13px;
  margin: 8px 0;
  color: var(--gray);
  text-align: center;
}

/* =========================
   FAQ
========================= */
.faq {
  padding: 40px 0;
}

.faq h3 {
  font-size: 24px;
  margin-bottom: 24px;
}

.accordion {
  max-width: 800px;
  margin: 0 auto;
  text-align: right;
}

.accordion-item {
  margin-bottom: 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

.accordion-question {
  background: #f9fafb;
  border: none;
  padding: 16px 20px;
  width: 100%;
  text-align: right;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-question:hover {
  background: #e5e7eb;
}

.accordion-question i {
  transition: transform 0.2s;
}

.accordion-item.active .accordion-question i {
  transform: rotate(180deg);
}

.accordion-answer {
  display: none;
  padding: 16px 20px;
  background: #fff;
  font-size: 14px;
  color: var(--gray);
  border-top: 1px solid var(--border);
}

/* =========================
   APP DOWNLOAD
========================= */
.app-download {
  background-color: #0050a0;
  padding: 30px 0;
  color: white;
  margin: 40px 0;
}

.app-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.app-text h3 {
  font-size: 22px;
  margin-bottom: 5px;
  color: white;
}

.app-text p {
  font-size: 14px;
  opacity: 0.9;
}

.app-buttons {
  display: flex;
  gap: 10px;
}

.app-buttons a {
  display: inline-block;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 14px;
}

.app-buttons a:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* =========================
   TRUST BADGES
========================= */
.trust-badges {
  padding: 30px 0;
}

.trust-badges .container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.trust-badges img {
  height: 80px;
  width: auto;
  cursor: pointer;
  transition: transform 0.2s;
}

.trust-badges img:hover {
  transform: scale(1.05);
}

/* =========================
   SPONSORS
========================= */
.sponsors {
  background: #ffffff;
  padding: 30px 0;
  border-top: 1px solid var(--border);
}

.sponsor-slider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

.sponsor-item {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  padding: 10px;
  transition: transform 0.2s;
}

.sponsor-item:hover {
  transform: scale(1.05);
}

.sponsor-item img {
  height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* =========================
   FOOTER
========================= */
.footer {
  background: #0050a0;
  color: #fff;
  padding: 40px 0;
  font-size: 13px;
  margin-top: 40px;
}

.footer a {
  color: #fff;
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s;
}

.footer a:hover {
  color: #f1f1f1;
  text-decoration: underline;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-links,
.footer-legal,
.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}

.footer-social i {
  font-size: 20px;
  color: #fff;
}

.footer-social span {
  margin-left: 10px;
}

/* =========================
   CITY MODAL
========================= */
.city-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(3px);
}

.city-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.city-modal {
  background: #fff;
  width: 90%;
  max-width: 450px;
  border-radius: var(--radius);
  padding: 24px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  transform: translateY(-20px);
  transition: transform 0.3s;
}

.city-modal-overlay.active .city-modal {
  transform: translateY(0);
}

.close-city-modal {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 24px;
  color: var(--gray);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.city-item-btn {
  background: #f9fafb;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.city-item-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* =========================
   RENT MODAL
========================= */
.rent-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  backdrop-filter: blur(4px);
}

.rent-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.rent-modal .modal-content {
  background: #ffffff;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transform: translateY(-50px);
  transition: transform 0.3s ease-in-out;
}

.rent-modal.is-open .modal-content {
  transform: translateY(0);
}

.rent-modal .modal-header {
  padding: 18px 24px;
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rent-modal .close-btn {
  background: #f5f5f5;
  border: none;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s;
}

.rent-modal .close-btn:hover {
  background: #e0e0e0;
}

.rent-modal .modal-body {
  padding: 24px;
  overflow-y: auto;
}

.rent-modal .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.rent-modal label {
  font-weight: 600;
  color: var(--dark);
  font-size: 14px;
}

.rent-modal input[type="text"],
.rent-modal input[type="number"],
.rent-modal select,
.rent-modal textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}

.rent-modal input:focus,
.rent-modal select:focus,
.rent-modal textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(51, 150, 211, 0.1);
}

.rent-modal textarea {
  resize: vertical;
  min-height: 80px;
}

.rent-modal .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
}

/* لیست شهرهای کردستان */
.kurdistan-cities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 5px;
}

.kurdistan-city-item {
  background: var(--light);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  transition: all 0.2s;
}

.kurdistan-city-item:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* =========================
   MOBILE MENU
========================= */
.menu-toggle {
  display: none;
  background: transparent;
  color: var(--dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 28px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
  z-index: 998;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 999;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: 0.3s ease;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay.show {
  opacity: 1;
  visibility: visible;
}

.close-mobile-menu {
  align-self: flex-end;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 28px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav li {
  margin-bottom: 5px;
}

.mobile-nav li a {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: rgba(0, 4, 206, 0.685);
  border-bottom: 1px solid var(--border);
  text-align: center;
  text-decoration: none;
  transition: color 0.2s;
}

.mobile-nav li a:hover {
  color: var(--primary);
}

.mobile-nav li button {
  display: block;
  padding: 12px 0;
  font-weight: 500;
  color: #ef4444;
  border-bottom: 1px solid var(--border);
  text-align: right;
  background: none;
  border: none;
  width: 100%;
  cursor: pointer;
  font-size: 14px;
}

.mobile-nav hr {
  margin: 15px 0;
  border-color: var(--border);
}

/* =========================
   BACK TO TOP BUTTON
========================= */
#backToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: var(--primary);
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#backToTopBtn:hover {
  background-color: #0050a0;
}

/* =========================
   SPINNER LOADING
========================= */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

.spinner-border.text-primary {
  color: var(--primary) !important;
}

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

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   SEARCH SUGGESTIONS
========================= */
.search-suggest {
  border-radius: 16px !important;
  margin-top: 10px !important;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid var(--border);
  overflow: hidden;
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
}

.search-suggest__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ss-item {
  border-bottom: 1px solid var(--border);
}

.ss-item:last-child {
  border-bottom: none;
}

.ss-link {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--dark);
  transition: background 0.2s;
  gap: 10px;
}

.ss-link:hover {
  background: var(--light);
}

.ss-link i {
  color: var(--primary);
  font-size: 18px;
}

.ss-title {
  font-weight: 500;
  font-size: 14px;
}

.ss-item--empty .ss-link {
  justify-content: center;
  color: var(--gray);
  padding: 20px;
  cursor: default;
}

.ss-item--empty .ss-link:hover {
  background: none;
}

/* =========================
   SEARCH ERROR MESSAGE
========================= */
#searchErrorMsg {
  border-radius: 16px !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
  padding: 12px 20px !important;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 100;
  font-weight: 500;
  text-align: center;
  background: #fee2e2;
  color: #b91c1c;
  border: 2px solid #ef4444;
}

/* =========================
   RATING STARS
========================= */
.rating {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
  direction: ltr;
}

.rating i {
  font-size: 14px;
  color: #ffc107;
}

.rating span {
  font-size: 12px;
  color: var(--gray);
  margin-left: 5px;
}

/* =========================
   POST BANK SUPPORT BAR
========================= */

.postbank-support-bar {
  position: relative;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  z-index: 100;
}

.postbank-support-inner {
  max-width: 1200px;
  min-height: 76px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.postbank-support-text {
  color: #374151;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.8;
}

.postbank-support-logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: 125px;
  object-fit: contain;
}

.hero .postbank-support-inner--hero {
  position: absolute;
  top: -52px;
  /* هم‌تراز top سرچ‌باکس */
  left: 50%;
  transform: translate(-50%, -100%);
  /* می‌ره بالای سرچ‌باکس */
  margin-top: -8px;
  /* ۸px فاصله از سرچ‌باکس */
  z-index: 3;
  width: max-content;
  max-width: calc(100vw - 24px);
  min-height: 0;
  padding: 6px 16px;
  gap: 12px;
  border-radius: 14px;
}

.hero .postbank-support-inner--hero .postbank-support-logo {
  height: 40px;
}

.hero .postbank-support-inner--hero .postbank-support-text {
  font-size: 14px;
}

/* =========================
   RESPONSIVE STYLES (ادغام شده)
========================= */
@media (max-width: 1280px) {
  .social-boxes {
    grid-template-columns: repeat(3, 1fr);
  }

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

@media (max-width: 1200px) {
  .container {
    max-width: 960px;
  }

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

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

@media (max-width: 1024px) {
  .container {
    max-width: 720px;
  }

  .nav ul {
    gap: 16px;
  }

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

  .why-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .boxes-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .container {
    max-width: 720px;
  }

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

  .why-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .boxes-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    max-width: 540px;
  }

  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex !important;
  }

  .header-left {
    gap: 10px;
  }

  .post-ad-btn span,
  .auth-btn span {
    display: none;
  }

  .post-ad-btn i,
  .auth-btn i {
    margin: 0;
  }

  .post-ad-btn {
    padding: 8px 12px;
  }

  .auth-btn {
    padding: 8px 12px;
  }

  .hero {
    min-height: 450px;
    background-image: url('../../images/hero-mobile.png');
    background-size: cover;
    background-position: center;
  }

  .hero-content {
    height: 500px;
    padding-bottom: 30px;
  }

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

  .hero h2 {
    font-size: 18px;
  }

  .hero .search-box {
    top: -60px;
  }

  .search-box {
    flex-direction: column !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .search-box input {
    border-radius: 14px 14px 0 0 !important;
    width: 100% !important;
    text-align: right !important;
    padding: 18px 20px !important;
  }

  .search-box button {
    border-radius: 0 0 14px 14px !important;
    width: 100% !important;
    padding: 15px 0 !important;
  }

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

  .why-boxes {
    grid-template-columns: 1fr;
  }

  .testimonial-boxes {
    grid-template-columns: 1fr;
  }

  .social-boxes {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .popular-boxes {
    grid-template-columns: 1fr;
  }

  .boxes-container {
    grid-template-columns: 1fr;
  }

  .app-container {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .app-buttons {
    width: 100%;
    flex-direction: column;
    align-items: center;
  }

  .breadcrumb {
    margin-right: 30px;
  }

  .app-buttons a {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  .trust-badges img {
    height: 60px;
  }

  .sponsor-item img {
    height: 40px;
  }

  .sponsor-slider {
    gap: 20px;
  }

  .footer-container {
    text-align: center;
    align-items: center;
  }

  .search-suggest {
    width: 100% !important;
    max-height: 300px !important;
    top: calc(100% + 5px) !important;
  }

  .ss-link {
    padding: 12px !important;
  }

  .ss-link div div {
    gap: 10px !important;
    flex-wrap: wrap !important;
  }


  .accordion-question,
  .accordion-answer {
    font-size: 13px;
    padding: 12px;
  }

  .user-dropdown-content {
    top: calc(100% + 4px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 200px !important;
    max-width: calc(100vw - 20px) !important;
  }

  /* پست بانک داخل hero - دقیقاً بالای سرچ‌باکس */
  .hero .postbank-support-inner--hero {
    position: absolute;
    top: -70px;
    /* هم‌تراز top سرچ‌باکس */
    left: 50%;
    transform: translate(-50%, -100%);
    /* می‌ره بالای سرچ‌باکس */
    margin-top: -8px;
    /* ۸px فاصله از سرچ‌باکس */
    z-index: 3;
    width: max-content;
    max-width: calc(100vw - 24px);
    min-height: 0;
    padding: 6px 16px;
    gap: 12px;
    border-radius: 14px;
  }

  .hero .postbank-support-inner--hero .postbank-support-logo {
    height: 40px;
  }

  .hero .postbank-support-inner--hero .postbank-support-text {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .ads-grid {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .boxes-container {
    grid-template-columns: 1fr;
  }

  .toggle-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .toggle-btn {
    width: 100%;
    text-align: center;
  }

  .why-boxes {
    grid-template-columns: 1fr;
  }

  .testimonial-boxes {
    grid-template-columns: 1fr;
  }

  .popular-boxes {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .container {
    max-width: 100%;
  }

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

  .hero h2 {
    font-size: 16px;
  }

  .hero .search-box {
    top: -50px !important;
  }

  .hero .search-box input {
    padding: 15px 18px !important;
    font-size: 14px !important;
  }

  .hero .search-box button {
    padding: 12px 0 !important;
    font-size: 14px !important;
  }

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

  .social-boxes {
    grid-template-columns: 1fr;
  }

  .product-categories {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    gap: 15px;
  }

  .toggle-buttons {
    flex-direction: column;
    width: 100%;
  }

  .toggle-btn {
    width: 100%;
    text-align: center;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
    text-align: center;
  }

  #searchErrorMsg {
    font-size: 13px !important;
    padding: 10px 15px !important;
  }

  .hero .postbank-support-inner--hero {
    top: -50px;
  }
}

@media (max-width: 480px) {
  .social-boxes {
    grid-template-columns: 1fr;
  }

  .product-categories {
    grid-template-columns: 1fr;
  }

  .hero .search-box {
    top: -60px;
    z-index: 50;
  }

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

  .hero h2 {
    font-size: 15px;
  }

  .postbank-support-inner {
    min-height: 64px;
    padding: 10px 12px;
    gap: 12px;
  }

  .postbank-support-text {
    font-size: 12px;
  }

  .postbank-support-logo {
    height: 38px;
    max-width: 105px;
  }

  .hero .postbank-support-inner--hero {
    top: -60px;
    padding: 6px 12px;
  }
}