/* ===== BAXMALI.AZ - MAIN STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --purple: #6B21A8;
  --purple-dark: #581C87;
  --purple-light: #7C3AED;
  --purple-bg: #F5F0FF;
  --purple-nav: #5B21B6;
  --orange: #F97316;
  --green: #16A34A;
  --red: #DC2626;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--gray-800); background: var(--gray-50); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }

/* ===== TOP BAR ===== */
.topbar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 6px 0;
  font-size: 13px;
  color: var(--gray-600);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar-left { display: flex; gap: 20px; align-items: center; }
.topbar-right { display: flex; gap: 20px; align-items: center; }
.topbar a:hover { color: var(--purple); }

/* ===== HEADER ===== */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header .container { display: flex; align-items: center; gap: 20px; }
.logo { display: flex; flex-direction: row; align-items: center; gap: 10px; flex-shrink: 0; min-width: 180px; text-decoration: none; }
.logo-img { width: 44px; height: 44px; flex-shrink: 0; }
.logo-text { font-size: 26px; font-weight: 900; color: var(--purple); line-height: 1; white-space: nowrap; }
.logo-sub { font-size: 11px; color: var(--gray-500); white-space: nowrap; }
.search-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.search-bar { width: 100%; display: flex; border: 2px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.search-bar:focus-within { border-color: var(--purple); }
.search-input { flex: 1; border: none; outline: none; padding: 10px 14px; font-size: 14px; }
.search-select { border: none; border-left: 1px solid var(--gray-200); outline: none; padding: 0 12px; background: var(--gray-50); font-size: 13px; color: var(--gray-600); cursor: pointer; }
.search-btn { background: var(--purple); color: var(--white); border: none; padding: 0 20px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.search-btn:hover { background: var(--purple-dark); }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-post { background: var(--purple); color: var(--white); border: none; padding: 10px 18px; border-radius: var(--radius); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.btn-post:hover { background: var(--purple-dark); }
.btn-post .plus { width: 22px; height: 22px; border: 2px solid rgba(255,255,255,0.5); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.btn-login { background: none; border: 2px solid var(--gray-300); padding: 8px 16px; border-radius: var(--radius); cursor: pointer; font-size: 14px; font-weight: 500; color: var(--gray-700); }
.btn-login:hover { border-color: var(--purple); color: var(--purple); }
.btn-register { background: var(--purple); color: var(--white); border: none; padding: 10px 18px; border-radius: var(--radius); cursor: pointer; font-size: 14px; font-weight: 600; }
.btn-register:hover { background: var(--purple-dark); }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--gray-600); font-size: 20px; padding: 6px; position: relative; }
.icon-btn:hover { color: var(--purple); }
.badge { position: absolute; top: 0; right: 0; background: var(--red); color: white; border-radius: 50%; width: 16px; height: 16px; font-size: 10px; display: flex; align-items: center; justify-content: center; }

/* ===== NAVIGATION ===== */
.navbar { background: var(--purple-nav); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; }
.nav-links a { color: rgba(255,255,255,0.85); padding: 14px 16px; font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 5px; transition: background 0.2s, color 0.2s; }
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.15); color: white; }
.nav-links a.home { font-size: 18px; padding: 10px 16px; }
.nav-right a { color: white; padding: 12px 18px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,0.15); display: flex; align-items: center; gap: 8px; }
.nav-right a:hover { background: rgba(255,255,255,0.25); }

/* ===== CONTAINER ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ===== HERO SLIDER ===== */
.hero-section { padding: 20px 0; }
.hero-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr; gap: 16px; }

