/* Full Manrope Font: Latin & Cyrillic */
@font-face {
  font-family: 'Manrope';
  src: url('/static/fonts/manrope-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Manrope';
  src: url('/static/fonts/manrope-cyrillic-wght-normal.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: block;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Manrope';
  src: url('/static/fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: block;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --primary: #186AFF;
  --primary-hover: #0E56DE;
  --primary-light: #EBF2FF;
  --success: #36B555;
  --warning: #F59E0B;
  --danger: #EF4444;
  --bg-page: #FFFFFF;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

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

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans) !important;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 14px;
}

.container {
  max-width: 1368px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
.header {
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  position: relative;
  z-index: 5000 !important;
}

.header-top {
  border-bottom: 1px solid #F1F5F9;
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 0;
}

.header-main {
  padding-top: 12px;
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-main-left {
  display: contents;
}

.btn-post-text-short {
  display: none;
}

.btn-post-text-full {
  display: inline;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 22px;
  color: var(--primary);
}

.btn-catalog {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-catalog:hover {
  background: var(--primary-hover);
}

.search-container {
  flex: 1;
  position: relative;
  display: flex;
  height: 44px;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  outline: none;
  font-size: 14.5px;
  background: #FFFFFF;
}

.search-btn {
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 0 22px;
  height: 44px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.search-btn:hover {
  background: var(--primary-hover);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  position: relative;
  transition: color 0.15s;
}

.action-item:hover {
  color: var(--primary);
}

.action-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.action-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background: var(--danger);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  line-height: 1;
  padding: 0 4px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.35);
}

.header-chat-action .action-badge {
  top: -7px;
  right: -9px;
}

.btn-login {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.btn-register-header {
  background: #EFF6FF;
  color: #186AFF;
  font-weight: 600;
  font-size: 14.5px;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-register-header:hover {
  background: #DBEAFE;
  color: #0D57E1;
  transform: translateY(-1px);
}

.btn-post-ad {
  background: var(--success);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-post-ad:hover {
  background: #2da049;
  transform: translateY(-1px);
}

/* City Selection Modal */
.city-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.city-modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 480px;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  position: relative;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.city-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 14.5px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

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

.city-item-btn.selected {
  background: rgba(24, 106, 255, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.city-icon-pill {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  background: #F1F5F9;
  color: #64748B;
  transition: all 0.15s;
  flex-shrink: 0;
}

.city-item-btn:hover .city-icon-pill {
  background: #E2E8F0;
  color: var(--primary);
}

.city-item-btn.selected .city-icon-pill {
  background: var(--primary);
  color: #FFFFFF;
}

/* Category Grid — 1:1 with Next.js CategoriesGrid / Screenshot 1 */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0 28px;
}

@media (min-width: 480px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
}

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

@media (min-width: 1024px) {
  .category-grid { grid-template-columns: repeat(6, 1fr); }
}

.cat-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #F0F0F0;
  min-height: 98px;
  height: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-decoration: none;
  border: none;
  transition: background 0.15s ease;
  box-sizing: border-box;
}

.cat-card:hover {
  background: #E2E8F0;
  transform: none !important;
  box-shadow: none !important;
}

.cat-text {
  z-index: 2;
  display: flex;
  flex-direction: column;
  padding-right: 22px;
}

.cat-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main, #1E293B);
  line-height: 1.25;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  word-break: break-word;
  transition: color 0.15s ease;
}

.cat-sub-line {
  font-size: 11px;
  color: #64748B;
  line-height: 1.35;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.cat-sub-line-1 {
  color: #64748B;
}

.cat-sub-line-2 {
  color: #94A3B8;
}

.cat-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 1;
  width: auto;
  height: auto;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #64748B;
  opacity: 0.35;
}

.cat-card:hover .cat-title {
  color: var(--primary, #F97316);
}

.cat-card:hover .cat-sub-line-1 {
  color: #334155;
}

.cat-card:hover .cat-sub-line-2 {
  color: #64748B;
}

.cat-card:hover .cat-icon {
  color: var(--primary, #F97316);
  opacity: 0.65;
}

/* Product Grid — 5 columns on homepage, 4 columns inside catalog with filter */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0; /* Карточки прилипают друг к другу впритык без отступов */
  margin: 16px 0 32px;
}

@media (min-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 860px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1150px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr); /* 5 объявлений в одной строке на главной */
  }
}

/* Внутри каталога и страницы компании: 4 карточки с фильтром, 5 при свёрнутом фильтре */
#catalogContentCol .products-grid,
#orgContentCol .products-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 576px) {
  #catalogContentCol .products-grid,
  #orgContentCol .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 860px) {
  #catalogContentCol .products-grid,
  #orgContentCol .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1150px) {
  #catalogContentCol .products-grid,
  #orgContentCol .products-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 карточки + боковой фильтр */
  }

  #catalogContentCol.filters-collapsed .products-grid,
  #orgContentCol.filters-collapsed .products-grid {
    grid-template-columns: repeat(5, 1fr); /* 5 карточек на всю ширину при свёрнутом фильтре */
  }
}

.product-card {
  background: #FFFFFF;
  border: none !important;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background 0.15s ease;
  position: relative;
  padding: 8px;
  box-shadow: none !important;
  cursor: pointer;
  text-decoration: none;
  transform: none !important; /* Убрано любое смещение и прыжки */
}

.product-card:hover {
  transform: none !important; /* Убрано сдвигание карточки */
  background: rgba(0, 0, 0, 0.03);
  box-shadow: none !important;
}

.product-card.vip {
  border: none !important;
  background: #FFFDEE !important;
}

.product-card.vip:hover {
  transform: none !important;
  background: #FFF9C4 !important;
}

.list-view-card {
  transform: none !important;
  transition: background 0.15s ease;
  background: #FFFFFF;
}

.list-view-card:hover {
  transform: none !important;
  background: rgba(0, 0, 0, 0.02) !important;
}

.list-view-card.vip {
  background: #FFFDEE !important;
}

.list-view-card.vip:hover {
  background: #FFF9C4 !important;
}

.list-view-card:last-child {
  border-bottom: none !important;
}

.product-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #F1F5F9;
  cursor: pointer;
  user-select: none;
}

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.gallery-img-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.08s ease;
  pointer-events: none;
}

.gallery-img-layer.active {
  opacity: 1;
  z-index: 2;
}

/* Badges positioned at bottom-left of photo (Screenshots 1 & 2) */
.product-badges-bottom {
  position: absolute;
  bottom: 12px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
  pointer-events: none;
}

