:root {
  --bg: #f7f8fa;
  --bg-soft: #f2f4f7;
  --card: #ffffff;
  --card-soft: #f8fafc;
  --card-soft-2: #eef4fb;
  --text: #1f2a37;
  --muted: #6b7280;
  --primary: #3d85c6;
  --primary-dark: #2f6ea6;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, .10);
  --radius: 22px;

  --event: #1f9d66;
  --restriction: #d64545;
  --service: #3d85c6;
  --zone: #d97706;
  --listing: #8b5cf6;
  --marketplace: #f59e0b;
  --job: #0f766e;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #fbfcfe 0%, var(--bg) 100%);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}



/* HEADER */

/* utility .hidden moved to components.css */

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 231, 235, .9);
}

.topbar-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #70ace0);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.brand-text {
  font-size: 20px;
  letter-spacing: -.02em;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-weight: 700;
}

.topnav a {
  position: relative;
  transition: .2s ease;
}

.topnav a:hover {
  color: var(--text);
}

.topnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
  transition: .2s ease;
}

.topnav a:hover::after {
  width: 100%;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

/* BUTTONS */

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  transition: .2s ease;
  white-space: nowrap;
}

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

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

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: #f9fafb;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card-soft-2);
  border: 1px solid #dce9f7;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
}

.bi {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meta-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* DISCOVER HERO */

.discover-page {
  padding-top: 18px;
  padding-bottom: 36px;
}

/* tablet */
@media (max-width: 760px) {
  .discover-page {
    padding-top: 14px;
  }
}

/* mobile */
@media (max-width: 760px) {
  .discover-page {
    padding-top: 12px;
  }
}

.discover-hero {
  padding: 22px 0 14px;
}

.discover-hero-box {
  padding: 26px 28px;
  background:
    radial-gradient(circle at top right, rgba(61, 133, 198, .08), transparent 25%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.discover-title {
  margin: 14px 0 10px;
  font-size: clamp(32px, 4vw, 50px);
  line-height: 1.06;
  letter-spacing: -.03em;
}

.discover-subtitle {
  margin: 0;
  max-width: 900px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

/* TOOLBAR */

.toolbar-search {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.toolbar-field {
  display: grid;
  gap: 8px;
}

.toolbar-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.toolbar-field input,
.toolbar-field select {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0 14px;
}

.toolbar-input-wrap {
  position: relative;
}

.toolbar-input-wrap .bi {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 15px;
  pointer-events: none;
}

.toolbar-input-wrap input {
  padding-left: 40px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}


/* MAIN LAYOUT */

.discover-layout-section {
  padding-top: 0;
}

.discover-layout {
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(0, 42%);
  gap: 28px;
  align-items: start;
}

.discover-layout.map-expanded {
  grid-template-columns: 1fr;
  gap: 20px;
}

.discover-layout.map-expanded .discover-results {
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  padding: 0;
  min-height: auto;
  border: none;
  box-shadow: none;
}

.discover-results {
  min-width: 0;
  padding: 0;
  position: relative;
  background: transparent;
  border: none;
  box-shadow: none;
}

.discover-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 0 14px;
  border-bottom: none;
  background: transparent;
  border-radius: 0;
}

.discover-results-head h2 {
  margin: 0;
  display: flex;
  align-items: center;
}

.discover-results-head>div:last-child {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discover-results-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.discover-inline-layers {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.checkrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.discover-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 14px 0 0;
  align-items: start;
}

.discover-list .item {
  margin: 0;
}

/* MAP COLUMN */

.discover-map-column {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.discover-map-card {
  overflow: visible;
  position: relative;
}

.discover-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.discover-map-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.2px;

}

.discover-map-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.discover-map-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

#collapseMapLayoutBtn {
  display: none;
}

.discover-layout.map-expanded #collapseMapLayoutBtn {
  display: inline-flex;
}

.map-main,
.map-card-large #map,
#map {
  width: 100%;
  height: min(78vh, 860px);
  min-height: 620px;
}

.discover-detail-card {
  overflow: hidden;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* LIST ITEMS */

.item {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 16px;
  background: #fff;
  cursor: pointer;
  transition: .2s ease;
}

.item:hover {
  transform: none;
}

.item-card-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.item-thumb-wrap {
  width: 100%;
  height: 200px;
  aspect-ratio: 4/3;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-soft);
}

.item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.item-thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
}

.item-thumb-empty .bi {
  font-size: 24px;
  color: var(--primary-dark);
  opacity: .85;
}

.item-thumb-empty span {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.item-card-row.no-image {
  grid-template-columns: 1fr;
}

.item-card-row.no-image .item-thumb-wrap {
  width: 100%;
  height: 220px;
}

.item-card-content {
  min-width: 0;
}

.item-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.item-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0px;
}

.item-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .01em;
}

.badge-event {
  background: var(--event)
}

.badge-restriction {
  background: var(--restriction)
}

.badge-service {
  background: var(--service)
}

.badge-zone {
  background: var(--zone)
}

.badge-listing {
  background: var(--listing)
}

.badge-marketplace {
  background: var(--marketplace)
}

.badge-job {
  background: var(--job)
}


/* INFO PAGES / GENERIC INNER */

.section {
  padding: 12px 0 24px;
}

.title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
}

