* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  color: #1a1a1a;
  background: #f6f7fb;
}

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

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ===== HEADER ===== */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e6e8ef;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 20px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 36px;
  border-radius: 6px;
}

.nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-link {
  color: #4b5563;
  font-size: 14px;
  white-space: nowrap;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn.primary {
  background: #2f5eff;
  color: #ffffff;
}

.btn.ghost {
  background: #ffffff;
  border-color: #d4d9e5;
  color: #334155;
}

/* ===== HERO ===== */
.hero {
  padding: 40px 0 20px;
}

.hero-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr 280px;
}

.hero-content h1 {
  font-size: 28px;
  margin-bottom: 12px;
  line-height: 1.3;
}

.hero-content p {
  color: #5f6b7b;
  margin-bottom: 20px;
}

/* ===== SEARCH FORM ===== */
.search-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-form .search-input {
  flex: 2 1 200px;
  min-width: 180px;
}

.search-form select[name="category"],
.search-form select[name="region"] {
  flex: 1 1 150px;
  min-width: 140px;
}

.search-form input[name="price_min"],
.search-form input[name="price_max"] {
  flex: 0 1 110px;
  min-width: 100px;
}

.search-form .btn {
  flex: 0 0 auto;
}

.search-form input,
.search-form select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d4d9e5;
  background: #ffffff;
  width: 100%;
  font-size: 14px;
}

.search-input {
  position: relative;
}

.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  background: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(28, 32, 38, 0.12);
  display: none;
  z-index: 10;
}

.suggestions.open {
  display: block;
}

.suggestion-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f2f6;
  cursor: pointer;
}

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

/* ===== HERO CARD ===== */
.hero-card {
  background: #111827;
  color: #ffffff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.hero-card-value {
  font-size: 36px;
  font-weight: 700;
}

/* ===== SECTIONS ===== */
.section {
  padding: 30px 0;
}

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

.section-header.stacked {
  align-items: flex-start;
}

.section-header h2 {
  font-size: 22px;
}

.section-subtitle {
  font-size: 14px;
  color: #7a8395;
  margin-top: 6px;
}

.link {
  color: #2f5eff;
  font-size: 14px;
}

/* ===== CATEGORIES GRID ===== */
.categories-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.categories-grid.main-categories {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.category-tile {
  position: relative;
  min-height: 130px;
  padding: 0;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(135deg, #cbd5f7, #9aa3c9);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0) 0%,
    rgba(15, 23, 42, 0.45) 100%
  );
}

.category-tile-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 14px;
}

.category-count-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(124, 58, 237, 0.9);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
}

.main-categories .category-title {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 0;
  font-size: 14px;
}

.category-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid #eef0f6;
}

.category-media {
  width: 100%;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

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

.category-media-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #dde2f0;
}

.category-title {
  font-weight: 600;
  margin-bottom: 8px;
}

.category-count {
  font-size: 12px;
  color: #8a93a6;
  margin-bottom: 8px;
}

.category-children span {
  display: inline-block;
  font-size: 12px;
  color: #5f6b7b;
  margin-right: 6px;
}

/* ===== SEARCH PAGE ===== */
.search-page {
  padding: 24px 0 60px;
}

.search-header h1 {
  font-size: 28px;
  margin-bottom: 12px;
}

.search-controls {
  display: grid;
  gap: 16px;
}

.search-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.search-inline input[name="q"] {
  flex: 2 1 200px;
  min-width: 160px;
}

.search-inline select[name="category"],
.search-inline select[name="region"] {
  flex: 1 1 140px;
  min-width: 130px;
}

.search-inline input[name="price_min"],
.search-inline input[name="price_max"] {
  flex: 0 1 100px;
  min-width: 90px;
}

.search-inline .btn {
  flex: 0 0 auto;
}

.search-inline input,
.search-inline select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d4d9e5;
  background: #ffffff;
  font-size: 14px;
}

.search-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.search-views {
  display: flex;
  gap: 6px;
}

.search-views a {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d4d9e5;
  font-size: 13px;
  color: #4b5563;
}

.search-views a.active {
  background: #2f5eff;
  color: #ffffff;
  border-color: #2f5eff;
}

.search-sort {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #5f6b7b;
}

.search-sort select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d4d9e5;
}

.search-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  margin-top: 24px;
}