.badge-pill-card {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  padding: 2.5px 7px;
  border-radius: 6px;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

.badge-pill-card.badge-urgent { background: #EF4444; }
.badge-pill-card.badge-delivery { background: #186AFF; }
.badge-pill-card.badge-new { background: #059669; }
.badge-pill-card.badge-booking { background: #9333EA; }
.badge-pill-card.badge-vip { background: #F59E0B; }
.badge-pill-card.badge-event { background: #7C3AED; }

/* Photo overlay badges on Detail Page (like Kufar) */
.detail-photo-badges {
  position: absolute;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 15;
  pointer-events: none;
  max-width: 280px;
}
.detail-photo-badges .badge-pill-card {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3.5px 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
@media (max-width: 768px) {
  .detail-photo-badges {
    bottom: 12px;
    left: 12px;
    gap: 4px;
    max-width: calc(100% - 60px);
  }
}

/* Multi-photo Hover Pagination Lines (Screenshot 2: sharp 90-deg angles) */
.gallery-pagination-lines {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  gap: 3px;
  z-index: 7;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.product-card:hover .gallery-pagination-lines,
.list-view-card:hover .gallery-pagination-lines {
  opacity: 1;
}

.gallery-line {
  flex: 1;
  height: 3px;
  border-radius: 0 !important; /* Острые прямые углы по запросу пользователя */
  background: rgba(255, 255, 255, 0.65);
  transition: background 0.1s ease;
}

.gallery-line.active {
  background: #111827 !important;
}

/* Card Action Buttons: Compare & Favorite */
.card-action-btns {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 10;
}

.btn-card-action {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
}

.btn-card-action:hover {
  transform: scale(1.08);
}

.btn-card-action.fav-btn:hover {
  color: #EF4444;
}

.btn-card-action.fav-btn.active {
  background: #EF4444 !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
}

.btn-card-action.compare-btn:hover {
  color: #186AFF;
}

.btn-card-action.compare-btn.active {
  background: #186AFF !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.product-info {
  padding: 8px 4px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.product-price {
  font-size: 17px;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.product-pub-time {
  font-size: 12px;
  color: #94A3B8;
  font-weight: 500;
  white-space: nowrap;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  line-height: 1.54;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 3.35em;
  padding: 2px 0;
  text-decoration: none;
  margin-top: 2px;
  transition: color 0.15s ease;
}

.product-card:hover .product-title,
.product-card:hover .product-title .title-highlight,
.list-view-card:hover .list-card-title,
.list-view-card:hover .list-card-title .title-highlight {
  color: #186AFF;
}

.title-highlight {
  background-color: #FFF3B9;
  padding: 2px 8px;
  border-radius: 8px;
  line-height: 1.44;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  display: inline;
  transition: color 0.15s ease;
}

.product-bottom-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.product-city-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  width: 100%;
}

.product-city-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.product-seller-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  margin-right: 6px;
  white-space: nowrap;
}

.seller-name-text {
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-verified-badge {
  color: #36B555;
  font-size: 11px;
  line-height: 1;
  width: 13px;
  height: 13px;
  margin-left: 0;
  padding-right: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: content-box;
}

.seller-avatar-small {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
}

.seller-name {
  font-size: 12px;
  color: #64748B;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seller-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid #E2E8F0;
}

/* Shorts */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin: 16px 0;
}

@media (max-width: 900px) {
  .shorts-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .shorts-grid { grid-template-columns: repeat(2, 1fr); }
}

.short-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: block;
}

.short-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s;
}

.short-card:hover .short-bg {
  transform: scale(1.05);
}

.short-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
}

.short-views {
  background: var(--danger);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.short-play-icon {
  align-self: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.short-title {
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

/* Section Header */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
  gap: 12px;
  min-width: 0;
}

.section-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.section-link-mobile {
  display: none;
}

/* Footer Unified Background (#F2F2F2 matching screenshot reference) */
.footer-unified-bg {
  background: #F2F2F2 !important;
  border-top: 1px solid #E5E7EB;
  width: 100%;
  margin-top: 48px;
  clear: both;
}

/* Footer */
.footer {
  background: #F2F2F2 !important;
  border-top: 1px solid #E5E7EB;
  padding: 44px 0 24px;
  margin-top: 48px;
  clear: both;
  position: relative;
  z-index: 10;
}

/* When preceded by footer-unified-bg, remove gap between sections */
.footer-unified-bg + .footer,
main:has(.footer-unified-bg) + .footer,
body:has(.footer-unified-bg) .footer {
  margin-top: 0 !important;
  border-top: 1px solid #E5E7EB !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer-col-title {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13.5px;
  color: #4B5563;
}

.footer-links a {
  color: #4B5563;
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid #E5E7EB;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: #64748B;
}

/* Mobile Nav */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  z-index: 5000;
  padding: 6px 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  will-change: transform;
}

.mobile-nav.mobile-nav-hidden {
  transform: translateY(110%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  gap: 3px;
  text-decoration: none;
  flex: 1;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.mobile-nav-item i {
  font-size: 19px;
}

.mobile-nav-item.active {
  color: var(--primary);
}

/* =========================================================================
   Адаптивность шапки и интерфейса: Ноутбуки (1025-1240px), Планшеты (769-1024px), Смартфоны (<= 768px)
   ========================================================================= */

/* 1. Ноутбуки и небольшие мониторы (1025px - 1240px) */
@media (min-width: 1025px) and (max-width: 1240px) {
  .header-actions {
    gap: 10px !important;
  }
  .action-label {
    display: none !important;
  }
  .action-item {
    font-size: 16px !important;
    padding: 2px 4px !important;
  }
  .btn-post-ad {
    padding: 0 14px !important;
    font-size: 14px !important;
  }
  .btn-post-text-full {
    display: none !important;
  }
  .btn-post-text-short {
    display: inline !important;
  }
  .btn-catalog {
    padding: 0 14px !important;
  }
  .btn-register-header {
    display: none !important;
  }
}

/* 2. Планшетная версия (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* Шапка Top на планшете: убираем лишние второстепенные ссылки */
  .header-top-links a:nth-child(n+2) {
    display: none !important;
  }

  /* Шапка Main на планшете: Ряд 1 (Лого + Каталог слева, действия + "+ Подать" справа) */
  .header-main {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px 14px !important;
    padding: 10px 16px !important;
  }
  .header-main-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    order: 1 !important;
  }
  .btn-catalog {
    display: inline-flex !important;
    height: 40px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
  }
  .header-actions {
    order: 2 !important;
    margin-left: auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
  .action-label {
    display: none !important;
  }
  .action-item {
    font-size: 17px !important;
    padding: 2px !important;
  }
  .btn-login {
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 13.5px !important;
  }
  .btn-post-ad {
    display: inline-flex !important;
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 13.5px !important;
    white-space: nowrap !important;
  }
  .btn-post-text-full {
    display: none !important;
  }
  .btn-post-text-short {
    display: inline !important;
  }

  /* Ряд 2: Поисковая строка на 100% ширины, никогда не сжимается и не выдавливает кнопки */
  .search-container {
    order: 3 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 2px !important;
    height: 42px !important;
  }
  .search-input {
    height: 42px !important;
    font-size: 14px !important;
  }
  .search-btn {
    height: 42px !important;
    padding: 0 20px !important;
    font-size: 14px !important;
  }
}

/* 3. Мобильная версия (<= 768px) */
@media (max-width: 768px) {
  /* Нижняя панель навигации */
  .mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 56px;
    box-sizing: border-box;
  }
  body {
    padding-bottom: 60px;
  }

  /* Верхняя полоса на мобильном: Город слева, Валюта справа */
  .header-top {
    padding: 6px 0 !important;
  }
  .header-top-sep,
  .header-safedeal-top,
  .header-top-links {
    display: none !important;
  }
  .header-top-container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 14px !important;
  }
  .header-city-btn {
    font-size: 13px !important;
    max-width: 175px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .header-city-btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #currDropdownWrap .header-dropdown-toggle {
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
  }

  /* Главный ряд шапки на мобильном: Ряд 1 (Лого + Кнопка Каталог слева, Сравнение/Избранное/Войти справа), Ряд 2 (Поиск 100%) */
  .header-main {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px 10px !important;
    padding: 8px 12px 10px !important;
  }
  .header-main-left {
    order: 1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }
  .logo-wrapper {
    flex-shrink: 0 !important;
  }
  .header-logo-svg {
    height: 27px !important;
    width: auto !important;
  }
  .btn-catalog {
    display: inline-flex !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
    gap: 6px !important;
  }
  .btn-catalog-text {
    display: inline !important;
  }
  .header-actions {
    order: 2 !important;
    margin-left: auto !important;
    gap: 10px !important;
    align-items: center !important;
  }
  .header-chat-action,
  .header-post-btn,
  .btn-register-header {
    display: none !important;
  }
  .action-label {
    display: none !important;
  }
  .action-item {
    font-size: 18px !important;
    padding: 4px !important;
  }
  .action-badge {
    top: -6px !important;
    right: -9px !important;
    font-size: 9.5px !important;
    min-width: 15px !important;
    height: 15px !important;
    line-height: 15px !important;
  }
  .header-chat-action .action-badge {
    top: -6px !important;
    right: -7px !important;
  }
  .btn-login {
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
    gap: 6px !important;
  }
  .header-user-info {
    display: none !important;
  }
  .header-user-card {
    padding: 2px !important;
    border: none !important;
    background: transparent !important;
  }

  /* Полноширинный поиск на мобильном Ряд 2 */
  .search-container {
    order: 3 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    margin-top: 4px !important;
    height: 40px !important;
  }
  .search-input {
    height: 40px !important;
    font-size: 13.5px !important;
    padding: 0 12px !important;
  }
  .search-btn {
    height: 40px !important;
    padding: 0 16px !important;
    font-size: 13.5px !important;
  }

  /* Заголовки разделов на мобильном: строго в одну строку */
  .section-head {
    margin: 20px 0 10px !important;
    gap: 8px !important;
  }
  .section-title {
    font-size: 16.5px !important;
  }
  .section-link-desktop {
    display: none !important;
  }
  .section-link-mobile {
    display: inline !important;
  }
  .section-link {
    font-size: 13px !important;
  }

  /* Подвал на мобильном */
  .footer-bottom {
    flex-direction: column-reverse !important;
    align-items: center !important;
    text-align: center !important;
    gap: 14px !important;
    padding-top: 16px !important;
    padding-bottom: 20px !important;
  }
  .footer-copyright {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
  }

  /* Catalog Top Toolbar on Mobile */
  .catalog-top-toolbar {
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  #toolbarFiltersSlot {
    width: auto !important;
  }
  #toggleFiltersBtn {
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }
  #topSortSelect {
    width: 130px !important;
    max-width: 42vw !important;
  }
  #topSortSelect .custom-select-trigger {
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    border-radius: 10px !important;
  }
  .view-switcher-capsule {
    padding: 2px !important;
    border-radius: 10px !important;
  }
  .view-switcher-capsule .switcher-btn {
    padding: 5px 8px !important;
  }
  #catalogMainGrid,
  #mapThreePaneGrid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  #catalogFiltersCol,
  #mapFiltersCol {
    display: none;
    width: 100% !important;
  }
  #mapCombinedBlock {
    height: 520px !important;
    min-height: 520px !important;
    max-height: 520px !important;
    position: relative !important;
  }
  #mapAdsCol {
    display: none;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    z-index: 999 !important;
    background: #FFFFFF !important;
  }
  #mapAdsCol.mobile-open {
    display: flex !important;
  }
}