.text {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.audience-card {
  padding: 24px;
}

.audience-card h3 {
  margin: 0 0 12px;
}

.audience-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.audience-card li+li {
  margin-top: 8px;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.cta h2 {
  margin: 0 0 10px;
}

.cta p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

/* OBJECT PAGE */

.object-page {
  padding: 28px 0 40px;
}

.object-wrap {
  width: min(100% - 24px, 1200px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.object-main,
.object-side {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.object-main {
  padding: 24px;
}

.object-side {
  padding: 20px;
  position: sticky;
  top: 98px;
  display: grid;
  gap: 12px;
}

.object-title {
  margin: 12px 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.08;
}

.object-meta {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
  color: var(--muted);
}

.object-description {
  font-size: 17px;
  line-height: 1.65;
}

.object-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.object-gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.object-text-block {
  margin-top: 22px;
}

.object-section-title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
}

.object-text-block p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.object-related-section {
  padding: 10px 0 40px;
}

.object-wrap-single {
  width: min(100% - 24px, 1200px);
  margin: 0 auto;
}

.object-divider {
  height: 1px;
  background: var(--border);
  margin: 10px 0 26px;
}

.object-box {
  padding: 14px;
  border-radius: 18px;
  background: var(--card-soft);
  border: 1px solid var(--border);
}

.object-box h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-weight: 700;
}

.split-datetime {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.split-datetime-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.datetime-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

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

.related-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}

.related-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

/* INFO PAGE */

.info {
  padding: 0 0 18px;
}

.info-card {
  padding: 24px;
}

.info-card h2 {
  margin-top: 0;
}

.info-card-large {
  padding: 28px;
}

.info-page .page-title {
  margin: 14px 0 10px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.08;
}

.info-page .page-lead {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 900px;
}



/* LEAFLET / POPUP */

.leaflet-popup-content-wrapper {
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .14);
}

.map-object-popup .leaflet-popup-content {
  margin: 12px;
  width: 260px !important;
}

.map-object-popup-mini .leaflet-popup-content {
  width: 200px !important;
}

.map-object-popup .leaflet-popup-content-wrapper {
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
}

.map-object-tooltip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
  color: var(--text);
}

.map-object-tooltip .leaflet-tooltip-content {
  margin: 10px 12px;
  width: 220px;
}

.popup-card {
  display: grid;
  gap: 10px;
}

.popup-card-mini {
  display: grid;
  gap: 8px;
}

.popup-title-strong {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}

.popup-title-mini {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  margin: 0;
}

.popup-image-wrap {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.popup-image-wrap-mini {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.popup-image {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.popup-image-mini {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.popup-meta {
  display: grid;
  gap: 6px;
  margin: 0;
}

.popup-meta-mini {
  display: grid;
  gap: 5px;
  margin: 0;
}

.popup-meta .meta-icon,
.popup-meta-mini .meta-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.popup-meta .bi,
.popup-meta-mini .bi {
  color: var(--primary-dark);
}

.popup-desc {
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.popup-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  margin-top: 2px;
  font-size: 14px;
}

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

.popup-arrow {
  transition: transform .15s ease;
}

.popup-link:hover .popup-arrow {
  transform: translateX(3px);
}

/* RESPONSIVE */

@media (max-width: 1200px) {
  .toolbar-search {
    grid-template-columns: minmax(260px, 1.8fr) repeat(3, minmax(120px, 1fr));
  }

  .toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1fr;
  }

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

  .footer-lead {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .app-hero-inner {
    flex-direction: column;
  }

  .discover-layout,
  .discover-layout.map-expanded {
    grid-template-columns: 1fr;
  }

  .discover-results {
    position: static;
    max-height: none;
  }

  .discover-map-card {
    position: static;
  }

  .object-wrap {
    grid-template-columns: 1fr;
  }

  .object-side {
    position: static;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

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

  .toolbar-field-search {
    grid-column: 1 / -1;
  }

  .toolbar-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .wrap {
    padding: 0 14px;
  }

  .topnav,
  .topbar-actions .btn-secondary,
  .discover-results {
    display: none;
  }

  .topbar-inner {
    min-height: 66px;
    gap: 10px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .brand-text {
    font-size: 18px;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .topbar-actions .btn {
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
  }

  .discover-hero {
    padding: 14px 0 8px;
  }

  .discover-hero-box {
    padding: 18px;
    border-radius: 24px;
  }

  .discover-title {
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.08;
  }

  .discover-subtitle {
    font-size: 15px;
    line-height: 1.55;
  }

  .discover-toolbar {
    padding: 14px;
    border-radius: 22px;
  }

  .toolbar-search {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .toolbar-actions {
    justify-content: stretch;
  }

  .toolbar-actions .btn {
    width: 100%;
  }

  .category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-chips::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .discover-map-card {
    border-radius: 24px;
  }

  .discover-map-head {
    padding: 16px;
  }

  .discover-map-head-actions {
    width: 100%;
  }

  .discover-map-head-actions .btn {
    width: 100%;
  }

  #collapseMapLayoutBtn {
    display: none !important;
  }

  #map,
  .map-main,
  .map-card-large #map {
    height: 58vh;
    min-height: 360px;
  }

  .discover-detail-card,
  .detail-card {
    padding: 16px;
  }

  .mobile-sheet-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .item {
    padding: 14px;
  }

  .item-card-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .item-thumb-wrap {
    width: 100%;
    height: 190px;
  }

  .item-card-row.no-image {
    grid-template-columns: 1fr;
  }

  .item-card-row.no-image .item-thumb-wrap {
    width: 100%;
    height: 110px;
  }

  .object-main,
  .object-side,
  .audience-card,
  .cta {
    padding: 18px;
  }

  .object-gallery,
  .related-grid,
  .footer-links-grid {
    grid-template-columns: 1fr;
  }

  .object-title {
    font-size: clamp(26px, 8vw, 34px);
  }

  .text,
  .object-description {
    font-size: 15px;
    line-height: 1.6;
  }

  .footer-shell {
    padding: 28px 0 14px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .footer-bottom-links {
    gap: 10px;
  }

  .footer-tech {
    text-align: left;
    white-space: normal;
  }

  .map-object-tooltip {
    display: none !important;
  }

  .map-object-popup .leaflet-popup-content,
  .map-object-popup-mobile .leaflet-popup-content {
    width: min(258px, calc(100vw - 48px)) !important;
    max-width: calc(100vw - 48px) !important;
    min-width: auto !important;
  }

  .popup-card,
  .popup-card-mini {
    gap: 8px;
  }

  .popup-title-strong {
    font-size: 16px;
  }

  .popup-image {
    height: 116px;
  }

  .popup-desc {
    font-size: 13px;
  }
}

@media (max-width: 700px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== MODERN HEADER ===== */

.topbar-modern {
  padding: 10px 0;
}

.brand-modern {
  flex: 0 0 auto;
}

.header-searchbar {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.header-searchbar-main {
  min-height: 64px;
  display: grid;
  grid-template-columns:
  minmax(280px, 2.7fr)
  1px
  minmax(125px, 0.95fr)
  1px
  minmax(210px, 1.55fr)
  1px
  minmax(165px, 1.2fr);
  align-items: center;
  gap: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  margin-bottom: 8px;
}

.header-search-item-label {
  display: block;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search-item {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  position: relative;
  width: 100%;
}

.header-search-input {
  overflow: hidden;
}

.header-search-item--compactable {
  overflow: visible;
}

.header-search-input-wrap {
  position: relative;
  min-width: 0;
}

.header-search-input-wrap input {
  padding-right: 38px !important;
}

.header-search-item .bi {
  color: var(--muted);
  flex: 0 0 auto;
}

.header-search-item input {
  width: 100%;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  min-height: 44px;
  padding: 0;
}

.header-search-item--compactable {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.header-search-item--compactable .header-search-item-label {
  flex: 1 1 auto;
  min-width: 0;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.header-search-item--compactable .bi {
  position: relative;
  z-index: 1;
}

.header-search-item--compactable select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: transparent;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  opacity: 0;
  z-index: 3;
}

.header-search-item--compactable::after {
  content: "\F282";
  font-family: "bootstrap-icons";
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

.header-search-input input::placeholder {
  color: var(--muted);
}

.header-search-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.topbar-modern-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
  transition: .2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  background: #f9fafb;
}

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

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



/* ===== TOOLBAR SMALLER ===== */

.discover-toolbar {
  padding: 12px 16px;
}

.discover-chips-row {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

/* ===== MAP FLOATING CONTROLS ===== */

.map-frame {
  position: relative;
}

.map-floating-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1200;
  display: grid;
  gap: 10px;
}

.map-floating-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, .96);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
  backdrop-filter: blur(8px);
  transition: .2s ease;
}

/* ===== MAPLIBRE DEFAULT CONTROLS — AIRBNB STYLE ===== */

.maplibregl-ctrl-top-left {
  top: 16px !important;
  left: 16px !important;
  z-index: 1200 !important;
}

.maplibregl-popup {
  z-index: 900 !important;
}

.maplibregl-ctrl-group {
  border: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  display: grid !important;
  gap: 10px !important;
}

.maplibregl-ctrl-group button {
  width: 46px !important;
  height: 46px !important;
  border: none !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--text) !important;
  transition: .2s ease;
  margin: 0 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14) !important;
  backdrop-filter: blur(8px);
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.maplibregl-ctrl-group button:hover {
  transform: translateY(-1px);
  background: #fff !important;
}

.maplibregl-ctrl-group button span {
  filter: none !important;
}

/* иконки + / - */
.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  opacity: 1 !important;
}

/* компас */
.maplibregl-ctrl-compass .maplibregl-ctrl-icon {
  transform-origin: center center;
}

.map-floating-btn:hover {
  transform: translateY(-1px);
  background: #fff;
}

#collapseMapLayoutBtn {
  display: none;
}

.discover-layout.map-expanded #collapseMapLayoutBtn {
  display: inline-flex;
}

.discover-layout.map-expanded #toggleMapLayoutBtn {
  display: none;
}

/* ===== MOBILE ===== */

@media (max-width: 760px) {
  .topbar-modern-inner {
    grid-template-columns: auto auto auto;
    align-items: center;
  }

  .header-searchbar {
    display: none;
  }

  .brand-text {
    font-size: 16px;
  }

  .menu-dropdown-panel {
    right: 0;
    left: auto;
    min-width: 210px;
  }

  .map-floating-controls {
    top: 12px;
    right: 12px;
    gap: 8px;
  }

  .maplibregl-ctrl-top-left {
    top: 12px !important;
    left: 12px !important;
  }

  .maplibregl-ctrl-group {
    gap: 8px !important;
  }

  .maplibregl-ctrl-group button {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    margin: 0 !important;
  }

  .map-floating-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
}

/* ===== HEADER WIDTH FIX FOR SMALLER SCREENS — CLEAN ===== */

.topbar-modern-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.brand-modern,
.topbar-modern-actions,
.header-searchbar {
  align-self: center;
}

.header-searchbar {
  min-width: 0;
  width: 100%;
}

.header-searchbar-main {
  width: 100%;
  min-width: 0;
}

.topbar-modern-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.header-search-item,
.header-search-item-label {
  min-width: 0;
}

/* ноутбуки / сужение десктопа */
@media (max-width: 1180px) and (min-width: 981px) {
  .wrap {
    padding: 0 16px;
  }

  .topbar-modern-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .header-searchbar-main {
    grid-template-columns:
      minmax(210px, 2fr)
      1px
      minmax(110px, 0.9fr)
      1px
      minmax(165px, 1.3fr)
      1px
      minmax(130px, 1.05fr);
  }

  .header-search-item {
    padding: 0 10px;
    gap: 8px;
  }

  .topbar-modern-actions {
    gap: 8px;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
  }
}

/* планшет */
@media (max-width: 980px) and (min-width: 761px) {
  .wrap {
    padding: 0 16px;
  }

  .topbar-modern-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .brand-modern,
  .topbar-modern-actions,
  .header-searchbar {
    align-self: center;
  }

  .header-searchbar {
    display: flex !important;
    min-width: 0;
    width: 100%;
  }

  .header-searchbar-main {
    grid-template-columns: minmax(180px, 1fr) 44px 44px 44px;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 8px;
  }

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

  .header-search-input {
    min-width: 0;
    padding: 0 8px;
  }

  .header-search-input input {
    width: 100%;
    min-width: 0;
    height: 36px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .header-search-item--compactable {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 40px;
    padding: 0 14px 0 0;
    gap: 0;
    justify-content: center;
    border-radius: 12px;
    flex: 0 0 44px;
    overflow: visible;
  }

  .header-search-item--compactable i {
    font-size: 18px;
    margin: 0;
    margin-right: 4px;
    color: var(--muted);
    pointer-events: none;
  }

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

  .header-search-item--compactable select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 40px;
    opacity: 0;
    cursor: pointer;
    border: 0;
    background: transparent;
    z-index: 3;
  }

  .header-search-item--compactable::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    font-size: 9px;
    line-height: 1;
    color: var(--muted);
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .topbar-modern-actions {
    gap: 8px;
    padding-top: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
  }
}

/* ===== HEADER MENU IMPROVED ===== */

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;

  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1px;

  transition: background .18s ease, color .18s ease;
}

.menu-item i {
  font-size: 15px;
  color: var(--muted);
}

.menu-item:hover {
  background: #f4f7fb;
  color: var(--text);
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

.menu-auth {
  font-weight: 500;
  color: var(--primary-dark);
}

.menu-auth i {
  color: var(--primary-dark);
}

/* ===== HEADER MENU CLICK FIX ===== */

.topbar {
  z-index: 4000;
  /* Increased to be above .menu-dropdown (3100) */
}

.menu-dropdown {
  position: relative;
  z-index: 3100;
}

.menu-dropdown-panel {
  z-index: 3200;
}

@media (max-width: 760px) {
  .topbar {
    z-index: 4000;
  }

  .menu-dropdown {
    z-index: 4100;
  }

  .menu-dropdown-panel {
    z-index: 4200;
    pointer-events: auto;
  }
}

@media (max-width: 760px) {
  .menu-dropdown-panel {
    top: 52px;
    right: 0;
    min-width: 200px;
    max-width: calc(100vw - 28px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, .18);
  }

  .menu-item {
    font-size: 14px;
    min-height: 42px;
    padding: 9px 12px;
  }

  .menu-item i {
    font-size: 15px;
  }
}

/* ===== ITEM CARD CTA: mobile over image, desktop below image ===== */

.item-thumb-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}

.item-thumb-btn {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  background: rgba(23, 50, 77, .72);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  backdrop-filter: blur(6px);
  transition: .2s ease;
  z-index: 2;
}

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

.item-thumb-placeholder .item-thumb-btn {
  background: rgba(61, 133, 198, .92);
}

/* desktop: кнопка под изображением */
@media (min-width: 761px) {
  .item-thumb-wrap {
    position: relative;
  }

  .item-thumb-btn {
    display: none;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--primary-dark);
    backdrop-filter: none;
  }

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

  .item-thumb-placeholder .item-thumb-btn {
    background: #fff;
    color: var(--primary-dark);
  }

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

/* mobile */
@media (max-width: 760px) {
  .item-thumb-btn {
    left: 6px;
    right: auto;
    bottom: 6px;
    height: 28px;
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    width: auto;
    max-width: calc(100% - 12px);
    gap: 4px;
    background: rgba(23, 50, 77, .78);
  }

  .item-thumb-btn i {
    font-size: 11px;
  }
}

/* ===== AIRBNB-LIKE LIST CARDS ===== */

.item {
  border: none;
  border-radius: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  cursor: pointer;
  transition: none;
  align-self: start;
}

.item:hover {
  transform: none;
}

.item.active .item-thumb-wrap {
  box-shadow: none;
}

.item-card-content {
  min-width: 0;
  padding: 0 2px;
}

.item-thumb-wrap,
.item-thumb-placeholder {
  border-radius: 18px;
  overflow: hidden;
}

.item-thumb {
  transition: transform .25s ease;
}

.item:hover .item-thumb {
  transform: none;
}

.item-title {
  margin: 0;
  font-size: 17px;
  width: 100%;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 1.3;
}

@media (max-width:760px) {
  .item-title {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.1px;
    line-height: 1.28;
  }
}

.item-meta {
  row-gap: 8px;
  column-gap: 12px;
  font-size: 13px;
}

/* ===== HOVER POPUP WITHOUT IMAGE ===== */

.popup-card-hover-clean {
  gap: 8px;
}

.popup-card-hover-clean .popup-title-mini {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text);
}

.popup-card-hover-clean .popup-meta-mini {
  gap: 6px;
}

.popup-card-hover-clean .meta-icon {
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

/* ===== AIRBNB-STYLE IMAGE IN FULL POPUP ===== */

.popup-card-airbnb {
  gap: 10px;
}

.popup-image-wrap-airbnb {
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  background: #f3f6fa;
}

.popup-image-airbnb {
  display: block;
  width: 100%;
  height: 156px;
  object-fit: cover;
  transition: transform .25s ease;
}

.map-object-popup .leaflet-popup-content-wrapper:hover .popup-image-airbnb {
  transform: scale(1.015);
}

/* ===== FULL CLICK POPUP — AIRBNB STYLE ===== */

/* сам popup */
.map-object-popup .leaflet-popup-content-wrapper {
  background: #fff !important;
  border-radius: 22px !important;
  box-shadow: 0 22px 48px rgba(15, 23, 42, .18) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.map-object-popup .leaflet-popup-content {
  margin: 0 !important;
  width: 252px !important;
  max-width: 252px !important;
  min-width: 252px !important;
  background: #fff !important;
}

.map-object-popup .leaflet-popup-tip {
  background: #fff !important;
  box-shadow: none !important;
}

/* кнопка закрытия поверх фото */
.map-object-popup .leaflet-popup-close-button {
  top: 8px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .92) !important;
  color: #111827 !important;
  font-size: 16px !important;
  line-height: 28px !important;
  text-align: center !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12) !important;
  z-index: 20 !important;
}

.map-object-popup .leaflet-popup-close-button:hover {
  background: #fff !important;
  color: #000 !important;
}

/* карточка */
.popup-card-airbnb {
  display: block !important;
  background: #fff;
}

/* фото во всю верхнюю часть */
.popup-image-wrap-airbnb {
  width: 100%;
  height: 132px;
  overflow: hidden;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  background: #eef2f7;
}

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

/* внутренний контент */
.popup-body-airbnb {
  padding: 10px 12px 12px;
}

/* заголовок */
.popup-body-airbnb .popup-title-strong {
  margin: 0 0 6px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.24 !important;
  color: var(--text) !important;
  letter-spacing: -0.01em;
}

/* мета-информация плотнее */
.popup-meta-airbnb {
  display: grid !important;
  gap: 3px !important;
  margin: 0 !important;
}

.popup-meta-airbnb .meta-icon {
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  font-size: 11px !important;
  line-height: 1.28 !important;
  color: var(--muted) !important;
}

.popup-meta-airbnb .bi {
  color: var(--primary-dark) !important;
  flex: 0 0 auto !important;
  margin-top: 1px;
}

/* описание — компактнее */
.popup-desc-airbnb {
  margin: 5px 0 0 !important;
  font-size: 11px !important;
  line-height: 1.32 !important;
  color: var(--muted) !important;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ссылка */
.popup-body-airbnb .popup-link {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  margin-top: 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  text-decoration: none !important;
}

.popup-body-airbnb .popup-link:hover {
  text-decoration: underline !important;
}

/* мобильная версия */
@media (max-width:760px) {
  .map-object-popup .leaflet-popup-content {
    width: min(236px, calc(100vw - 44px)) !important;
    max-width: calc(100vw - 44px) !important;
    min-width: auto !important;
  }

  .popup-image-wrap-airbnb {
    height: 118px;
  }

  .popup-body-airbnb {
    padding: 9px 10px 10px;
  }

  .popup-body-airbnb .popup-title-strong {
    font-size: 14px !important;
    line-height: 1.22 !important;
  }

  .popup-meta-airbnb .meta-icon {
    font-size: 10px !important;
    gap: 5px !important;
  }

  .popup-desc-airbnb {
    font-size: 10px !important;
    line-height: 1.28 !important;
    -webkit-line-clamp: 2;
  }

  .popup-body-airbnb .popup-link {
    font-size: 11px !important;
    margin-top: 5px !important;
  }

  .map-object-popup .leaflet-popup-close-button {
    top: 6px !important;
    right: 6px !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
    font-size: 15px !important;
  }
}

/* ===== HOVER MINI POPUP FIX ===== */

.map-object-popup-mini .leaflet-popup-content-wrapper {
  background: #fff !important;
  border-radius: 16px !important;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .14) !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.map-object-popup-mini .leaflet-popup-content {
  margin: 0 !important;
  width: 188px !important;
  max-width: 188px !important;
  min-width: 188px !important;
  background: #fff !important;
}

.map-object-popup-mini .leaflet-popup-tip {
  background: #fff !important;
  box-shadow: none !important;
}

.popup-card-hover-clean {
  display: block !important;
  background: #fff !important;
}

.popup-card-hover-clean .popup-body-mini,
.popup-card-hover-clean {
  padding: 9px 10px !important;
}

.popup-card-hover-clean .popup-title-mini {
  margin: 0 0 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.22 !important;
  color: var(--text) !important;
  letter-spacing: -0.01em;
}

.popup-card-hover-clean .popup-meta-mini {
  display: grid !important;
  gap: 5px !important;
  margin: 0 !important;
}

.popup-card-hover-clean .meta-icon {
  display: flex !important;
  align-items: flex-start !important;
  gap: 6px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  color: var(--muted) !important;
}

.popup-card-hover-clean .meta-icon .bi {
  color: var(--primary-dark) !important;
  flex: 0 0 auto !important;
  margin-top: 1px;
}

/* чтобы мини-карточка не тянула стили full popup */
.map-object-popup-mini .popup-image-wrap,
.map-object-popup-mini .popup-image-wrap-airbnb,
.map-object-popup-mini .popup-image,
.map-object-popup-mini .popup-image-airbnb,
.map-object-popup-mini .popup-desc,
.map-object-popup-mini .popup-link {
  display: none !important;
}

@media (max-width:760px) {
  .map-object-popup-mini .leaflet-popup-content {
    width: 208px !important;
    max-width: 208px !important;
    min-width: 208px !important;
  }

  .popup-card-hover-clean .popup-title-mini {
    font-size: 14px !important;
  }

  .popup-card-hover-clean .meta-icon {
    font-size: 12px !important;
  }
}

/* ===== MOBILE HEADINGS ===== */

@media (max-width:760px) {

  .discover-map-head h2,
  .discover-results-head h2 {
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 0.2px;
    line-height: 1.25;
    margin-bottom: 4px;
  }

  .discover-map-head p,
  .discover-results-head p {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.85;
    line-height: 1.35;
  }

}

/* ===== MAPLIBRE MAP HEIGHT + CLEAN CARD FIX ===== */

/* Убираем белую подложку вокруг карты */
.discover-map-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

/* Верхний текстовый блок над картой оставляем отдельным */
.discover-map-head {
  margin-bottom: 12px;
  padding: 0;
  border-bottom: none;
  background: transparent;
}

/* Сам контейнер карты */
.map-frame {
  position: relative;
  width: 100%;
  min-height: 680px;
  height: 78vh;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #e9eef5;
}

/* Сама карта заполняет контейнер полностью */
#map,
.map-main,
.map-card-large #map {
  width: 100%;
  height: 100%;
  min-height: 680px;
  border-radius: 24px;
  display: block;
}

/* Планшеты */
@media (max-width: 760px) {
  .map-frame {
    min-height: 620px;
    height: 72vh;
  }

  #map,
  .map-main,
  .map-card-large #map {
    min-height: 620px;
  }
}

/* Мобильная версия */
@media (max-width: 760px) {
  .discover-map-column {
    gap: 14px;
  }

  .discover-map-head {
    margin-bottom: 10px;
  }

  .map-frame {
    min-height: 72vh;
    height: 72vh;
    border-radius: 20px;
  }

  #map,
  .map-main,
  .map-card-large #map {
    min-height: 72vh;
    height: 100%;
    border-radius: 20px;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .map-frame {
    min-height: 76vh;
    height: 76vh;
  }

  #map,
  .map-main,
  .map-card-large #map {
    min-height: 76vh;
  }
}

/* ===== MAP EXPAND FIX FOR TABLET + MOBILE ===== */

@media (max-width: 760px) {

  .discover-layout,
  .discover-layout.map-expanded {
    grid-template-columns: 1fr !important;
  }

  .discover-map-column {
    width: 100%;
    min-width: 0;
  }

  .discover-map-card {
    width: 100%;
    min-width: 0;
  }

  .map-frame {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 760px) {
  .discover-layout {
    display: block !important;
  }

  .discover-layout.map-expanded {
    display: block !important;
  }

  .discover-map-column {
    width: 100% !important;
    margin: 0 !important;
  }

  .discover-map-card {
    width: 100% !important;
    margin: 0 !important;
  }

  .map-frame {
    width: 100% !important;
    min-height: 72vh !important;
    height: 72vh !important;
    margin: 0 !important;
  }

  #map,
  .map-main,
  .map-card-large #map {
    width: 100% !important;
    height: 100% !important;
    min-height: 72vh !important;
  }
}

@media (max-width: 480px) {
  .map-frame {
    min-height: 76vh !important;
    height: 76vh !important;
  }

  #map,
  .map-main,
  .map-card-large #map {
    min-height: 76vh !important;
  }
}