.search-sidebar .filter-card {
  background: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.search-sidebar .filter-card h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.search-sidebar label {
  font-size: 12px;
  color: #6b7280;
}

.search-sidebar input,
.search-sidebar select {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d4d9e5;
  width: 100%;
  font-size: 14px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.search-results {
  display: grid;
  gap: 12px;
}

.search-results.grid {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.search-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
  background: #ffffff;
  border: 1px solid #e6e8ef;
  border-radius: 12px;
  padding: 12px;
}

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

.search-card-media {
  width: 100%;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-card-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #dfe4f2;
}

.search-card-body h3 {
  font-size: 15px;
  margin-bottom: 6px;
  line-height: 1.3;
}

.search-card-meta {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
}

.search-card-price {
  font-weight: 700;
  color: #1f2937;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  padding: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.pagination a {
  color: #2f5eff;
}

/* ===== ADS GRID ===== */
.ads-grid,
.shops-grid,
.blog-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.ad-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef0f6;
}

.ad-card.premium-card {
  border-color: #2f5eff;
  box-shadow: 0 6px 18px rgba(47, 94, 255, 0.12);
}

.ad-image {
  height: 150px;
  background: #f1f3f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-image img,
.shop-card img,
.blog-card img,
.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d6dbe8, #eef1f7);
}

.ad-body {
  padding: 12px;
}

.ad-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
  min-height: 38px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ad-meta {
  font-size: 12px;
  color: #8a93a6;
  margin-bottom: 8px;
}

.ad-price {
  font-weight: 700;
}

/* ===== BANNERS ===== */
.banners-inner {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.banner {
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
  border: 1px solid #eef0f6;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner img {
  border-radius: 8px;
}

.banner-placeholder {
  color: #8a93a6;
  font-size: 12px;
}

/* ===== SHOPS & BLOG ===== */
.shop-card,
.blog-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eef0f6;
  padding: 12px;
  text-align: center;
}

.shop-card img,
.blog-card img {
  height: 100px;
  border-radius: 10px;
  margin-bottom: 8px;
}

.shop-title,
.blog-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.blog-date {
  font-size: 12px;
  color: #8a93a6;
  margin-top: 6px;
}

.empty-state {
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #d4d9e5;
  color: #8a93a6;
  text-align: center;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #111827;
  color: #f9fafb;
  padding: 24px 0;
  margin-top: 30px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE: TABLET (768-1024px) ===== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .search-body {
    grid-template-columns: 200px 1fr;
  }

  .categories-grid.main-categories {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

/* ===== RESPONSIVE: MOBILE (< 768px) ===== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .logo {
    justify-content: center;
  }

  .nav {
    justify-content: center;
    gap: 12px;
  }

  .actions {
    justify-content: center;
  }

  .hero {
    padding: 24px 0 16px;
  }

  .hero-content h1 {
    font-size: 24px;
    text-align: center;
  }

  .hero-content p {
    text-align: center;
  }

  .hero-card {
    flex-direction: column;
    text-align: center;
  }

  .search-form,
  .search-inline {
    flex-direction: column;
  }

  .search-form > *,
  .search-inline > * {
    width: 100%;
    flex: none;
  }

  .search-form .btn,
  .search-inline .btn {
    width: 100%;
  }

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

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

  .search-body {
    grid-template-columns: 1fr;
  }

  .search-sidebar {
    order: 2;
  }

  .search-results {
    order: 1;
  }

  .search-card {
    grid-template-columns: 100px 1fr;
  }

  .search-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-views {
    justify-content: center;
  }

  .search-sort {
    justify-content: center;
  }

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

  .banners-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== RESPONSIVE: SMALL MOBILE (< 480px) ===== */
@media (max-width: 480px) {
  .container {
    width: 94%;
  }

  .hero-content h1 {
    font-size: 20px;
  }

  .section-header h2 {
    font-size: 18px;
  }

  .categories-grid.main-categories {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .category-tile {
    min-height: 100px;
  }

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

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

  .search-card-media {
    height: 140px;
  }
}

/* ===== MODERN SEARCHBAR ===== */
.modern-searchbar {
  width: 100%;
}

.modern-searchbar__inner {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: visible;
}

.modern-searchbar__control {
  position: relative;
  display: flex;
  align-items: center;
}

.modern-searchbar__control--category {
  flex: 0 0 auto;
  border-right: 1px solid #e6e8ef;
}

.modern-searchbar__control--query {
  flex: 1 1 auto;
  min-width: 0;
}

.modern-searchbar__control--region {
  flex: 0 0 auto;
  border-left: 1px solid #e6e8ef;
}

.modern-searchbar__select {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.modern-searchbar__select:hover {
  background: #f8fafc;
}

.modern-searchbar__select-icon {
  color: #6366f1;
  font-size: 18px;
}

.modern-searchbar__select-label {
  font-size: 14px;
  font-weight: 500;
  color: #1e293b;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modern-searchbar__select-caret {
  color: #94a3b8;
  font-size: 12px;
  transition: transform 0.2s;
}

.modern-searchbar__select.active .modern-searchbar__select-caret {
  transform: rotate(180deg);
}

.modern-searchbar__icon {
  position: absolute;
  left: 20px;
  color: #94a3b8;
  font-size: 16px;
}

.modern-searchbar__input {
  width: 100%;
  padding: 18px 20px 18px 50px;
  border: none;
  font-size: 15px;
  background: transparent;
  outline: none;
}

.modern-searchbar__input::placeholder {
  color: #94a3b8;
}

.modern-searchbar__submit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  background: #6366f1;
  color: #ffffff;
  border: none;
  border-radius: 0 16px 16px 0;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.modern-searchbar__submit:hover {
  background: #4f46e5;
}

/* Dropdown */
.modern-searchbar__dropdown {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  z-index: 100;
  display: none;
  max-height: 80vh;
  overflow: hidden;
}

.modern-searchbar__dropdown.active {
  display: block;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.modern-searchbar__dropdown--categories {
  width: 580px;
  max-width: 90vw;
}

.modern-searchbar__dropdown--regions {
  width: 340px;
  max-width: 90vw;
}

.modern-searchcats {
  padding: 20px;
}

.modern-searchcats__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e6e8ef;
}

.modern-searchcats__title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.modern-searchcats__close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s;
}

.modern-searchcats__close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.modern-searchcats__search {
  position: relative;
  margin-bottom: 16px;
}

.modern-searchcats__search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

.modern-searchcats__search input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  transition: all 0.2s;
}

.modern-searchcats__search input:focus {
  outline: none;
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modern-searchcats__search input::placeholder {
  color: #94a3b8;
}

.modern-searchcats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 45vh;
  overflow-y: auto;
}

.modern-searchcats__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: all 0.2s;
  cursor: pointer;
}

.modern-searchcats__item:hover {
  background: #f1f5f9;
}

.modern-searchcats__item.selected {
  background: #eef2ff;
}

.modern-searchcats__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  border-radius: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.modern-searchcats__name {
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  line-height: 1.3;
}

.modern-searchcats__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 45vh;
  overflow-y: auto;
}

.modern-searchcats__item.hidden,
.modern-searchcats__region-item.hidden {
  display: none;
}

.modern-searchcats__region-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 14px;
  color: #334155;
}