/* View Mode Switcher (1:1 with Next.js CategoryPageClient) */
.view-switcher-capsule {
  display: inline-flex;
  align-items: center;
  background: #F7F8FA;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.view-switcher-capsule .switcher-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 32px;
  border-radius: 8px;
  color: #94A3B8;
  text-decoration: none;
  transition: all 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
}

.view-switcher-capsule .switcher-btn:hover {
  color: #475569;
}

.view-switcher-capsule .switcher-btn.active {
  background: #FFFFFF;
  color: #186AFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Header Language & Currency Floating Menus (Screenshot 2) */
.header-dropdown-wrap {
  position: relative;
}

.header-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.header-dropdown-toggle:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.03);
}

.header-dropdown-toggle i.chevron {
  font-size: 10px;
  transition: transform 0.2s ease;
}

.header-dropdown-wrap.open .header-dropdown-toggle i.chevron {
  transform: rotate(180deg);
}

.header-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 8px;
  min-width: 175px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  border: 1px solid #F1F5F9;
  z-index: 1050;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.header-dropdown-wrap.open .header-dropdown-menu {
  display: flex;
}

.header-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: #1E293B;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.header-dropdown-item:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.header-dropdown-item.active {
  background: rgba(24, 106, 255, 0.08);
  color: #186AFF;
  font-weight: 600;
}

.header-dropdown-item.active .item-check {
  color: #186AFF;
  font-size: 12px;
}

/* Seller Rating Digit 5: Deep Black per request */
.seller-rating-val,
.rating-num-5 {
  color: #111827 !important;
  font-weight: 800 !important;
}

/* City Modal Backdrop Explicit Display Support */
.city-modal-backdrop.open {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* ==========================================================================
   CUSTOM FILTER SELECT DROPDOWNS (Screenshots 1 & 2)
   ========================================================================== */
.custom-select-wrap {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-wrap.open {
  z-index: 99999 !important;
}

.custom-select-trigger {
  width: 100%;
  height: 42px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.custom-select-trigger:hover {
  border-color: #CBD5E1;
  background: #F8FAFC;
}

.custom-select-wrap.open .custom-select-trigger {
  border-color: #186AFF;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(24, 106, 255, 0.12);
}

.custom-select-trigger .trigger-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.custom-select-trigger .trigger-chevron {
  font-size: 11px;
  color: #64748B;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.custom-select-wrap.open .custom-select-trigger .trigger-chevron {
  transform: rotate(180deg);
  color: #186AFF;
}

.custom-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 2147483647 !important;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16), 0 4px 10px rgba(15, 23, 42, 0.06);
  padding: 6px 8px;
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
  animation: dropdownFadeIn 0.15s ease-out;
}

.custom-select-dropdown.bm-portal-dropdown {
  display: block !important;
  position: fixed !important;
  right: auto !important;
  z-index: 2147483647 !important;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22), 0 4px 14px rgba(15, 23, 42, 0.08);
}

.custom-select-dropdown::-webkit-scrollbar {
  width: 5px;
}
.custom-select-dropdown::-webkit-scrollbar-track {
  background: transparent;
}
.custom-select-dropdown::-webkit-scrollbar-thumb {
  background-color: #CBD5E1;
  border-radius: 10px;
}

.custom-select-wrap.open .custom-select-dropdown {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #1E293B;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  user-select: none;
}