/* ===== AIRBNB STYLE RESULTS COLUMN ===== */

.discover-results {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.discover-results-head {
  padding: 0 0 14px;
  border-bottom: none;
  margin-bottom: 14px;
}

.discover-results-count {
  margin-left: 8px;
  padding-top: 2px;
}

.discover-results-count strong {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--text);
}

/* ===== FOOTER FINAL CLEANUP ===== */

.site-footer {
  margin-top: 40px;
  background:
    radial-gradient(circle at top left, rgba(61, 133, 198, .08), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%);
  border-top: 1px solid var(--border);
}

.footer-shell {
  padding: 40px 24px 18px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(0, 1.95fr);
  gap: 40px;
  align-items: start;
}

.footer-brand-block {
  padding-right: 8px;
}

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

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-brand-text strong {
  font-size: 18px;
  line-height: 1.1;
  color: var(--text);
}

.footer-brand-text span {
  font-size: 13px;
  color: var(--muted);
}

.footer-lead {
  margin: 16px 0 0;
  max-width: 420px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.footer-social {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .88);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: .2s ease;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .05);
}

.footer-social:hover {
  transform: translateY(-2px);
  background: #fff;
  color: var(--primary);
  border-color: rgba(61, 133, 198, .35);
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 32px;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.footer-col h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  color: var(--text);
}