.hero-slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 320px; background: var(--gray-800); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%); }
.slide-badge { position: absolute; top: 16px; left: 16px; background: var(--purple); color: white; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 4px; letter-spacing: 0.5px; }
.slide-content { position: absolute; bottom: 20px; left: 20px; right: 20px; color: white; }
.slide-title { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.slide-meta { display: flex; align-items: center; gap: 14px; font-size: 13px; color: rgba(255,255,255,0.8); }
.slide-meta span { display: flex; align-items: center; gap: 4px; }
.slider-dots { position: absolute; bottom: 12px; right: 16px; display: flex; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; border: none; transition: background 0.2s; }
.dot.active { background: white; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); color: white; border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.slider-arrow.left { left: 10px; }
.slider-arrow.right { right: 10px; }
.slider-arrow:hover { background: rgba(255,255,255,0.4); }

/* News mini list */
.news-mini { display: flex; flex-direction: column; gap: 8px; }
.news-mini-item { display: flex; gap: 10px; background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow 0.2s; cursor: pointer; }
.news-mini-item:hover { box-shadow: var(--shadow-md); }
.news-mini-img { width: 90px; height: 70px; object-fit: cover; flex-shrink: 0; }
.news-mini-body { padding: 8px 10px 8px 0; flex: 1; }
.news-mini-title { font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--gray-800); margin-bottom: 4px; }
.news-mini-meta { font-size: 11px; color: var(--gray-500); display: flex; align-items: center; gap: 8px; }