.custom-select-item:hover {
  background: #F8FAFC;
  color: #0F172A;
}

.custom-select-item.active {
  background: rgba(24, 106, 255, 0.08);
  color: #186AFF;
  font-weight: 700;
}

.custom-select-item .item-check-icon {
  display: none;
  font-size: 12px;
  color: #186AFF;
}

.custom-select-item.active .item-check-icon {
  display: inline-block;
}

/* ==========================================================================
   SUBCATEGORIES PILL ROW (Screenshot 3)
   ========================================================================== */
.subcat-chips-section {
  margin-bottom: 20px;
}

.subcat-chips-heading {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 14px 0;
  letter-spacing: -0.02em;
}

.subcat-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding-bottom: 4px;
}

.subcat-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 9999px;
  background: #F1F5F9;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

.subcat-chip:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.subcat-chip.active {
  background: #186AFF;
  color: #FFFFFF;
  border-color: #186AFF;
}

.subcat-chip-showall {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: 9999px;
  background: #FFFFFF;
  color: #186AFF;
  border: 1.5px solid #186AFF;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.subcat-chip-showall:hover {
  background: rgba(24, 106, 255, 0.06);
}

/* ==========================================================================
   ACTIVE FILTER TAGS / CHIPS
   ========================================================================== */
.active-filters-bar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 9999px;
  color: #1D4ED8;
  font-size: 12.5px;
  font-weight: 600;
}

.filter-tag-chip .filter-tag-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: #3B82F6;
  font-size: 11px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.filter-tag-chip .filter-tag-remove:hover {
  color: #1D4ED8;
}

.filter-tag-reset {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  color: #EF4444;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.filter-tag-reset:hover {
  background: #FEE2E2;
}

.filter-tag-reset-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #EF4444;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.filter-tag-reset-compact:hover {
  background: #FECACA;
  color: #DC2626;
  transform: scale(1.08);
}

/* ==========================================================================
   MAP MARKERS & PRICE BUBBLES (Screenshots 1, 3, 4, 5)
   ========================================================================== */
.leaflet-custom-marker-wrapper {
  background: transparent !important;
  border: none !important;
  pointer-events: none !important;
}

.custom-map-marker-pin {
  position: relative;
  width: 120px;
  height: 56px;
  margin: 0 auto;
  user-select: none;
  pointer-events: none !important;
  transform: none !important;
}

.custom-map-marker-pin:hover {
  transform: none !important;
}

/* Price Speech Bubble (Manrope font, 8px rounding, seamless arrow, NO colored glow) */
.map-price-bubble {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 11px;
  border-radius: 10px;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: auto !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  z-index: 10;
  transition: opacity 0.2s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.map-pin-dot-wrap {
  pointer-events: auto !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

/* Указатель-треугольник, точно встык примыкающий к кружочку */
.map-price-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid transparent;
  margin-top: 0;
  z-index: 12;
}

/* Blue bubble for standard ads */
.map-price-bubble.blue {
  background: #186AFF;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(24, 106, 255, 0.28);
}
.map-price-bubble.blue::after {
  border-top-color: #186AFF;
}

/* Yellow / Orange bubble for VIP & Premium ads */
.map-price-bubble.yellow,
.map-price-bubble.vip,
.map-price-bubble.premium {
  background: #F59E0B;
  color: #111827;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.map-price-bubble.yellow::after,
.map-price-bubble.vip::after,
.map-price-bubble.premium::after {
  border-top-color: #F59E0B;
}

/* When map zoom < 11 or user hides prices, hide bubbles cleanly */
.map-zoom-low .map-price-bubble,
.map-hide-prices .map-price-bubble {
  display: none !important;
}

.leaflet-custom-marker-wrapper {
  background: transparent !important;
  border: none !important;
}

/* Circular Marker Pins - Чистые кружочки с белой каймой БЕЗ точки в центре */
.map-pin-standard,
.map-pin-premium,
.map-pin-vip {
  box-sizing: border-box !important;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  margin: 0 auto;
  border: 2px solid #FFFFFF !important;
  transform: none !important;
}

.map-pin-standard:hover,
.map-pin-premium:hover,
.map-pin-vip:hover {
  transform: none !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.38);
}

/* Синий кружочек с белой линией */
.map-pin-standard {
  background: #186AFF !important;
}

/* Жёлтый кружочек с белой линией */
.map-pin-premium,
.map-pin-vip {
  background: #F59E0B !important;
}

/* Удаление точек в центре кружочков */
.map-pin-standard .inner-dot,
.map-pin-premium .inner-dot,
.map-pin-vip .inner-dot {
  display: none !important;
}

/* Badge for building cluster with multiple ads: white circle with number */
.cluster-badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 3px;
  border-radius: 9px;
  background: #FFFFFF;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  margin-right: 5px;
  line-height: 1;
  box-sizing: border-box;
}

/* Custom Leaflet popup override (clean white, visible overflow for external close button) */
.leaflet-popup,
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18) !important;
  padding: 0 !important;
  overflow: visible !important;
  background: #FFFFFF !important;
  cursor: grab;
}

.leaflet-popup-content-wrapper:active {
  cursor: grabbing;
}

.leaflet-popup.vip-leaflet-popup .leaflet-popup-content-wrapper,
.leaflet-popup.vip-leaflet-popup .leaflet-popup-tip {
  background: #FFFDEE !important;
}

.leaflet-popup {
  margin-bottom: 10px !important;
}

.leaflet-popup-tip-container {
  width: 20px !important;
  height: 10px !important;
  position: absolute !important;
  left: 50% !important;
  bottom: -10px !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  z-index: 10 !important;
}

.leaflet-popup-tip {
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
  position: absolute !important;
  left: 50% !important;
  top: -7px !important;
  transform: translateX(-50%) rotate(45deg) !important;
  background: #FFFFFF !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16) !important;
  box-sizing: border-box !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  line-height: inherit !important;
  width: auto !important;
}

.leaflet-bar,
.leaflet-touch .leaflet-bar {
  border: none !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14) !important;
  border-radius: 12px !important;
  overflow: hidden;
}
.leaflet-bar a,
.leaflet-touch .leaflet-bar a {
  border: none !important;
  border-bottom: 1px solid #F1F5F9 !important;
}
.leaflet-bar a:last-child,
.leaflet-touch .leaflet-bar a:last-child {
  border-bottom: none !important;
}

/* External Close Button: sits outside overlapping top-right corner, 32px identical to favorite/compare buttons */
.leaflet-popup-close-button {
  top: -12px !important;
  right: -12px !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16) !important;
  border: 1px solid #E2E8F0 !important;
  z-index: 1000 !important;
  font-size: 0 !important;
  color: transparent !important;
  text-decoration: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  transform: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.leaflet-popup-close-button span {
  display: none !important;
}
.leaflet-popup-close-button::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  background-color: #475569;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: background-color 0.15s ease;
}
.leaflet-popup-close-button:hover {
  background: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
  transform: none !important;
}
.leaflet-popup-close-button:hover::after {
  background-color: #0F172A;
}
.leaflet-popup-close-button:active {
  background: #E2E8F0 !important;
  transform: none !important;
}