.footer-col a {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  transition: .2s ease;
}

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

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 15%, var(--border) 85%, transparent 100%);
  margin: 26px 0 18px;
}

.footer-bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.footer-bottom-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.footer-bottom-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  transition: .2s ease;
}

.footer-bottom-link .bi {
  font-size: 14px;
  color: var(--primary-dark);
  flex: 0 0 auto;
}

.footer-bottom-link:hover {
  color: var(--primary-dark);
}

.footer-bottom-link--report {
  font-weight: 600;
}

.footer-tech {
  text-align: right;
  white-space: nowrap;
}

@media (max-width:1100px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 26px;
  }

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

  .footer-lead {
    max-width: none;
  }
}

@media (max-width:760px) {
  .footer-shell {
    padding: 28px 14px 16px;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-social {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .footer-bottom {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
    gap: 12px;
  }
  
  .footer-bottom-link {
    justify-content: center;
  }

  .footer-tech {
    text-align: center;
    white-space: normal;
    font-size: 12px;
  }

  .footer-divider {
    margin: 20px 0 16px;
  }
}

@media (max-width: 1180px) {

  .discover-layout,
  .discover-layout:not(.map-expanded) {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .discover-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {

  .discover-layout,
  .discover-layout:not(.map-expanded),
  .discover-layout.map-expanded {
    grid-template-columns: 1fr !important;
  }

  .discover-list {
    grid-template-columns: 1fr;
  }

  .item-thumb-wrap {
    height: 220px;
  }
}

@media (max-width: 760px) {
  .item-thumb-wrap {
    height: 200px;
    border-radius: 20px;
  }

  .item-card-content {
    padding: 0;
  }

  .item-top {
    gap: 5px;
    margin-bottom: 8px;
  }

  .item-meta {
    gap: 5px;
    font-size: 12px;
  }

  .item-desc {
    font-size: 13px;
    line-height: 1.5;
  }
}

/* ===== HEADER RESPONSIVE CLEAN ===== */

.topbar-modern-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.brand-modern,
.topbar-modern-actions,
.header-searchbar {
  align-self: center;
}

.header-searchbar {
  min-width: 0;
  width: 100%;
}

.header-searchbar-main {
  width: 100%;
  min-width: 0;
}

.header-searchbar-main > * {
  min-width: 0;
}

.topbar-modern-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.header-search-item,
.header-search-item-label {
  min-width: 0;
}

/* desktop narrower */
@media (max-width: 1180px) and (min-width: 981px) {
  .wrap {
    padding: 0 16px;
  }

  .topbar-modern-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
  }

  .header-searchbar-main {
    grid-template-columns:
      minmax(210px, 2fr)
      1px
      minmax(110px, 0.9fr)
      1px
      minmax(165px, 1.3fr)
      1px
      minmax(130px, 1.05fr);
  }

  .header-search-item {
    padding: 0 10px;
    gap: 8px;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
  }
}

/* tablet */
@media (max-width: 980px) and (min-width: 761px) {
  .wrap {
    padding: 0 16px;
  }

  .topbar-modern-inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .brand-modern,
  .topbar-modern-actions,
  .header-searchbar {
    align-self: center;
  }

  .header-searchbar {
    display: flex !important;
    min-width: 0;
    width: 100%;
  }

  .header-searchbar-main {
    grid-template-columns: minmax(180px, 1fr) 44px 44px 44px;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 0 8px;
  }

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

  .header-search-input-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .header-search-input {
    min-width: 0;
    padding: 0 8px;
  }

  .header-search-input input {
    width: 100%;
    min-width: 0;
    height: 36px;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .header-search-item--compactable {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 40px;
    padding: 0 14px 0 0;
    gap: 0;
    justify-content: center;
    border-radius: 12px;
    flex: 0 0 44px;
    overflow: visible;
  }

  .header-search-item--compactable i {
    font-size: 18px;
    margin: 0;
    margin-right: 4px;
    color: var(--muted);
    pointer-events: none;
  }

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

  .header-search-item--compactable select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 40px;
    opacity: 0;
    cursor: pointer;
    border: 0;
    background: transparent;
    z-index: 3;
  }

  .header-search-item--compactable::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    font-size: 9px;
    line-height: 1;
    color: var(--muted);
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .topbar-modern-actions {
    gap: 8px;
    padding-top: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .icon-btn {
    width: 42px;
    height: 42px;
  }
}

/* ===== HIDE MOBILE SHEET ON DESKTOP ===== */

.mobile-sheet,
.mobile-sheet-open {
  display: none;
}

/* ===== MOBILE BOTTOM SHEET: SNAP STATES ===== */

@media (max-width: 760px) {

  .mobile-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1300;
    display: flex;
    flex-direction: column;

    background: #fff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, .12), var(--shadow-lg);

    height: 86vh;
    max-height: 86vh;

    overflow: hidden;
    /* важно */
    transform: translateY(calc(100% - 74px));
    transition: transform .28s ease;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    will-change: transform;
  }

  .mobile-sheet.sheet-collapsed {
    transform: translateY(calc(100% - 74px));
  }

  .mobile-sheet.sheet-peek {
    transform: translateY(56%);
  }

  .mobile-sheet.sheet-half {
    transform: translateY(28%);
  }

  .mobile-sheet.sheet-full {
    transform: translateY(8px);
  }

  .sheet-top {
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    background: #fff;
    padding-bottom: 10px;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .sheet-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .sheet-top:active {
    cursor: grabbing;
  }

  .sheet-handle {
    width: 52px;
    height: 6px;
    border-radius: 999px;
    margin: 6px auto 10px;
    background: #d6dde8;
    cursor: pointer;
    touch-action: none;
  }

  .sheet-head {
    display: none !important;
  }

  .sheet-filters {
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }

  .sheet-block {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--card-soft);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  }

  .sheet-block-filters {
    display: grid;
    gap: 16px;
  }

  .field {
    display: grid;
    gap: 8px;
    margin: 0;
  }

  .field span {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .2px;
    color: var(--muted);
  }

  .field input,
  .field select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    box-shadow: none;
  }

  .field input::placeholder {
    color: var(--muted);
  }

  .mobile-search-wrap {
    position: relative;
  }

  .mobile-search-wrap input {
    padding-right: 42px;
  }

  #searchInputMobile {
    font-size: 15px;
  }

  .mobile-actions-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 4px;
  }

  .mobile-icon-action {
    min-height: 46px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .06);
    cursor: pointer;
    transition: .18s ease;
  }

  .mobile-icon-action i {
    font-size: 18px;
  }

  .mobile-icon-action-primary {
    background: var(--primary);
    color: #fff;
  }

  .mobile-icon-action:hover {
    background: #f8fafc;
  }

  .mobile-icon-action:active {
    transform: scale(.96);
    box-shadow: 0 4px 10px rgba(15, 23, 42, .08);
  }

  .mobile-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 2px 2px;
  }
}