.modern-searchcats__region-item:hover {
  background: #f1f5f9;
}

.modern-searchcats__region-item.selected {
  background: #eef2ff;
  color: #6366f1;
}

.modern-searchcats__region-item i {
  color: #6366f1;
  width: 20px;
  text-align: center;
}

/* Suggestions in modern searchbar */
.modern-searchbar__control--query .suggestions {
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border-radius: 12px;
}

/* Mobile responsive */
@media (max-width: 900px) {
  .modern-searchbar__inner {
    flex-direction: column;
    border-radius: 16px;
  }

  .modern-searchbar__control {
    width: 100%;
  }

  .modern-searchbar__control--category,
  .modern-searchbar__control--region {
    border-right: none;
    border-left: none;
    border-bottom: 1px solid #e6e8ef;
  }

  .modern-searchbar__select {
    width: 100%;
    justify-content: flex-start;
  }

  .modern-searchbar__select-label {
    max-width: none;
    flex: 1;
  }

  .modern-searchbar__submit {
    border-radius: 0 0 16px 16px;
    justify-content: center;
    padding: 18px;
  }

  .modern-searchbar__dropdown {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
  }

  .modern-searchbar__dropdown--regions {
    right: auto;
    left: 50%;
  }

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

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

  .modern-searchbar__select {
    padding: 14px 16px;
  }

  .modern-searchbar__input {
    padding: 16px 16px 16px 46px;
  }
}

/* Overlay for dropdowns */
.dropdown-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  display: none !important;
  pointer-events: none;
}

.dropdown-overlay.active {
  display: block !important;
  pointer-events: auto;
}

/* ===== AD CARD LINKS ===== */
.ad-card-link,
.search-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ad-card-link:hover .ad-card,
.search-card-link:hover .search-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ad-card,
.search-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* ===== AD DETAIL PAGE ===== */
.ad-detail-page {
  padding: 24px 0 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: #64748b;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: #6366f1;
}

.breadcrumb span {
  color: #94a3b8;
}