/* Hide price bubble when popup card is opened on marker so the card docks directly to the circle pin */
.leaflet-custom-marker-wrapper.popup-active .map-price-bubble {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Cluster multi-ad container and slider styles (Full cards with switcher, no vertical cut-off) */
.cluster-popup-container {
  width: 290px !important;
  min-width: 290px !important;
  max-width: 290px !important;
  box-sizing: border-box !important;
  background: #FFFFFF !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.cluster-popup-header {
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 22px 0 12px !important;
  border-bottom: 1.5px solid #F1F5F9 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  background: #F8FAFC !important;
  box-sizing: border-box !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.cluster-popup-title {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  color: #1E293B !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  line-height: 1 !important;
  letter-spacing: -0.01em !important;
}
.cluster-popup-title span {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 800 !important;
  font-size: 13px !important;
  color: #1E293B !important;
}
.cluster-popup-nav {
  display: flex !important;
  align-items: center !important;
  gap: 2px !important;
  margin-right: 6px !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.cluster-nav-btn {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  border-radius: 7px !important;
  border: 1px solid #CBD5E1 !important;
  background: #FFFFFF !important;
  color: #475569 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 10px !important;
  padding: 0 !important;
  transition: all 0.15s ease !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}
.cluster-nav-btn:hover {
  background: #186AFF !important;
  color: #FFFFFF !important;
  border-color: #186AFF !important;
}
.cluster-counter-badge {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #475569 !important;
  padding: 0 4px !important;
  margin: 0 2px !important;
  text-align: center !important;
  line-height: 1 !important;
  user-select: none !important;
}
.cluster-slides-wrap {
  width: 100% !important;
  box-sizing: border-box !important;
}
.cluster-slide {
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Elegant Violet styling for Fullscreen map button */
.map-fullscreen-btn {
  pointer-events: auto;
  background: #F5F3FF !important;
  border: 1.5px solid #DDD6FE !important;
  border-radius: 12px !important;
  height: 40px !important;
  padding: 0 14px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #7C3AED !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.12) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}
.map-fullscreen-btn i {
  color: #7C3AED !important;
  font-size: 13px;
  transition: color 0.15s ease;
}
.map-fullscreen-btn:hover {
  background: #7C3AED !important;
  color: #FFFFFF !important;
  border-color: #7C3AED !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.25) !important;
}
.map-fullscreen-btn:hover i {
  color: #FFFFFF !important;
}

/* Utilities: No Scrollbars (Screenshot 2) */
.no-scrollbar {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Fullscreen Map Overlay (Screenshot 3) */
.map-fullscreen-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  background: #FFFFFF !important;
  border-radius: 0 !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

.map-fullscreen-overlay #mapCombinedBlock {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  display: flex !important;
}

.map-fullscreen-overlay #mapAdsCol {
  height: 100vh !important;
  min-height: 100vh !important;
  max-height: 100vh !important;
  width: 360px !important;
  flex-shrink: 0 !important;
}

.map-fullscreen-overlay #mapAdsScrollContainer {
  height: calc(100vh - 52px) !important;
}

.map-fullscreen-overlay #mapCanvasCol {
  height: 100vh !important;
  flex: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
}

.map-fullscreen-overlay #catalogMap {
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
}

/* Map Button Text Responsive Toggling */
.map-btn-text-short {
  display: none;
}
@media (max-width: 768px) {
  .map-btn-text-full {
    display: none !important;
  }
  .map-btn-text-short {
    display: inline !important;
  }
  .map-fullscreen-overlay #mapAdsCol {
    display: none;
    position: absolute !important;
    inset: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    z-index: 1001 !important;
  }
  .map-fullscreen-overlay #mapAdsCol.mobile-open {
    display: flex !important;
  }
}

/* Unified Floating Toolbar on Map */
.map-floating-toolbar {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.map-floating-toolbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}
.map-floating-toolbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
  z-index: 999;
}
.map-top-control-btn,
.map-search-area-btn {
  height: 38px;
  box-sizing: border-box;
  background: #FFFFFF;
  color: #1E293B;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 0 14px;
  border-radius: 12px;
  border: none !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  pointer-events: auto;
  transition: all 0.15s ease;
}
.map-top-control-btn:hover,
.map-search-area-btn:hover {
  background: #F8FAFC;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
}
.btn-label-mobile {
  display: none !important;
}
.btn-label-desktop {
  display: inline !important;
}

@media (max-width: 768px) {
  .map-floating-toolbar {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 5px;
  }
  .map-floating-toolbar-left,
  .map-floating-toolbar-center {
    gap: 4px;
  }
  .map-top-control-btn,
  .map-search-area-btn {
    height: 34px;
    padding: 0 9px;
    font-size: 11.5px;
    border-radius: 10px;
    gap: 4px;
  }
  .btn-label-desktop {
    display: none !important;
  }
  .btn-label-mobile {
    display: inline !important;
  }
}

/* Catalog List View Styles */
.list-view-card {
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  padding: 16px;
  display: flex;
  gap: 18px;
  transition: background 0.15s ease;
  position: relative;
}
.list-view-card:hover {
  background: #F8FAFC;
}
.list-card-img-wrap {
  width: 220px;
  height: 220px;
  min-width: 220px;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #F1F5F9;
}
.list-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 4px 6px;
}
.list-card-title-price {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
}
.list-card-title {
  font-size: 16.5px;
  font-weight: 600;
  color: #1E293B;
  text-decoration: none;
  line-height: 1.54;
  padding: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.15s ease;
}
.list-card-price {
  font-size: 19px;
  font-weight: 700;
  color: #111827 !important;
  white-space: nowrap;
}
.list-card-desc {
  font-size: 13.5px;
  color: #64748B;
  line-height: 1.5;
  margin: 0 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.list-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #F1F5F9;
  padding-top: 10px;
  font-size: 12px;
  color: #94A3B8;
}

@media (max-width: 768px) {
  .list-view-card {
    padding: 12px !important;
    gap: 12px !important;
  }
  .list-card-img-wrap {
    width: 110px !important;
    height: 110px !important;
    min-width: 110px !important;
    border-radius: 10px !important;
  }
  .list-card-title-price {
    flex-direction: column-reverse !important;
    align-items: flex-start !important;
    gap: 4px !important;
    margin-bottom: 4px !important;
  }
  .list-card-price {
    font-size: 16px !important;
  }
  .list-card-title {
    font-size: 13.5px !important;
    line-height: 1.3 !important;
  }
  .list-card-desc {
    display: none !important;
  }
  .list-card-footer {
    padding-top: 6px !important;
    font-size: 11px !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .list-view-card .product-badges-bottom {
    display: none !important;
  }
  .list-view-card .card-action-btns {
    top: 4px !important;
    right: 4px !important;
    gap: 4px !important;
  }
  .list-view-card .btn-card-action {
    width: 26px !important;
    height: 26px !important;
    font-size: 11px !important;
  }
}

/* Catalog Top Toolbar Z-Index Priority over Map */
.catalog-top-toolbar {
  position: relative;
  z-index: 1200 !important;
}

@media (max-width: 992px) {
  #toolbarFiltersSlot {
    width: auto !important;
  }
}