.mobile-list .item {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  align-self: start;
}

.mobile-list .item-card-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.mobile-list .item-thumb-wrap {
  width: 88px;
  min-width: 88px;
  height: 88px !important;
  aspect-ratio: auto;
  border-radius: 14px;
  overflow: hidden;
}

.mobile-list .item-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-list .item-card-row.no-image .item-thumb-wrap {
  width: 88px;
  min-width: 88px;
  height: 88px !important;
  aspect-ratio: auto;
}

.mobile-list .item-thumb-btn {
  display: none !important;
}

.mobile-list .item-card-content {
  padding: 0;
}

.mobile-list .item-top {
  gap: 6px;
  margin-bottom: 6px;
}

.mobile-list .item-title {
  font-size: 13px;
  line-height: 1.24;
  font-weight: 600;
}

.mobile-list .badge {
  min-height: 18px;
  padding: 0 7px;
  font-size: 9px;
}

.mobile-list .item-meta {
  gap: 5px;
}

.mobile-list .item-meta .meta-icon {
  font-size: 12px;
  line-height: 1.3;
}

.mobile-list .item-meta {
  gap: 3px;
  font-size: 11px;
}

.mobile-list .meta-icon {
  gap: 5px;
  line-height: 1.25;
}



@media (max-width: 760px) {
  .site-footer {
    display: none;
  }
}

.mobile-copyright {
  display: none;
}