.ad-detail {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  margin-bottom: 32px;
}

.ad-detail__gallery {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #e6e8ef;
}

.ad-detail__main-image {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

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

.ad-detail__thumbnails {
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding: 4px;
  margin: -4px;
}

.thumbnail {
  flex: 0 0 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.thumbnail:hover {
  border-color: #6366f1;
}

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

.ad-detail__info {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e6e8ef;
  height: fit-content;
}

.ad-detail__title {
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.3;
}

.ad-detail__price {
  font-size: 28px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 20px;
}

.ad-detail__meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e6e8ef;
}

.ad-detail__meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #64748b;
}

.ad-detail__meta-item i {
  width: 18px;
  color: #94a3b8;
}

.ad-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge--premium {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
}

.badge--top {
  background: #fef3c7;
  color: #92400e;
}

.badge--urgent {
  background: #fee2e2;
  color: #dc2626;
}

.ad-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.ad-detail__actions .btn {
  padding: 14px 20px;
  font-size: 15px;
}

.btn--large {
  padding: 16px 24px !important;
  font-size: 16px !important;
}

.ad-detail__actions .btn i {
  margin-right: 8px;
}

.ad-detail__seller {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 12px;
}

.seller-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.seller-info {
  flex: 1;
}

.seller-name {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
}

.seller-status {
  font-size: 13px;
  color: #64748b;
}

.ad-detail__description {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e6e8ef;
  margin-bottom: 32px;
}

.ad-detail__description h2 {
  font-size: 18px;
  margin-bottom: 16px;
  color: #1e293b;
}

.description-text {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
}

.description-text p {
  margin-bottom: 12px;
}

.similar-ads h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #1e293b;
}

/* ===== AD DETAIL RESPONSIVE ===== */
@media (max-width: 900px) {
  .ad-detail {
    grid-template-columns: 1fr;
  }

  .ad-detail__main-image {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .ad-detail__title {
    font-size: 18px;
  }

  .ad-detail__price {
    font-size: 24px;
  }

  .ad-detail__main-image {
    height: 220px;
  }
}

/* ===== GALLERY ENHANCEMENTS ===== */
.ad-detail__main-image {
  cursor: pointer;
  position: relative;
}

.main-image__zoom-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.ad-detail__main-image:hover .main-image__zoom-hint {
  opacity: 1;
}

.thumbnail {
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s;
}

.thumbnail.active {
  border-color: #6366f1;
}

.thumbnail:hover {
  border-color: #6366f1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
}

.lightbox.active {
  display: block;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.lightbox__content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 100px;
}

.lightbox__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  overflow: hidden;
}

.lightbox__image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 20px;
}

.lightbox__nav--next {
  right: 20px;
}

.lightbox__counter {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
}

.lightbox__thumbnails {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  max-width: 90%;
  overflow-x: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
}

.lightbox__thumb {
  flex: 0 0 60px;
  height: 45px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
  opacity: 0.6;
}

.lightbox__thumb:hover {
  opacity: 1;
}

.lightbox__thumb.active {
  border-color: #6366f1;
  opacity: 1;
}

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