#catalogMap .leaflet-top,
#catalogMap .leaflet-bottom {
  z-index: 400 !important;
}

/* Leaflet Zoom Controls: separated buttons, soft shadow, no focus outline */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.leaflet-top.leaflet-right .leaflet-control-zoom {
  margin: 6px 14px 0 0 !important;
  flex-direction: row !important;
  gap: 8px !important;
}

.leaflet-control-zoom a,
.leaflet-control-zoom a:first-child,
.leaflet-control-zoom a:last-child {
  width: 36px !important;
  height: 36px !important;
  line-height: 34px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #1E293B !important;
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.15s ease !important;
  margin: 0 !important;
}

.leaflet-control-zoom a:focus,
.leaflet-control-zoom a:active {
  outline: none !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.15) !important;
}

.leaflet-control-zoom a:hover,
.leaflet-control-zoom a:first-child:hover,
.leaflet-control-zoom a:last-child:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #186AFF !important;
}

/* Hide scrollbar completely on mapAdsScrollContainer while preserving smooth scrolling */
#mapAdsScrollContainer {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

#mapAdsScrollContainer::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Map List Item Active Selection: мягкий фон без кислотных рамок */
.map-list-card {
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.15s ease;
}
.map-list-card:hover {
  background: #F8FAFC;
}
.map-list-card.selected {
  background: #EFF6FF !important;
  box-shadow: inset 3px 0 0 #186AFF !important;
}
.map-list-card.vip-card {
  background: #FFFDEE !important;
}
.map-list-card.vip-card:hover {
  background: #FFF9C4 !important;
}
.map-list-card.vip-card.selected {
  background: #FFF9C4 !important;
  box-shadow: inset 3px 0 0 #F59E0B !important;
}
.map-list-card:hover .map-list-card-title,
.map-list-card.selected .map-list-card-title {
  color: #186AFF !important;
}

/* Map Popup Card */
.map-popup-ad-card {
  width: 290px !important;
  min-width: 290px !important;
  max-width: 290px !important;
  box-sizing: border-box !important;
  background: #FFFFFF !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.cluster-popup-container .map-popup-ad-card {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  border-radius: 0 0 16px 16px !important;
  box-shadow: none !important;
}

.map-popup-ad-card.vip-popup {
  background: #FFFFFF !important;
  border: none !important;
}