@media (max-width:760px) {

  .site-footer {
    display: none;
  }

  .mobile-copyright {
    display: block;
    text-align: center;
    padding: 18px 10px 28px;
    font-size: 12px;
    color: var(--muted);
    background: transparent;
  }

}

@media (max-width: 760px) {
  .discover-map-head {
    display: none !important;
  }

  .discover-map-column {
    gap: 0 !important;
  }

  .discover-map-card {
    margin-top: 0 !important;
  }

  .map-frame {
    margin-top: 0 !important;
  }
}

.map-floating-btn,
.mobile-icon-action,
.maplibregl-ctrl-group button {
  position: relative;
}

@media (max-width: 760px) {
  .discover-page {
    padding-bottom: 0 !important;
  }
}

.popup-meta-airbnb .badge {
  min-height: 20px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 600;
}

@media (max-width:760px) {
  .popup-meta-airbnb .badge {
    min-height: 18px;
    padding: 0 7px;
    font-size: 9px;
  }
}

.popup-type-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 10;

  min-height: 22px;
  padding: 0 9px;

  font-size: 10px;
  font-weight: 600;

  box-shadow: 0 6px 14px rgba(0, 0, 0, .18);
  backdrop-filter: blur(4px);
}

@media (max-width:760px) {
  .popup-type-badge {
    top: 8px;
    left: 8px;
    font-size: 9px;
    min-height: 20px;
    padding: 0 8px;
  }
}

.discover-map-head p,
.discover-results-head p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 6px 0 0;
  font-weight: 400;
}

/* Secondary description under section titles */

.discover-map-head p,
.discover-results-head p,
.discover-results-head span {
  font-size: 14px;
  line-height: 1.5;
  color: #6b7280;
  font-weight: 400;
  margin-top: 6px;
}


/* Titles spacing improvement */

.discover-map-head h2,
.discover-results-head h2 {
  margin: 0;
  margin-bottom: 4px;
}

.brand-logo {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
  flex: 0 0 24px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.pagination-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-btn {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: .18s ease;
}

.pagination-btn:hover {
  background: #f7f9fc;
  border-color: #d7dee8;
}

.pagination-btn.is-active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
}

.pagination-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.pagination-dots {
  min-width: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

.mobile-pagination {
  padding: 14px 0 6px;
}

@media (max-width:760px) {
  .pagination {
    margin-top: 16px;
  }

  .pagination-btn {
    min-width: 38px;
    height: 38px;
    font-size: 13px;
    padding: 0 10px;
  }

  .pagination-inner {
    gap: 6px;
  }
}

/* ===== DESKTOP LIST LAYOUTS FINAL ===== */
@media (min-width: 981px) {

  /* ===== 1. ЗГОРНУТАЯ КАРТА: карта слева, список справа ===== */
  .discover-layout:not(.map-expanded) .discover-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view .item-card-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view .item-thumb-wrap {
    width: 88px;
    min-width: 88px;
    height: 88px;
    border-radius: 14px;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view .item-card-row.no-image .item-thumb-wrap {
    width: 88px;
    min-width: 88px;
    height: 88px;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view .item-title {
    font-size: 13px;
    line-height: 1.22;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view .item-meta {
    gap: 3px;
    font-size: 11px;
  }


  /* ===== 2. РАЗВЕРНУТАЯ КАРТА: карта сверху, список снизу ===== */
  .discover-layout.map-expanded .discover-list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
  }

  .discover-layout.map-expanded .discover-list .item-thumb-wrap {
    height: 132px;
  }

  .discover-layout.map-expanded .discover-list .item-title {
    font-size: 14px;
    line-height: 1.22;
  }

  .discover-layout.map-expanded .discover-list .item-meta {
    gap: 4px;
    font-size: 11px;
  }

  .discover-layout.map-expanded .discover-list .badge {
    min-height: 19px;
    padding: 0 7px;
    font-size: 10px;
  }


  /* ===== expanded + compact ===== */
  .discover-layout.map-expanded .discover-list.compact-view {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-card-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-thumb-wrap {
    width: 72px;
    min-width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-card-row.no-image .item-thumb-wrap {
    width: 72px;
    min-width: 72px;
    height: 72px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-title {
    font-size: 12px;
    line-height: 1.2;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-meta {
    gap: 2px;
    font-size: 10px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .badge {
    min-height: 17px;
    padding: 0 6px;
    font-size: 9px;
  }
}

.discover-results-controls {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}



/* ===== EXPANDED MAP + COMPACT VIEW: small image left, text right ===== */
@media (min-width: 981px) {
  .discover-layout.map-expanded .discover-list.compact-view {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-card-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-thumb-wrap {
    width: 72px;
    min-width: 72px;
    height: 72px;
    border-radius: 12px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-card-row.no-image .item-thumb-wrap {
    width: 72px;
    min-width: 72px;
    height: 72px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-card-content {
    padding: 0;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-top {
    gap: 4px;
    margin-bottom: 5px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-title {
    font-size: 12px;
    line-height: 1.2;
  }

  .discover-layout.map-expanded .discover-list.compact-view .item-meta {
    gap: 2px;
    font-size: 10px;
  }

  .discover-layout.map-expanded .discover-list.compact-view .badge {
    min-height: 17px;
    padding: 0 6px;
    font-size: 9px;
  }
}

/* ===== DESKTOP: карта слева sticky, справа без внутреннего скролла ===== */
@media (min-width: 981px) {

  .discover-layout {
    transition: grid-template-columns .28s ease;
    align-items: start;
  }

  /* обычный режим */
  .discover-layout:not(.map-expanded) {
    display: grid;
    grid-template-columns: minmax(0, 58%) minmax(0, 42%);
    gap: 28px;
    align-items: start;
  }

  .discover-layout:not(.map-expanded) .discover-map-column {
    order: 1;
    min-width: 0;
    align-self: start;
  }

  .discover-layout:not(.map-expanded) .discover-results {
    order: 2;
    min-width: 0;
    align-self: start;
    display: block;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .discover-layout:not(.map-expanded) .discover-results-head {
    position: static;
    top: auto;
    z-index: auto;
    background: transparent;
    padding: 0 0 14px;
    margin-bottom: 12px;
  }

  .discover-layout:not(.map-expanded) .discover-list {
    overflow: visible;
    padding: 0;
  }

  .discover-layout:not(.map-expanded) .pagination {
    margin-top: 18px;
    padding-top: 0;
  }

  .discover-layout:not(.map-expanded) .discover-map-column {
    order: 1;
    min-width: 0;
    align-self: start;
    position: sticky;
    top: 98px;
  }

  .discover-layout:not(.map-expanded) .discover-map-card {
    position: relative;
    top: auto;
    align-self: auto;
  }

  .discover-layout:not(.map-expanded) .map-frame {
    height: calc(100vh - 98px - 24px) !important;
    min-height: calc(100vh - 98px - 24px) !important;
    max-height: calc(100vh - 98px - 24px) !important;
  }

  .discover-layout:not(.map-expanded) #map,
  .discover-layout:not(.map-expanded) .map-main,
  .discover-layout:not(.map-expanded) .map-card-large #map {
    width: 100%;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: block;
  }

  /* раскрытая карта: карта сверху, список снизу */
  .discover-layout.map-expanded {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    align-items: start;
  }

  .discover-layout.map-expanded .discover-map-column {
    order: 1;
    width: 100%;
    min-width: 0;
  }

  .discover-layout.map-expanded .discover-results {
    order: 2;
    width: 100%;
    min-width: 0;
    display: block !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .discover-layout.map-expanded .discover-results-head {
    position: static;
    background: transparent;
    margin-bottom: 14px;
  }

  .discover-layout.map-expanded .discover-list {
    overflow: visible;
    padding: 14px 0 0;
  }

  .discover-layout.map-expanded .discover-map-card {
    position: relative;
    top: auto;
  }

  .discover-layout.map-expanded .map-frame {
    height: 78vh !important;
    min-height: 680px !important;
    max-height: none !important;
  }

  .discover-layout.map-expanded #toggleMapLayoutBtn {
    display: none !important;
  }

  .discover-layout.map-expanded #collapseMapLayoutBtn {
    display: inline-flex !important;
  }
}

.map-floating-btn.is-active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 26px rgba(61, 133, 198, .30);
}

.user-location-marker.is-following .user-location-marker__pulse {
  animation-duration: 1.15s;
}

.user-location-marker.is-following .user-location-marker__ring {
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, .28),
    0 8px 18px rgba(37, 99, 235, .24);
}

.user-location-marker {
  position: relative;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgba(37, 99, 235, .28));
  z-index: 30;
}

.user-location-marker__heading {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%) rotate(0deg);
  transform-origin: 50% 18px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 12px solid #2563eb;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, .28));
  z-index: 3;
  pointer-events: none;
}

.user-location-marker__pulse {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .18);
  animation: userLocationPulseStrong 1.8s ease-out infinite;
}

.user-location-marker__ring {
  position: absolute;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .20);
  border: 2px solid rgba(255, 255, 255, .96);
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, .22),
    0 6px 14px rgba(37, 99, 235, .18);
}

.user-location-marker__dot {
  position: relative;
  z-index: 2;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
  border: 3px solid #ffffff;
  box-shadow:
    0 0 0 2px rgba(37, 99, 235, .22),
    0 6px 16px rgba(37, 99, 235, .35);
}

@keyframes userLocationPulseStrong {
  0% {
    transform: scale(.55);
    opacity: .95;
  }

  70% {
    transform: scale(1.9);
    opacity: 0;
  }

  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}

.discover-map-head-compact {
  padding-bottom: 10px;
}

.discover-map-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.discover-map-head-row h2,
.discover-results-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .1px;
  line-height: 1.25;
}



.map-info-inline {
  margin-top: 10px;
}

.map-info-inline.hidden {
  display: none;
}

.map-info-inline-inner {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  padding: 14px 16px;
}

.map-info-inline-inner strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.map-info-inline-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 760px) {
  .discover-map-head-row h2 {
    font-size: 18px;
  }

  .map-info-btn {
    width: 32px;
    height: 32px;
  }

  .map-info-inline-inner {
    padding: 12px 14px;
    border-radius: 14px;
  }
}

.header-user-address {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  max-width: none;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;

  overflow: hidden;
  max-height: 40px;
  opacity: 1;
  transform: translateY(0);
  padding: 8px 2px;
  transition:
    max-height .24s ease,
    opacity .18s ease,
    transform .18s ease,
    padding .24s ease;
}

.header-user-address.hidden {
  display: flex !important;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

.header-user-address i {
  color: var(--primary-dark);
  flex: 0 0 auto;
  font-size: 14px;
}

.header-user-address span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 1.35;
}

.mobile-geo-info-btn.is-active {
  background: var(--card-soft-2);
}

.mobile-geo-info-panel {
  display: none;
}

@media (max-width: 760px) {
  .header-user-address {
    display: none !important;
  }

  .mobile-geo-info-panel {
    display: block;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    transition: max-height .28s ease, opacity .24s ease, transform .24s ease;
    padding: 0 12px;
    background: transparent;
  }

  .mobile-geo-info-panel.hidden {
    display: block;
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  .mobile-geo-info-panel.is-open {
    max-height: 140px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 8px;
    margin-bottom: 10px;
  }

  .mobile-geo-info-panel__inner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
    padding: 12px 14px;
  }

  .mobile-geo-info-panel__inner i {
    color: var(--primary-dark);
    margin-top: 2px;
    flex: 0 0 auto;
  }

  .mobile-geo-info-panel__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  .mobile-geo-info-panel__text strong {
    font-size: 13px;
    line-height: 1.25;
  }

  .mobile-geo-info-panel__text span {
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
    word-break: break-word;
  }
}

/* ===== MOBILE HEADER / FILTER SHEET / EMPTY STATE ===== */
.mobile-header-search {
  display: none;
}

.badge i {
  font-size: .95em;
}

.badge span {
  display: inline-block;
}

.item-thumb-wrap {
  position: relative;
}

.item-category-sticker,
.popup-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 0 10px;
  min-height: 28px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.item-category-sticker i,
.popup-type-badge i {
  font-size: 12px;
}

.item-category-sticker span,
.popup-type-badge span {
  font-size: 11px;
  font-weight: 700;
}

.item-category-pill-inline {
  position: static;
  z-index: auto;
  min-height: 24px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 999px;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-self: flex-start;
}

.item-category-pill-inline i {
  font-size: 12px;
}

.item-category-pill-inline span {
  font-size: 11px;
  font-weight: 700;
}



.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1390;
  background: rgba(15, 23, 42, .18);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  opacity: 0;
  transition: opacity .26s ease;
}

.sheet-backdrop.is-visible {
  opacity: 1;
}

.mobile-filters-sheet {
  position: fixed;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
}

.mobile-filters-sheet__panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 28px 28px 0 0;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 -24px 60px rgba(15, 23, 42, .22);
  transform: translateY(110%);
  transition: transform .28s ease;
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
}

.mobile-filters-sheet.is-open {
  pointer-events: auto;
}

.mobile-filters-sheet.is-open .mobile-filters-sheet__panel {
  transform: translateY(0);
}

.mobile-filters-sheet__handle {
  width: 54px;
  height: 6px;
  border-radius: 999px;
  background: rgba(107, 114, 128, .24);
  margin: 10px auto 4px;
}

.mobile-filters-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 14px;
}