/* Ad banner */
.ad-banner { background: linear-gradient(135deg, var(--purple) 0%, #4C1D95 100%); border-radius: var(--radius-lg); padding: 24px; color: white; display: flex; flex-direction: column; justify-content: space-between; height: 320px; position: relative; overflow: hidden; }
.ad-banner-title { font-size: 22px; font-weight: 800; line-height: 1.3; }
.ad-banner-sub { font-size: 13px; color: rgba(255,255,255,0.8); margin-top: 6px; }
.ad-banner-btn { background: white; color: var(--purple); border: none; padding: 10px 20px; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 16px; }
.ad-banner-img { position: absolute; bottom: -10px; right: -10px; width: 180px; opacity: 0.9; }

/* ===== CATEGORIES ===== */
.categories-section { padding: 20px 0; background: white; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.see-all { color: var(--purple); font-size: 14px; font-weight: 600; }
.see-all:hover { text-decoration: underline; }
.cat-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; min-width: 100px; }
.cat-icon { width: 56px; height: 56px; background: var(--purple-bg); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; transition: background 0.2s, transform 0.2s; }
.cat-item:hover .cat-icon { background: var(--purple); transform: scale(1.08); }
.cat-name { font-size: 13px; font-weight: 600; color: var(--gray-700); text-align: center; }
.cat-count { font-size: 12px; color: var(--gray-500); }

/* ===== NEWS + LISTINGS ===== */
.main-section { padding: 24px 0; }
.main-grid { display: grid; grid-template-columns: 1fr 0.8fr 0.5fr; gap: 20px; }

.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.news-card { background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow 0.2s; }
.news-card:hover { box-shadow: var(--shadow-md); }
.news-card.wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; }
.news-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.news-card.wide img { height: 100%; min-height: 180px; }
.news-card-body { padding: 12px; }
.news-card-tag { font-size: 11px; font-weight: 700; color: var(--purple); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.news-card-title { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--gray-800); margin-bottom: 8px; }
.news-card-meta { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 10px; }
.news-card-excerpt { font-size: 13px; color: var(--gray-600); line-height: 1.5; margin-bottom: 8px; }

/* Selected listings */
.listings-mini { display: flex; flex-direction: column; gap: 10px; }
.listing-card { background: white; border-radius: var(--radius); padding: 12px; display: flex; gap: 10px; box-shadow: var(--shadow-sm); cursor: pointer; transition: box-shadow 0.2s; }
.listing-card:hover { box-shadow: var(--shadow-md); }
.listing-img { width: 72px; height: 58px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.listing-body { flex: 1; }
.listing-title { font-size: 13px; font-weight: 600; color: var(--gray-800); margin-bottom: 3px; }
.listing-price { font-size: 14px; font-weight: 700; color: var(--purple); margin-bottom: 3px; }
.listing-location { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; }
.listing-date { font-size: 11px; color: var(--gray-400); }
.heart-btn { background: none; border: none; cursor: pointer; color: var(--gray-300); font-size: 18px; align-self: flex-start; }
.heart-btn:hover { color: var(--red); }

/* Post ad box */
.post-ad-box { background: var(--purple-bg); border-radius: var(--radius-lg); padding: 20px; }
.post-ad-box h3 { font-size: 17px; font-weight: 700; color: var(--purple); margin-bottom: 12px; }
.post-ad-feature { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gray-700); margin-bottom: 10px; }
.post-ad-feature span.icon { font-size: 18px; }
.btn-post-lg { background: var(--purple); color: white; border: none; padding: 12px 20px; border-radius: var(--radius); cursor: pointer; font-size: 15px; font-weight: 700; width: 100%; margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-post-lg:hover { background: var(--purple-dark); }

/* ===== NEWSLETTER ===== */
.newsletter { background: var(--purple); color: white; padding: 32px 0; }
.newsletter .container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.newsletter-text h3 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.newsletter-text p { font-size: 14px; color: rgba(255,255,255,0.8); }
.newsletter-form { display: flex; gap: 10px; flex: 1; max-width: 400px; }
.newsletter-form input { flex: 1; border: none; padding: 12px 16px; border-radius: var(--radius); font-size: 14px; outline: none; }
.newsletter-form button { background: white; color: var(--purple); border: none; padding: 12px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.newsletter-social { display: flex; gap: 12px; }
.social-link { width: 36px; height: 36px; background: rgba(255,255,255,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 16px; transition: background 0.2s; }
.social-link:hover { background: rgba(255,255,255,0.3); }
.newsletter-label { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ===== FOOTER ===== */
.footer { background: var(--gray-900); color: rgba(255,255,255,0.7); padding: 8px 0; text-align: center; font-size: 13px; }

/* ===== UTILITIES ===== */
.text-purple { color: var(--purple); }
.text-orange { color: var(--orange); }
.text-green { color: var(--green); }
.font-bold { font-weight: 700; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .ad-banner { display: none; }
  .main-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-grid, .main-grid { grid-template-columns: 1fr; }
  .nav-links { overflow-x: auto; }
  .topbar { display: none; }
  .cat-grid { gap: 10px; }
  .cat-item { min-width: 80px; }
}

/* ================================================================
   BAXMALI.AZ - MOBİL RESPONSIVE (v5)
   ================================================================ */

/* ===== REKLAM BANNER ZONES ===== */
.ad-zone {
  width: 100%;
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.ad-zone img, .ad-zone iframe { width: 100%; height: 100%; object-fit: cover; border: none; display: block; }
.ad-zone-placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--gray-400); font-size: 12px; padding: 12px; text-align: center; }
.ad-zone-placeholder span { font-size: 22px; }

/* Leaderboard 728x90 - Header altı */
.ad-leaderboard { height: 90px; margin: 8px 0; }
/* Billboard 970x250 - Ana xəbər altı */
.ad-billboard { height: 120px; margin: 16px 0; }
/* Rectangle 300x250 - Sidebar */
.ad-rectangle { height: 250px; margin: 12px 0; }
/* Mobile Banner 320x50 - Mobil üst/alt */
.ad-mobile-banner { height: 60px; margin: 6px 0; display: none; }
/* Half Page 300x600 - Sidebar geniş */
.ad-halfpage { height: 300px; margin: 12px 0; }
/* Sticky bottom ad - mobil */
.ad-sticky-bottom {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: white;
  border-top: 1px solid var(--gray-200);
  z-index: 999;
  align-items: center;
  justify-content: center;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
.ad-sticky-bottom .ad-zone { height: 50px; max-width: 320px; margin: 5px auto; }
.ad-sticky-close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--gray-200); border: none; border-radius: 50%;
  width: 20px; height: 20px; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--gray-600);
}

/* ===== MOBILE NAVIGATION ===== */
.hamburger-btn {
  display: none;
  background: none; border: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; margin-left: auto;
}
.hamburger-btn span {
  display: block; width: 24px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: all 0.3s;
}
.hamburger-btn.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-menu.open { opacity: 1; }
.mobile-menu-inner {
  position: absolute;
  top: 0; left: 0;
  width: 280px; height: 100%;
  background: white;
  padding: 0;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 4px 0 20px rgba(0,0,0,0.15);
}
.mobile-menu.open .mobile-menu-inner { transform: translateX(0); }
.mobile-menu-header {
  background: var(--purple-nav); color: white;
  padding: 20px 16px; display: flex; align-items: center; justify-content: space-between;
}
.mobile-menu-logo { font-size: 20px; font-weight: 800; }
.mobile-menu-close {
  background: rgba(255,255,255,0.2); border: none; color: white;
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px;
}
.mobile-menu-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; color: var(--gray-700); font-size: 15px;
  border-bottom: 1px solid var(--gray-100); font-weight: 500;
}
.mobile-menu-nav a:hover { background: var(--purple-bg); color: var(--purple); }
.mobile-menu-actions { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mobile-menu-actions .btn-post-mobile {
  background: var(--purple); color: white; border: none;
  padding: 14px; border-radius: var(--radius); font-size: 15px;
  font-weight: 700; cursor: pointer; text-align: center; display: block;
}

/* ===== BREAKPOINT: 1024px ===== */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .ad-banner { display: none; }
  .main-grid { grid-template-columns: 1fr 1fr; }
  .ad-leaderboard { height: 90px; }
  .ad-billboard { height: 100px; }
}

/* ===== BREAKPOINT: 768px (TABLET) ===== */
@media (max-width: 768px) {
  .container { padding: 0 12px; }

  /* Topbar gizlət */
  .topbar { display: none; }

  /* Header */
  .header .container { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .logo { min-width: auto; }
  .logo-text { font-size: 22px; }

  /* Header actions gizlət (mobil menyu ilə əvəzlə) */
  .header-actions { display: none; }
  .search-bar { display: none; }
  .hamburger-btn { display: flex; }

  /* Navbar gizlət - mobil menyuya keçir */
  .navbar { display: none; }

  /* Hero */
  .hero-section { padding: 12px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-slider { height: 220px; }
  .slide-title { font-size: 15px; }
  .news-mini { display: none; } /* mobil hero-da mini xəbərlər gizlət */
  .ad-banner { display: none; }

  /* Categories */
  .categories-section { padding: 14px 0; }
  .cat-grid { gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .cat-item { min-width: 72px; flex-shrink: 0; }
  .cat-icon { width: 48px; height: 48px; font-size: 20px; }
  .cat-name { font-size: 11px; }

  /* Main grid */
  .main-section { padding: 14px 0; }
  .main-grid { grid-template-columns: 1fr; gap: 16px; }
  .news-grid { grid-template-columns: 1fr; }
  .news-card.wide { grid-template-columns: 1fr; }
  .news-card.wide img { height: 180px; }

  /* Ad zones mobil */
  .ad-leaderboard { display: none; }
  .ad-rectangle { height: 200px; }
  .ad-mobile-banner { display: block; }
  .ad-halfpage { height: 250px; }
  .ad-sticky-bottom { display: flex; }

  /* Newsletter */
  .newsletter .container { flex-direction: column; gap: 16px; align-items: flex-start; }
  .newsletter-form { max-width: 100%; width: 100%; }
  .newsletter-social { display: none; }

  /* Post ad box */
  .post-ad-box { display: none; }

  /* Body padding - sticky bottom ad için */
  body { padding-bottom: 70px; }
}

/* ===== BREAKPOINT: 480px (KİÇİK MOBİL) ===== */
@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .logo-text { font-size: 20px; }
  .logo-img { width: 36px; height: 36px; }
  .hero-slider { height: 200px; }
  .slide-title { font-size: 14px; }
  .section-title { font-size: 15px; }
  .cat-item { min-width: 65px; }
  .cat-icon { width: 42px; height: 42px; font-size: 18px; }
  .cat-name { font-size: 10px; }
  .news-card img { height: 140px; }
  .news-card.wide img { height: 160px; }
  .news-card-title { font-size: 13px; }
  .listing-img { width: 60px; height: 48px; }
  .listing-price { font-size: 13px; }
  .ad-rectangle { height: 180px; }
  .ad-halfpage { height: 200px; }
}

/* ===== MOBILE SEARCH BAR (ayrı komponent) ===== */
.mobile-search-bar {
  display: none;
  padding: 8px 12px;
  background: white;
  border-bottom: 1px solid var(--gray-200);
}
.mobile-search-bar .search-bar {
  display: flex !important;
  width: 100%;
}
.mobile-search-bar .search-select { display: none; }
@media (max-width: 768px) {
  .mobile-search-bar { display: block; }
}

/* ===== SMOOTH TRANSITIONS ===== */
.mobile-menu { display: block; pointer-events: none; }
.mobile-menu.open { pointer-events: all; }

/* ================================================================
   BAXMALI.AZ v6 — DARK MODE
   ================================================================ */
[data-theme="dark"] {
  --purple:     #9D55FF;
  --purple-dark:#7C3AED;
  --purple-bg:  #1E1033;
  --purple-nav: #2D1B69;
  --orange:     #FB923C;
  --gray-50:    #0F0F0F;
  --gray-100:   #1A1A1A;
  --gray-200:   #2A2A2A;
  --gray-300:   #3A3A3A;
  --gray-400:   #6B7280;
  --gray-500:   #9CA3AF;
  --gray-600:   #D1D5DB;
  --gray-700:   #E5E7EB;
  --gray-800:   #F3F4F6;
  --gray-900:   #F9FAFB;
  --white:      #1C1C1E;
}
[data-theme="dark"] body          { background: #0F0F0F; color: #F3F4F6; }
[data-theme="dark"] .header       { background: #1C1C1E; border-color: #2A2A2A; }
[data-theme="dark"] .news-card    { background: #1C1C1E; }
[data-theme="dark"] .listing-card { background: #1C1C1E; }
[data-theme="dark"] .post-ad-box  { background: #1E1033; }
[data-theme="dark"] .newsletter   { background: #2D1B69; }
[data-theme="dark"] .footer       { background: #000; }
[data-theme="dark"] .search-bar   { border-color: #3A3A3A; background: #1C1C1E; }
[data-theme="dark"] .search-input { background: #1C1C1E; color: #F3F4F6; }
[data-theme="dark"] .search-select{ background: #2A2A2A; color: #D1D5DB; }
[data-theme="dark"] .news-mini-item { background: #1C1C1E; }
[data-theme="dark"] .ad-zone      { background: #1A1A1A; border-color: #3A3A3A; }
[data-theme="dark"] .mobile-menu-inner { background: #1C1C1E; }
[data-theme="dark"] .mobile-menu-nav a { color: #D1D5DB; border-color: #2A2A2A; }
[data-theme="dark"] .topbar       { background: #1A1A1A; border-color: #2A2A2A; color: #9CA3AF; }

/* Dark mode toggle button */
.dark-toggle {
  background: none; border: 2px solid var(--gray-200);
  border-radius: 20px; padding: 5px 10px;
  cursor: pointer; font-size: 16px; color: var(--gray-600);
  display: flex; align-items: center; gap: 5px;
  transition: all 0.2s; white-space: nowrap;
}
.dark-toggle:hover { border-color: var(--purple); color: var(--purple); }

/* ================================================================
   LAZY LOADING
   ================================================================ */
img[data-src] { opacity: 0; transition: opacity 0.4s; }
img.loaded     { opacity: 1; }

/* ================================================================
   INFINITE SCROLL LOADER
   ================================================================ */
.infinite-loader {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 24px; color: var(--gray-400); font-size: 14px;
}
.infinite-loader .spinner {
  width: 22px; height: 22px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.load-more-trigger { height: 1px; }

/* ================================================================
   LIVE SEARCH DROPDOWN
   ================================================================ */
.search-wrapper { position: relative; flex: 1; display: flex; }
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 380px; overflow-y: auto;
  display: none;
}
.search-dropdown.open { display: block; }
.search-dropdown-section { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.05em; }
.search-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:hover { background: var(--gray-50); }
.search-result-img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--gray-100); }
.search-result-title { font-size: 13px; font-weight: 600; color: var(--gray-800); }
.search-result-meta  { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
.search-result-tag   { font-size: 10px; font-weight: 700; color: var(--purple); background: var(--purple-bg); padding: 2px 6px; border-radius: 4px; }
.search-history-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; cursor: pointer; font-size: 13px; color: var(--gray-600);
}
.search-history-item:hover { background: var(--gray-50); }
.search-no-results { padding: 20px; text-align: center; color: var(--gray-400); font-size: 13px; }

/* ================================================================
   PWA INSTALL BANNER
   ================================================================ */
.pwa-install-banner {
  display: none;
  position: fixed; bottom: 70px; left: 12px; right: 12px;
  background: white; border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  padding: 16px 18px;
  z-index: 998;
  align-items: center; gap: 14px;
  border: 1px solid var(--gray-200);
}
[data-theme="dark"] .pwa-install-banner { background: #1C1C1E; border-color: #3A3A3A; }
.pwa-install-banner.show { display: flex; }
.pwa-install-icon { font-size: 36px; flex-shrink: 0; }
.pwa-install-text { flex: 1; }
.pwa-install-text strong { font-size: 14px; color: var(--gray-900); display: block; }
.pwa-install-text span   { font-size: 12px; color: var(--gray-500); }
.pwa-install-btn { background: var(--purple); color: white; border: none; padding: 9px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.pwa-install-close { background: none; border: none; font-size: 18px; color: var(--gray-400); cursor: pointer; padding: 4px; }

/* ================================================================
   PRICE CHART (listing detail)
   ================================================================ */
.price-chart-wrap {
  background: var(--white); border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); padding: 16px; margin-top: 16px;
}
.price-chart-title { font-size: 14px; font-weight: 700; color: var(--gray-800); margin-bottom: 12px; }

/* ================================================================
   COMPARE BUTTON & PANEL
   ================================================================ */
.compare-btn {
  background: var(--purple-bg); color: var(--purple);
  border: 1px solid var(--purple); padding: 6px 12px;
  border-radius: var(--radius); font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.compare-btn:hover, .compare-btn.added { background: var(--purple); color: white; }

.compare-bar {
  position: fixed; bottom: 70px; left: 0; right: 0;
  background: var(--gray-900); color: white;
  padding: 12px 20px;
  display: none; align-items: center; gap: 16px;
  z-index: 990; box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.compare-bar.show { display: flex; }
.compare-items { display: flex; gap: 10px; flex: 1; }
.compare-item-thumb {
  width: 48px; height: 40px; border-radius: 6px; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3); background: var(--gray-700);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.compare-item-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
.compare-count { background: var(--purple); border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.btn-compare-now { background: white; color: var(--purple); border: none; padding: 9px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.btn-compare-clear { background: rgba(255,255,255,0.1); color: white; border: none; padding: 9px 14px; border-radius: var(--radius); font-size: 13px; cursor: pointer; }

/* Compare modal */
.compare-modal { max-width: 900px !important; }
.compare-grid { display: grid; gap: 0; overflow-x: auto; }
.compare-col { border-right: 1px solid var(--gray-100); }
.compare-col:last-child { border-right: none; }
.compare-cell { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.compare-cell.label { background: var(--gray-50); font-weight: 600; color: var(--gray-500); font-size: 12px; }
.compare-cell.highlight { color: var(--purple); font-weight: 700; }


/* ===== SKELETON LOADERS ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  overflow: hidden;
  margin-bottom: 12px;
}
.skeleton-img { height: 180px; }
.skeleton-line { height: 14px; margin: 10px 14px; }
.skeleton-line.short { width: 60%; }
.skeleton-line.medium { width: 80%; }
[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1E293B 25%, #334155 50%, #1E293B 75%);
  background-size: 200% 100%;
}