.map-popup-thumb-wrap {
  position: relative !important;
  width: 100% !important;
  height: 155px !important;
  min-height: 155px !important;
  max-height: 155px !important;
  background: #F1F5F9 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.map-popup-thumb-img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}
.map-popup-actions-top {
  position: absolute !important;
  top: 12px !important;
  right: 18px !important;
  display: flex !important;
  gap: 6px !important;
  z-index: 5 !important;
}
.map-popup-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(4px) !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: #1E293B !important;
  font-size: 13px !important;
  transition: all 0.15s ease !important;
}
.map-popup-btn:hover {
  background: #FFFFFF !important;
  color: #186AFF !important;
  transform: scale(1.06) !important;
}
.map-popup-body {
  padding: 12px 14px 14px !important;
  box-sizing: border-box !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  display: flex !important;
  flex-direction: column !important;
}
.map-popup-header-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  margin-bottom: 6px !important;
  box-sizing: border-box !important;
}
.map-popup-price {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #111827 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 170px !important;
}
.map-popup-time {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 11px !important;
  color: #94A3B8 !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}
.map-popup-title,
.map-popup-title:visited {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  line-height: 1.35 !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #1E293B !important;
  text-decoration: none !important;
  margin-bottom: 8px !important;
  box-sizing: border-box !important;
  word-break: break-word !important;
  transition: color 0.15s ease !important;
}
.map-popup-title:hover {
  color: #186AFF !important;
}
.map-popup-footer-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  height: 24px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 11.5px !important;
  color: #64748B !important;
  margin-top: 4px !important;
  padding-top: 6px !important;
  border-top: 1px solid #F1F5F9 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.map-popup-city {
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  max-width: 130px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.map-popup-city span {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.map-popup-author {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  max-width: 120px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.map-popup-author-avatar {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}
.map-popup-author-name {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.map-popup-view-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  box-sizing: border-box !important;
  background: #186AFF !important;
  color: #FFFFFF !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 10px !important;
  text-decoration: none !important;
  margin-top: 10px !important;
  transition: background 0.15s ease !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
}
.map-popup-view-btn:hover {
  background: #0D57E1 !important;
  color: #FFFFFF !important;
}

/* Badges on bottom-left of map popup photo (matching user screenshot) */
.map-popup-badges-bottom {
  position: absolute !important;
  bottom: 8px !important;
  left: 8px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
  z-index: 5 !important;
  pointer-events: none !important;
}
.map-popup-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 2px 7px !important;
  border-radius: 6px !important;
  color: #FFFFFF !important;
  line-height: 1.2 !important;
}
.map-popup-badge.badge-urgent {
  background: #EF4444 !important;
}
.map-popup-badge.badge-delivery {
  background: #186AFF !important;
}
.map-popup-badge.badge-new {
  background: #10B981;
}
.map-popup-badge.badge-booking {
  background: #9333EA;
}

/* ==========================================================================
   DETAIL PAGE RESPONSIVE & MODAL STYLES
   ========================================================================== */
.detail-container {
  max-width: 1368px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.detail-ad-title {
  font-size: 28px;
  font-weight: 900;
  color: #1E293B;
  line-height: 1.25;
  margin-bottom: 8px;
  word-break: break-word;
}

@media (max-width: 768px) {
  .detail-ad-title {
    font-size: 20px;
    line-height: 1.3;
  }
}

.detail-gallery-wrap {
  position: relative;
  margin-bottom: 28px;
  width: 100%;
}

.detail-gallery-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-radius: 20px;
  overflow: hidden;
  width: 100%;
}

@media (max-width: 768px) {
  .detail-gallery-row {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }
  .detail-gallery-row > div:not(:first-child) {
    display: none;
  }
  .detail-gallery-row > div:first-child {
    height: 250px !important;
  }
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
  width: 100%;
}

@media (max-width: 992px) {
  .detail-content-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

.detail-sidebar-col {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

@media (max-width: 992px) {
  .detail-sidebar-col {
    position: static;
    top: auto;
  }
}

.detail-characteristics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 40px;
}

@media (max-width: 640px) {
  .detail-characteristics-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Report & Bargain Modals */
.report-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.report-modal.open {
  display: flex !important;
}

.report-modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  box-sizing: border-box;
  animation: modalScaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   STORE CARDS (White background, no borders, soft grey highlight, no movement)
   ========================================================================== */
.stores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.store-card {
  background: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease, border-color 0.15s ease;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}

.store-card:hover {
  background: var(--bg-card, #FFFFFF);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.store-card-thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.72);
  padding: 0;
  background: #0F172A;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
  opacity: 0.88;
}

.store-card-thumb:hover,
.store-card-thumb.active {
  border-color: #FFFFFF;
  opacity: 1;
  transform: scale(1.06);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   NEWS SECTION (Separate individual cards, compact text-to-buttons gap)
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.news-card {
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  border: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.15s ease;
  position: relative;
  text-decoration: none;
  transform: none !important; /* Убрано любое перемещение и прыжки */
}

.news-card:hover {
  background: #F8FAFC;
  border: none !important;
  transform: none !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
}

.news-card-img-wrap {
  display: block;
  position: relative;
  height: 160px;
  width: 100%;
  overflow: hidden;
  text-decoration: none;
  background: #F1F5F9;
}

.news-card-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s ease;
}

.news-card-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

.news-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-meta-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #94A3B8;
  font-weight: 700;
  margin-bottom: 6px;
}

.news-title-link {
  text-decoration: none;
  color: #1E293B;
  transition: color 0.15s ease;
}

.news-title-link:hover {
  color: #186AFF;
}

.news-title-text {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  margin: 0 0 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-desc-text {
  font-size: 13px;
  color: #64748B;
  line-height: 1.45;
  margin: 0 0 10px 0; /* Компактный отступ строго до кнопок категорий */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-footer-row {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.news-cat-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.news-cat-pill-btn {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #F8FAFC;
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid #F1F5F9;
  transition: all 0.15s ease;
}

.news-cat-pill-btn:hover {
  background: #EFF6FF;
  color: #186AFF;
  border-color: #BFDBFE;
}

/* Afisha Event Count Badge and Active Filter Alert */
.afisha-event-count-badge {
  background: #EF4444;
  color: #FFFFFF;
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  line-height: 1.2;
  margin-top: 3px;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.35);
  display: inline-block;
}

.afisha-filter-alert {
  background: #FAF5FF;
  border: 1.5px solid #E9D5FF;
  border-left: 4px solid #7E22CE;
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.08);
}
.afisha-reset-link {
  font-size: 12.5px;
  font-weight: 700;
  color: #7E22CE;
  background: #FFFFFF;
  border: 1px solid #D8B4FE;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.afisha-reset-link:hover {
  background: #7E22CE;
  color: #FFFFFF;
}

/* ==========================================================================
   BayLando Promo Options Grid & Marker Cards (VIP, Premium, Срочно, Новый, В ТОП)
   ========================================================================== */
.promo-options-grid-5 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1200px) {
  .promo-options-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 768px) {
  .promo-options-grid-5 {
    display: flex !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    padding-bottom: 8px !important;
    scrollbar-width: thin !important;
  }
  .promo-options-grid-5 .promo-option-card {
    min-width: 175px !important;
    max-width: 210px !important;
    flex-shrink: 0 !important;
  }
}

.promo-option-card {
  background: #FFFFFF !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 12px !important;
  padding: 10px 8px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  user-select: none !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
  width: 100% !important;
}

.promo-option-card:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

.promo-option-card.checked {
  background: #EFF6FF !important;
  border-color: #186AFF !important;
  box-shadow: 0 2px 8px rgba(24, 106, 255, 0.12) !important;
}

.promo-option-card.checked-purple {
  background: #FAF5FF !important;
  border-color: #7E22CE !important;
  box-shadow: 0 2px 8px rgba(126, 34, 206, 0.15) !important;
}

.promo-checkbox {
  width: 16px !important;
  height: 16px !important;
  cursor: pointer !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}

.promo-checkbox.cb-purple:checked {
  border-color: #7E22CE !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.4L6.4 11.6L12.8 4.4' stroke='%237E22CE' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}

.promo-option-card .slider-container {
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 8px !important;
  padding: 4px 6px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

.custom-range-slider {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  height: 5px !important;
  border-radius: 9999px !important;
  background: #E2E8F0 !important;
  outline: none !important;
  transition: background 0.2s !important;
  margin: 3px 0 !important;
}

.custom-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: #186AFF !important;
  cursor: pointer !important;
  box-shadow: 0 1px 4px rgba(24, 106, 255, 0.4) !important;
  border: 2px solid #FFFFFF !important;
}

.custom-range-slider::-moz-range-thumb {
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: #186AFF !important;
  cursor: pointer !important;
  box-shadow: 0 1px 4px rgba(24, 106, 255, 0.4) !important;
  border: 2px solid #FFFFFF !important;
}

.custom-range-slider.range-purple::-webkit-slider-thumb {
  background: #7E22CE !important;
  box-shadow: 0 1px 4px rgba(126, 34, 206, 0.4) !important;
}

.custom-range-slider.range-purple::-moz-range-thumb {
  background: #7E22CE !important;
  box-shadow: 0 1px 4px rgba(126, 34, 206, 0.4) !important;
}

/* ==========================================================================
   CABINET CARDS VIEW MODES (LIST / GRID) & COLLAPSIBLE PROMO
   ========================================================================== */
.cabinet-cards-container {
  display: flex;
  flex-direction: column;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cabinet-cards-container .ad-cabinet-card,
.cabinet-cards-container .rental-card,
.cabinet-cards-container .event-card {
  border: none !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
  background: #FFFFFF !important;
  padding: 22px !important;
  transition: box-shadow 0.2s ease !important;
}

.cabinet-cards-container .ad-cabinet-card:hover,
.cabinet-cards-container .rental-card:hover,
.cabinet-cards-container .event-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
}

.cabinet-cards-container .ad-card-thumb-wrap {
  width: 220px !important;
  height: 160px !important;
  min-width: 220px !important;
  min-height: 160px !important;
  max-width: 220px !important;
  max-height: 160px !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  position: relative !important;
  background: #F1F5F9 !important;
  flex-shrink: 0 !important;
}

.cabinet-cards-container.mode-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
  gap: 24px !important;
}

.cabinet-cards-container.mode-grid .ad-cabinet-card,
.cabinet-cards-container.mode-grid .rental-card,
.cabinet-cards-container.mode-grid .event-card {
  display: flex !important;
  flex-direction: column !important;
  padding: 18px !important;
  border-radius: 18px !important;
  height: 100% !important;
  box-sizing: border-box !important;
}

.cabinet-cards-container.mode-grid .ad-card-top-flex,
.cabinet-cards-container.mode-grid .event-card-top-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

.cabinet-cards-container.mode-grid .ad-card-thumb-wrap {
  width: 100% !important;
  height: 190px !important;
  min-width: unset !important;
  min-height: unset !important;
  max-width: unset !important;
  max-height: unset !important;
  border-radius: 14px !important;
}

.card-expand-bar {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.04) 0%, rgba(245, 158, 11, 0.12) 100%);
  border: none !important;
  border-radius: 12px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #B45309;
  font-size: 13px;
  font-weight: 800;
  user-select: none;
  margin-top: 4px;
}

.card-expand-bar:hover {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.18) 100%);
  color: #92400E;
}

.card-expand-bar .expand-chevrons {
  font-size: 13px;
  letter-spacing: 2px;
  font-weight: 800;
  color: #D97706;
  display: inline-block;
  transition: transform 0.2s ease;
}

.card-expand-bar.is-expanded .expand-chevrons {
  color: #B45309;
}

.cabinet-cards-container.mode-grid .card-expand-body {
  display: none !important;
}

.promo-chevron-rotated {
  transform: rotate(180deg) !important;
}