.mobile-filters-sheet__header strong {
  display: block;
  font-size: 18px;
  letter-spacing: -.02em;
}

.mobile-filters-sheet__header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.mobile-filters-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.mobile-filters-sheet__body {
  overflow: auto;
  padding: 0 16px 16px;
}

.mobile-filters-card {
  background: rgba(248, 250, 252, .82);
  border-color: rgba(229, 231, 235, .85);
}

.mobile-filters-sheet__footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(229, 231, 235, .8);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.mobile-filters-action {
  width: 100%;
}

@media (max-width: 760px) {
  .topbar-modern-inner {
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
  }

  .brand-modern {
    padding-top: 0;
  }


  .brand {
    min-width: 0;
    gap: 8px;
  }

  .brand-modern {
    min-width: 0;
  }

  .brand-logo {
    flex: 0 0 24px;
  }

  .brand-text {
    display: block;
    min-width: 0;
    max-width: 120px;
    font-size: 20px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-searchbar {
    display: block !important;
  }

  .header-searchbar-main {
    display: none;
  }

  .mobile-header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    border: 1px solid rgba(229, 231, 235, .95);
    background: rgba(255, 255, 255, .92);
    padding: 0 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
  }

  .mobile-header-search .bi {
    color: var(--muted);
    flex: 0 0 auto;
  }

  .mobile-header-search input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    min-height: 42px;
    padding: 0 28px 0 0;
    color: var(--text);
    font-size: 14px;
  }

  .mobile-header-search input::placeholder {
    color: var(--muted);
  }

  .mobile-header-search .search-clear-btn {
    right: 8px;
    width: 24px;
    height: 24px;
  }

  .topbar-modern-actions {
    padding-top: 0;
    gap: 8px;
  }

  .mobile-geo-info-btn,
  .add-object-btn {
    display: none !important;
  }

  .mobile-sheet {
    z-index: 1205;
  }

  .mobile-list .item-category-sticker {
    top: 8px;
    left: 8px;
    min-height: 24px;
    padding: 0 8px;
    gap: 5px;
  }

  .mobile-list .item-category-sticker i,
  .popup-type-badge i {
    font-size: 11px;
  }

  .mobile-list .item-category-sticker span,
  .popup-type-badge span {
    font-size: 10px;
  }
}

@media (min-width:761px) {

  .mobile-filters-btn,
  .mobile-header-search,
  .mobile-filters-sheet,
  .sheet-backdrop,
  .mobile-empty-state {
    display: none !important;
  }
}

.mobile-filters-btn {
  position: relative;
  z-index: 1405;
}

.mobile-sheet-open {
  display: none !important;
}

/* Header results sheet */
.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.85);
  transition: padding 0.22s ease;
}

.sheet-title-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  transition: all 0.22s ease;
}