/* Lightbox mobile */
@media (max-width: 768px) {
  .lightbox__nav {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .lightbox__nav--prev {
    left: 10px;
  }

  .lightbox__nav--next {
    right: 10px;
  }

  .lightbox__close {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  .lightbox__content {
    padding: 50px 10px 80px;
  }

  .lightbox__thumbnails {
    gap: 6px;
    padding: 8px;
  }

  .lightbox__thumb {
    flex: 0 0 50px;
    height: 38px;
  }
}

/* ===== BLOG PAGES ===== */
.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card-link:hover .blog-card {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.blog-card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.blog-list-page,
.blog-detail-page {
  padding: 24px 0 60px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: #1e293b;
}

.page-subtitle {
  font-size: 16px;
  color: #64748b;
}

.blog-grid--large {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.blog-card--large {
  padding: 0;
  text-align: left;
}

.blog-card--large .blog-card__image {
  height: 180px;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.blog-card--large .blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card--large .blog-card__content {
  padding: 16px;
}

.blog-card--large .blog-title {
  font-size: 16px;
  margin-bottom: 8px;
}

/* ===== BLOG ARTICLE ===== */
.blog-article {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  border: 1px solid #e6e8ef;
  margin-bottom: 40px;
}

.blog-article__header {
  margin-bottom: 24px;
}

.blog-article__title {
  font-size: 28px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-article__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.blog-article__date {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
}

.blog-article__date i {
  color: #94a3b8;
}

.blog-article__image {
  margin-bottom: 32px;
  border-radius: 12px;
  overflow: hidden;
}

.blog-article__image img {
  width: 100%;
  height: auto;
  display: block;
}

.blog-article__content {
  font-size: 16px;
  line-height: 1.8;
  color: #334155;
}

.blog-article__content p {
  margin-bottom: 16px;
}

.blog-article__content h2 {
  font-size: 22px;
  margin: 32px 0 16px;
  color: #1e293b;
}

.blog-article__content h3 {
  font-size: 18px;
  margin: 24px 0 12px;
  color: #1e293b;
}

.blog-article__share {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e6e8ef;
  display: flex;
  align-items: center;
  gap: 12px;
}

.blog-article__share span {
  font-size: 14px;
  color: #64748b;
}

.share-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border-radius: 10px;
  color: #64748b;
  font-size: 18px;
  transition: all 0.2s;
}

.share-btn:hover {
  background: #6366f1;
  color: #ffffff;
}

.other-posts h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #1e293b;
}

@media (max-width: 768px) {
  .blog-article {
    padding: 20px;
  }

  .blog-article__title {
    font-size: 22px;
  }

  .blog-grid--large {
    grid-template-columns: 1fr;
  }
}

/* ===== AUTH PAGES ===== */
.auth-page {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1000px;
  width: 100%;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.auth-card {
  padding: 48px;
}

.auth-card--register {
  padding: 40px 48px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-logo {
  display: inline-block;
  margin-bottom: 24px;
}

.auth-logo img {
  height: 50px;
  border-radius: 12px;
}

.auth-header h1 {
  font-size: 26px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 15px;
  color: #64748b;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i:first-child {
  position: absolute;
  left: 16px;
  color: #94a3b8;
  font-size: 16px;
}

.input-with-icon input {
  width: 100%;
  padding: 14px 16px 14px 48px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 15px;
  background: #f8fafc;
  transition: all 0.2s;
}

.input-with-icon input:focus {
  outline: none;
  border-color: #6366f1;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.input-with-icon input::placeholder {
  color: #94a3b8;
}

.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: #64748b;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: #475569;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #6366f1;
  cursor: pointer;
}

.checkbox-label a {
  color: #6366f1;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.forgot-link {
  font-size: 14px;
  color: #6366f1;
  white-space: nowrap;
}

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

.btn-auth {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  gap: 10px;
  margin-top: 8px;
}

.btn-auth i {
  font-size: 18px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-divider span {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
}

.social-auth {
  display: flex;
  gap: 12px;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.social-btn i {
  font-size: 18px;
}

.social-btn--vk {
  color: #0077ff;
}

.social-btn--vk:hover {
  background: #0077ff;
  border-color: #0077ff;
  color: #ffffff;
}

.social-btn--google {
  color: #ea4335;
}

.social-btn--google:hover {
  background: #ea4335;
  border-color: #ea4335;
  color: #ffffff;
}

.social-btn--telegram {
  color: #0088cc;
}

.social-btn--telegram:hover {
  background: #0088cc;
  border-color: #0088cc;
  color: #ffffff;
}

.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: #64748b;
}

.auth-footer a {
  color: #6366f1;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Auth promo section */
.auth-promo {
  position: relative;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.auth-promo__bg {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.auth-promo__content {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.auth-promo__icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: 24px;
}

.auth-promo h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 24px;
}

.auth-promo__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-promo__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
}

.auth-promo__list i {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

/* Password strength */
.password-strength {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: 0;
  background: #ef4444;
  border-radius: 2px;
  transition: all 0.3s;
}

.password-strength.weak .strength-bar::after {
  width: 33%;
  background: #ef4444;
}

.password-strength.medium .strength-bar::after {
  width: 66%;
  background: #f59e0b;
}

.password-strength.strong .strength-bar::after {
  width: 100%;
  background: #22c55e;
}

.strength-text {
  font-size: 12px;
  color: #94a3b8;
  min-width: 80px;
}

.password-strength.weak .strength-text {
  color: #ef4444;
}

.password-strength.medium .strength-text {
  color: #f59e0b;
}

.password-strength.strong .strength-text {
  color: #22c55e;
}

/* Auth responsive */
@media (max-width: 900px) {
  .auth-container {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .auth-promo {
    display: none;
  }

  .auth-card {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .auth-page {
    padding: 20px;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .social-auth {
    flex-direction: column;
  }

  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .auth-header h1 {
    font-size: 22px;
  }
}