/* Modern Thin Rounded Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #CBD5E1 transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Unified Cabinet Organization / Store Tabs */
.cabinet-org-tab-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 14px 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cabinet-org-tab-bar::-webkit-scrollbar {
  display: none;
}
.cabinet-org-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  background: #F8FAFC;
  color: #475569;
  border: 1.5px solid #E2E8F0;
  box-shadow: none !important;
}
.cabinet-org-tab:hover {
  background: #F1F5F9;
  color: #1E293B;
  border-color: #CBD5E1;
}
.cabinet-org-tab.active {
  background: #186AFF !important;
  color: #FFFFFF !important;
  border-color: #186AFF !important;
}
.cabinet-org-tab .org-tab-img {
  width: 20px;
  height: 20px;
  object-fit: cover;
  flex-shrink: 0;
}
.cabinet-org-tab .org-tab-img.rounded {
  border-radius: 50%;
}
.cabinet-org-tab .org-tab-img.store-logo {
  border-radius: 4px;
}

/* Card hover cursor */
.ad-cabinet-card,
.rental-card,
.event-card {
  cursor: pointer;
}

/* Clean outline checkboxes (no solid blue filled box) */
input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #CBD5E1;
  border-radius: 5px;
  background-color: #FFFFFF;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 78% 78%;
  cursor: pointer;
  vertical-align: middle;
  transition: border-color 0.15s ease, background-color 0.15s ease;
  box-sizing: border-box;
  flex-shrink: 0;
}
input[type="checkbox"]:hover {
  border-color: #94A3B8;
}
input[type="checkbox"]:checked {
  background-color: #FFFFFF !important;
  border-color: #186AFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.4L6.4 11.6L12.8 4.4' stroke='%23186AFF' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
input[type="checkbox"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ==========================================================================
   GLOBAL BUTTONS & FORM CONTROLS (Rounded BayLando Design, No Square Controls)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 12.5px;
}

.btn-primary {
  background: #186AFF;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(24, 106, 255, 0.2);
}
.btn-primary:hover {
  background: #0F55D6;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(24, 106, 255, 0.28);
}

.btn-success {
  background: #36B555;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(54, 181, 85, 0.2);
}
.btn-success:hover {
  background: #2DA049;
  color: #FFFFFF;
}

.btn-outline {
  background: #FFFFFF;
  color: #334155;
  box-shadow: inset 0 0 0 1px #E2E8F0, 0 1px 3px rgba(15, 23, 42, 0.04);
}
.btn-outline:hover {
  background: #F8FAFC;
  color: #186AFF;
  box-shadow: inset 0 0 0 1px #93C5FD, 0 2px 6px rgba(24, 106, 255, 0.08);
}

.btn-danger-soft {
  background: #FEF2F2;
  color: #DC2626;
}
.btn-danger-soft:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  background: #FFFFFF;
  font-family: inherit;
  font-size: 13.5px;
  color: #0F172A;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea.form-input,
.form-textarea {
  height: auto;
  padding: 11px 14px;
  line-height: 1.5;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #186AFF;
  box-shadow: 0 0 0 3px rgba(24, 106, 255, 0.12);
}

.form-input:disabled {
  background: #F8FAFC;
  color: #64748B;
  cursor: not-allowed;
}

/* Круглые кнопки шаринга в соцсети (товары и профиль продавца) */
.btn-share-round {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  color: #FFFFFF !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}
.btn-share-round:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.22);
}
.btn-share-li { background: #0A66C2; }
.btn-share-ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.btn-share-threads { background: #111827; }
.btn-share-tg { background: #24A1DE; }
.btn-share-viber { background: #7360F2; }
.btn-share-wa { background: #25D366; }
.btn-share-x { background: #0F172A; }
.btn-share-fb { background: #1877F2; }
.btn-share-vk { background: #0077FF; }
.btn-share-copy { background: #475569; }

/* Global Clean PDF Print Styles */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm 14mm;
  }
  html, body {
    overflow: visible !important;
    scrollbar-gutter: auto !important;
    background: #FFFFFF !important;
    color: #0F172A !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  header,
  .header,
  .header-top,
  .header-main,
  #catalogDropdown,
  #catalogBackdrop,
  .footer-unified-bg,
  .app-banner-card,
  .seo-tags-block,
  footer,
  .footer,
  .mobile-nav,
  #cityModal,
  #toastNotificationContainer,
  .no-print {
    display: none !important;
  }
  main {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* Procurement / RFQ Cards (Unified List & Grid Layout) */
.rfq-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 16px;
  align-items: stretch;
}
.rfq-card-box {
  width: 100%;
  box-sizing: border-box;
  background: #FFFFFF;
  border: none;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  min-width: 0;
}
.rfq-card-box:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.09);
}
.rfq-card-main-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  width: 100%;
}
.rfq-card-thumb-link {
  position: relative;
  width: 200px;
  height: 160px;
  min-width: 200px;
  border-radius: 14px;
  overflow: hidden;
  background: #F1F5F9;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.rfq-card-thumb-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.rfq-card-thumb-link:hover img {
  transform: scale(1.04);
}
.rfq-card-photo-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #FFFFFF;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  line-height: 1.25;
}
.rfq-card-body {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}
.rfq-card-head-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 6px;
}
.rfq-card-badges {
  display: flex;
  align-items: center;
  gap: 6px 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.rfq-card-budget-box {
  text-align: right;
  flex-shrink: 0;
  white-space: nowrap;
}
.rfq-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 6px 0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rfq-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}
.rfq-card-title a:hover {
  color: #186AFF;
}
.rfq-card-desc {
  font-size: 13.5px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rfq-card-footer {
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rfq-card-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #64748B;
  min-width: 0;
  flex: 1 1 auto;
}
.rfq-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.rfq-btn-soft {
  background: #F1F5F9;
  color: #1E293B;
  text-decoration: none;
  border-radius: 10px;
  height: 35px;
  padding: 0 13px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.rfq-btn-soft:hover {
  background: #E2E8F0;
}
.rfq-btn-blue-soft {
  background: #EFF6FF;
  color: #186AFF;
  text-decoration: none;
  border-radius: 10px;
  height: 35px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.rfq-btn-blue-soft:hover {
  background: #DBEAFE;
}
.rfq-btn-primary {
  background: #186AFF;
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 10px;
  height: 35px;
  padding: 0 15px;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.rfq-btn-primary:hover {
  background: #0E56DE;
}

/* Grid mode: place image banner across top so title/description always fill 100% card width */
.rfq-grid-wrap .rfq-card-main-row {
  flex-direction: column;
  gap: 12px;
}
.rfq-grid-wrap .rfq-card-thumb-link {
  width: 100%;
  height: 190px;
}
.rfq-grid-wrap .rfq-card-head-bar {
  align-items: flex-start;
  gap: 10px;
}
.rfq-grid-wrap .rfq-card-footer {
  gap: 10px;
}

@media (max-width: 760px) {
  .rfq-grid-wrap {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  .rfq-card-main-row {
    flex-direction: column;
  }
  .rfq-card-thumb-link {
    width: 100%;
    height: 150px;
  }
  .rfq-card-head-bar {
    flex-direction: column;
    gap: 6px;
  }
  .rfq-card-budget-box {
    text-align: left;
  }
}