.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.sheet-title-count {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

/* Свернутый режим */
.mobile-sheet.sheet-collapsed .sheet-header {
  justify-content: center;
  padding: 8px 16px 12px;
  border-bottom: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mobile-sheet.sheet-collapsed .sheet-title-line {
  justify-content: center;
  text-align: center;
}

.mobile-sheet.sheet-collapsed .sheet-title {
  font-size: 15px;
}

.mobile-sheet.sheet-collapsed .sheet-title-count {
  font-size: 14px;
}

.sheet-sort-chips::-webkit-scrollbar {
  display: none;
}

.sheet-sort-chip i {
  font-size: 14px;
  line-height: 1;
}

.sheet-sort-chip:active {
  transform: scale(.97);
}

.mobile-sheet.sheet-collapsed .sheet-sort-chips {
  display: none;
}

.mobile-sheet.sheet-collapsed .sheet-header {
  justify-content: center;
  padding: 8px 16px 12px;
  border-bottom: none;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.mobile-sheet.sheet-collapsed .sheet-title-line {
  justify-content: center;
  text-align: center;
}

/* ===== Clean mobile sheets overrides ===== */
@media (max-width:760px) {
  .topbar {
    position: relative;
    z-index: 1250;
  }

  .mobile-sheet {
    z-index: 1200;
  }

  .sheet-backdrop {
    z-index: 1300;
  }

  .mobile-filters-sheet {
    z-index: 1310;
  }

  .mobile-filters-btn {
    position: relative;
    z-index: 1102;
  }

  .mobile-sheet {
    display: flex;
    flex-direction: column;
    height: 86vh;
    max-height: 86vh;
    overflow: hidden;
  }

  .sheet-top {
    flex: 0 0 auto;
    background: #fff;
    cursor: grab;
    touch-action: none;
    user-select: none;
  }

  .sheet-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0 0 calc(12px + env(safe-area-inset-bottom));
  }

  .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: padding .22s ease;
    position: relative;
  }

  .sheet-sort-chips {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .sheet-sort-chips::-webkit-scrollbar {
    display: none;
  }

  .sheet-sort-chip {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: rgba(248, 250, 252, .96);
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s ease;
  }

  .sheet-sort-chip.is-active {
    background: rgba(61, 133, 198, .14);
    color: #1f5f96;
    box-shadow: 0 10px 24px rgba(61, 133, 198, .10);
  }

  .mobile-sheet.sheet-collapsed .sheet-header {
    justify-content: center;
    padding: 8px 16px 12px;
    border-bottom: none;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .mobile-sheet.sheet-collapsed .sheet-title-line {
    justify-content: center;
    text-align: center;
  }

  .mobile-sheet.sheet-collapsed .sheet-sort-chips {
    display: none;
  }

  .mobile-filters-sheet {
    pointer-events: none;
  }

  .mobile-filters-sheet.is-open {
    pointer-events: auto;
  }

  .sheet-backdrop {
    pointer-events: none;
  }

  .sheet-backdrop.is-visible {
    pointer-events: auto;
  }
}

/* ===== TABLET PORTRAIT (761px - 980px) ===== */
@media (min-width: 761px) and (max-width: 980px) {
  .discover-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 20px;
    padding-bottom: 24px;
  }

  .discover-map-column {
    order: -1;
    height: 45vh;
    min-height: 400px;
    width: 100%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
  }

  .discover-layout:not(.map-expanded) .discover-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px;
  }

  .discover-layout:not(.map-expanded) .discover-list.compact-view {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .discover-results {
    height: auto;
    width: 100%;
    overflow: visible;
  }

  .discover-results-head h2 {
    font-size: 1.25rem;
  }

  .item-card-row {
    padding: 12px;
  }
}

/* ===== TABLET LANDSCAPE (981px - 1200px) ===== */
@media (min-width: 981px) and (max-width: 1200px) {
  .discover-layout {
    grid-template-columns: minmax(0, 50%) minmax(0, 50%);
    gap: 20px;
  }

  .discover-layout:not(.map-expanded) .discover-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .item-card-row {
    padding: 10px;
  }

  .item-title {
    font-size: 15px;
  }

  .item-top {
    gap: 6px;
  }
}

/* ===== CUSTOM DATE RANGE ===== */

.custom-date-range-wrap {
  margin-top: 8px;
}

.custom-date-range {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.custom-date-field {
  display: grid;
  gap: 6px;
  min-width: 220px;
}

.custom-date-field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.custom-date-field input {
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
}

.custom-date-apply-btn {
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
}

.custom-date-range-mobile {
  display: grid;
  gap: 12px;
}

@media (max-width: 760px) {
  .custom-date-range {
    display: grid;
    gap: 12px;
  }

  .custom-date-field {
    min-width: 0;
  }

  .custom-date-apply-btn {
    width: 100%;
  }
}

/* ===== MOBILE CUSTOM DATE RANGE FIX ===== */
@media (max-width: 760px) {
  .custom-date-range-mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
    min-width: 0;
  }

  .custom-date-range-mobile .custom-date-field {
    min-width: 0;
    width: 100%;
  }

  .custom-date-range-mobile .custom-date-field input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  #customDateWrapMobile {
    min-width: 0;
    width: 100%;
  }
}

/* ===== MOBILE DATE FILTER HARD FIX ===== */
@media (max-width: 760px) {
  #customDateWrapMobile {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  #customDateWrapMobile > span {
    display: block;
    margin-bottom: 8px;
  }

  .custom-date-range-mobile {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .custom-date-range-mobile .custom-date-field {
    display: grid;
    gap: 6px;
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
  }

  .custom-date-range-mobile .custom-date-field span {
    font-size: 12px;
    line-height: 1.2;
  }

  .custom-date-range-mobile .custom-date-field input {
    display: block;
    width: 90%;
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
    font-size: 14px;
    line-height: 1.2;
  }
}

.popup-image-placeholder-airbnb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4f7 100%);
}

.popup-image-empty-airbnb {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 12px;
}

.popup-image-empty-airbnb .bi {
  font-size: 24px;
  color: var(--primary-dark);
  opacity: .85;
}

.popup-image-empty-airbnb span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}


/* ===== DESKTOP HEADER RESTORE ===== */
@media (min-width: 981px) {
  .topbar-modern-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
  }

  .header-searchbar {
    display: flex !important;
    min-width: 0;
    width: 100%;
  }

  .header-searchbar-main {
    display: grid;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    grid-template-columns:
  minmax(320px, 3fr)
  1px
  minmax(140px, 1fr)
  1px
  minmax(230px, 1.7fr)
  1px
  minmax(180px, 1.3fr);
    align-items: center;
    gap: 0;
    padding: 0 10px;
    border-radius: 999px;
  }

  .header-search-divider {
    display: block !important;
    width: 1px;
    height: 28px;
    background: var(--border);
  }

  .header-search-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 0 12px;
    position: relative;
    overflow: hidden;
  }

  .header-search-item .bi {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 16px;
    margin: 0;
  }

  .header-search-item-label {
    display: block !important;
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .header-search-item--compactable {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 44px;
    padding: 0 28px 0 12px;
    gap: 10px;
    justify-content: flex-start;
    border-radius: 0;
    overflow: hidden;
    isolation: isolate;
    flex: 1 1 auto;
  }

  .header-search-item--compactable .header-search-item-label {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    pointer-events: none;
    position: relative;
    z-index: 1;
  }

  .header-search-item--compactable .bi {
    position: relative;
    z-index: 1;
    font-size: 16px;
    margin-right: 0;
  }

  .header-search-item--compactable select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: transparent;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    z-index: 3;
  }

  .header-search-item--compactable::after {
    content: "\F282";
    font-family: "bootstrap-icons";
    font-size: 12px;
    line-height: 1;
    color: var(--muted);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
  }

  .topbar-modern-actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }
}

/* ===== HEADER PERFECT ALIGN ===== */
.topbar-modern-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center !important;
}

.brand-modern,
.header-searchbar,
.topbar-modern-actions {
  align-self: center !important;
}

.header-searchbar {
  display: flex;
  flex-direction: column;
}

/* адрес всегда под поиском */
.header-user-address {
  order: 2;
}
.header-searchbar-main {
  order: 1;
}
