
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── TOKENS ── */
:root {
  --bg-app:      #0a0a0a;
  --bg-base:     #111111;
  --bg-card:     #1a1a1a;
  --bg-elevated: #222222;
  --bg-input:    #111111;
  --bg-overlay:  rgba(0,0,0,0.65);
  --border-strong: #333333;
  --border-mid:    #2a2a2a;
  --text-primary:  #ffffff;
  --text-secondary:#888888;
  --text-muted:    #666666;
  --text-ph:       #444444;
  --accent:        #ffffff;
  --green:         #7A9F7A;
  --yellow:        #c89a30;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --site-header-h: 56px;
}

/* ── SITE HEADER ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--site-header-h);
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-mid);
  z-index: 600;
}
.site-header-logo {
  height: 22px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.site-header-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── DESKTOP NAV ── */
.site-header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 24px;
}
.site-header-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.site-header-nav a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.site-header-nav a.active { color: var(--text-primary); }
.site-header-nav-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.6;
  margin-left: 2px;
}
.site-header-nav-cta {
  margin-left: 8px;
  background: none !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-strong) !important;
  font-weight: 500 !important;
  padding: 5px 14px !important;
  transition: border-color 0.15s, color 0.15s !important;
}
.site-header-nav-cta:hover {
  color: var(--text-primary) !important;
  border-color: #555 !important;
  background: var(--bg-elevated) !important;
}

/* ── HEADER SETTINGS (lang/currency/unit) ── */
.site-header-settings {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  flex-shrink: 0;
}
.hdr-divider {
  width: 1px;
  height: 14px;
  background: var(--border-strong);
  margin: 0 6px;
}
.hdr-seg {
  display: flex;
  align-items: center;
  gap: 1px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.hdr-seg-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
  line-height: 1;
}
.hdr-seg-btn:hover { color: var(--text-secondary); }
.hdr-seg-btn.active { background: var(--bg-card); color: var(--text-primary); }
.hdr-lang-select {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  padding: 3px 4px;
  appearance: none;
  -webkit-appearance: none;
}
.hdr-lang-select:hover { color: var(--text-secondary); }

/* ── BURGER BUTTON ── */
.site-header-burger {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  padding: 8px;
  cursor: pointer;
  align-items: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.site-header-burger:hover { color: var(--text-primary); }

/* ── DROPDOWN PANEL ── */
.mob-settings-panel {
  display: none;
  position: fixed;
  top: var(--site-header-h);
  right: 0;
  background: var(--bg-base);
  border: 1px solid var(--border-mid);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px;
  z-index: 700;
  min-width: 200px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.mob-settings-panel.open { display: block; }
.mob-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-mid);
  gap: 12px;
}
.mob-settings-row:last-child { border-bottom: none; padding-bottom: 0; }
.mob-settings-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}
.mob-settings-seg {
  display: flex;
  gap: 2px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.mob-settings-seg .hdr-seg-btn { font-size: 12px; padding: 4px 10px; }
.burger-phone {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.burger-phone:hover { color: var(--text-secondary); }
.burger-socials { display: flex; gap: 6px; }
.burger-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 18px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.burger-social-btn:hover { color: var(--text-primary); border-color: #555; }
.burger-consult-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: var(--text-primary);
  color: var(--bg-base);
  font-size: 13px;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: opacity 0.15s;
}
.burger-consult-btn:hover { opacity: 0.85; }
.mob-settings-nav-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-mid);
}
.mob-settings-nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 8px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.mob-settings-nav-links a:hover { color: var(--text-primary); background: var(--bg-elevated); }
.mob-settings-nav-links a.active { color: var(--text-primary); }
/* hide nav section on mobile (settings-only panel at ≤768) */
@media (max-width: 768px) { .mob-settings-nav-links { display: none; } }

/* medium desktop: nav collapses to burger, settings stay */
@media (max-width: 1080px) {
  .site-header-nav { display: none; }
  .site-header-burger { display: flex; margin-left: 10px; }
}
@media (max-width: 768px) {
  .site-header-burger { display: flex; margin-left: 6px; tabindex: 0; }
}

/* unit switcher: 2-btn on desktop, single select on mobile */
.hdr-unit-mob { display: none; }

/* full mobile */
@media (max-width: 768px) {
  .site-header-logo { height: 24px; }
  #hdr-unit-seg { display: none; }
  .hdr-unit-mob { display: flex !important; }
  .hdr-lang-mob-hide { display: none !important; }
  /* burger is restored as inactive flex item */
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ════════════════════════════════
   LAYOUT
════════════════════════════════ */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  padding: 0 24px;
}
.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 100%;
  position: relative;
  padding: 0 24px;
}
.page { display: flex; min-height: 100vh; padding-top: var(--site-header-h); }

/* ════════════════════════════════
   SIDEBAR
════════════════════════════════ */
.sidebar {
  width: 296px;
  flex-shrink: 0;
  background: var(--bg-base);
  border-right: 1px solid var(--border-mid);
  height: calc(100vh - var(--site-header-h));
  position: sticky;
  top: var(--site-header-h);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border-mid);
  flex-shrink: 0;
  background: var(--bg-base);
}
.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.sidebar-footer {
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border-mid);
  background: var(--bg-base);
}
.sidebar-title { font-size: 15px; font-weight: 600; }

.btn-text {
  font-size: 12px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  transition: color 0.15s;
}
.btn-text:hover { color: var(--text-primary); }

/* ── FILTER BLOCK ── */
.f-block { margin-bottom: 20px; }

.f-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 8px;
  display: block;
}

/* ── DROPDOWN ── */
.dd-wrap { position: relative; }

.dd-trigger {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s;
  font-family: inherit;
  text-align: left;
}
.dd-trigger:hover, .dd-trigger.open { border-color: #555; }
.dd-trigger .ph { color: var(--text-muted); }

.dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  z-index: 200;
  max-height: 230px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.dd-panel.open { display: block; }

.dd-search {
  padding: 8px;
  position: sticky;
  top: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-mid);
}
.dd-search input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}
.dd-search input::placeholder { color: var(--text-ph); }

.dd-item {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
}
.dd-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.dd-item.selected { color: var(--text-primary); }
.dd-item .ck {
  width: 15px; height: 15px;
  border: 1px solid var(--border-strong);
  border-radius: 3px; /* multi-select: square */
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: transparent;
}
/* Design system: multi-select → square (.ck / .type-check-multi); single-select → circle (.ck-circle / .type-check). */
.dd-item .ck.ck-circle,
.dd-item.dd-item-single .ck {
  border-radius: 50%;
}
.dd-item.selected .ck { background: var(--text-primary); color: var(--bg-base); border-color: var(--text-primary); }
.dd-group-label {
  padding: 6px 12px 2px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tag {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 4px;
}
.tag-x { cursor: pointer; color: var(--text-muted); transition: color 0.1s; }
.tag-x:hover { color: var(--text-primary); }

/* ── CHIPS ── */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.chip:hover { border-color: #555; color: var(--text-primary); }
.chip.on { background: var(--text-primary); color: var(--bg-base); border-color: var(--text-primary); }

/* ── RANGE SLIDER ── */
.hist {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 52px;
  overflow: hidden;
  margin-bottom: 2px;
}
.hbar {
  flex: 1;
  background: var(--border-strong);
  border-radius: 2px 2px 0 0;
  min-height: 3px;
  transition: background 0.15s;
}
.hbar.in { background: #555; }

.slider-wrap {
  position: relative;
  height: 22px;
  margin-bottom: 10px;
}
.slider-track {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  left: 0; right: 0;
  height: 3px;
  background: var(--border-strong);
  border-radius: 2px;
  pointer-events: none;
}
.slider-fill {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  height: 3px;
  background: var(--text-primary);
  border-radius: 2px;
  pointer-events: none;
}

input[type="range"] {
  position: absolute;
  width: 100%;
  top: 50%; transform: translateY(-50%);
  -webkit-appearance: none;
  background: none;
  pointer-events: none;
  z-index: 2;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--bg-base);
  cursor: pointer;
  pointer-events: all;
  box-shadow: 0 0 0 1px var(--border-strong);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-primary);
  border: 2px solid var(--bg-base);
  cursor: pointer;
  pointer-events: all;
}

.minmax-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mm-wrap label {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
}
.mm-wrap input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}
.inp-suf-wrap {
  position: relative;
  width: 100%;
}
.inp-suf-wrap input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 42px 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.inp-suf-wrap input::placeholder {
  color: var(--text-ph);
}
.inp-suf-wrap input:focus {
  border-color: #555;
}
.inp-suf {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
  white-space: nowrap;
}
.mm-wrap input:focus { border-color: #555; }

/* ── PAYMENT SLIDER (single) ── */
.pay-val {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 6px;
}
.pay-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ── SELECT ── */
.sel {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 32px 9px 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s;
}
.sel:hover { border-color: #555; }
.sel option { background: var(--bg-card); }

/* infra grid removed — now uses dropdown */

/* ── LABEL ROW (label + inline mini-chips) ── */
.f-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.f-label-row .f-label { margin-bottom: 0; }

.sel-inline {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 22px 4px 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  transition: border-color 0.15s;
}
.sel-inline:hover { border-color: #555; }
.sel-inline option { background: var(--bg-card); }

/* ── EXTRA TOGGLE ── */
.extra-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 11px 0;
  border-top: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
  margin: 4px 0 16px;
  user-select: none;
}
.extra-toggle-lbl { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.extra-toggle-icon { color: var(--text-muted); font-size: 14px; transition: transform 0.2s; }
.extra-toggle.open .extra-toggle-icon { transform: rotate(180deg); }

.extra { display: block; }

.f-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 0 6px;
  border-top: 1px solid var(--border-mid);
  margin-top: 4px;
}
.f-group-title:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

.price-mode-seg {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  overflow: hidden;
}
.f-label-row .price-mode-seg {
  flex-shrink: 0;
  min-width: 148px;
}
.price-mode-btn {
  flex: 1;
  white-space: nowrap;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.price-mode-btn.active {
  background: var(--text-primary);
  color: var(--bg-base);
}

/* ── TRAVEL TIME FILTER ── */
.travel-wrap { display: flex; flex-direction: column; gap: 8px; }
.travel-search-wrap { position: relative; }
.travel-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
  z-index: 1;
}
.travel-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 9px 32px 9px 34px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
}
.travel-input:focus { border-color: #555; }
.travel-input::placeholder { color: var(--text-ph); }
.travel-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}
.travel-clear:hover { color: var(--text-primary); }
.travel-suggest {
  display: none;
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  z-index: 220;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.travel-suggest.open { display: block; }
.travel-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 9px 12px;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.travel-suggest-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.travel-suggest-empty {
  padding: 10px 12px;
  color: var(--text-muted);
  font-size: 12px;
}
.travel-slider-lbl {
  font-size: 12px;
  color: var(--text-muted);
}
.travel-slider-lbl strong { color: var(--text-primary); font-weight: 600; }
.travel-point {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle, var(--border-mid));
}
.travel-point:last-of-type { border-bottom: none; padding-bottom: 0; }
.travel-point:first-of-type { padding-top: 0; }
.travel-point-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.travel-point-badge { display: none; }
.travel-point-label,
.travel-point-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.travel-point-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.ho-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 8px;
  cursor: pointer;
  outline: none;
}
.ho-select:focus { border-color: var(--accent); }

/* ── APPLY ── */
.btn-apply {
  width: 100%;
  background: var(--text-primary);
  color: var(--bg-base);
  border: none;
  border-radius: var(--radius-md);
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.btn-apply:hover { opacity: 0.88; }

/* ════════════════════════════════
   MAIN
════════════════════════════════ */
.main {
  flex: 1;
  min-width: 0;
  background: var(--bg-app);
  padding: 24px;
}

.main-header {
  margin-top: 10px;
  margin-bottom: 8px;
}
.main-title { font-size: 20px; font-weight: 700; color: var(--text-primary); margin: 0 0 12px; }
.main-subrow {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
}
.main-found { font-size: 13px; color: var(--text-secondary); }
#desktop-sort { min-width: 180px; }

/* ── VIEW TOGGLE (Список / Карта) ── */
.view-toggle {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}
.view-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  background: none; border: none;
  color: var(--text-secondary);
  font-size: 12px; font-weight: 500;
  padding: 5px 12px; border-radius: 16px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.view-toggle-btn i { font-size: 14px; }
.view-toggle-btn.active { background: var(--bg-card); color: var(--text-primary); }

/* ── DESKTOP SEARCH BAR ── */
.main-search-sticky {
  position: sticky;
  top: var(--site-header-h);
  z-index: 10;
  background: var(--bg-app);
  padding: 12px 0;
  margin: -24px -24px 0;
  padding-left: 24px;
  padding-right: 24px;
}
.main-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 12px 0 0;
  transition: border-color 0.15s;
}
.main-search-wrap:focus-within {
  border-color: var(--text-muted);
}
.main-search-icon {
  color: var(--text-muted);
  font-size: 17px;
  padding: 0 10px 0 12px;
  display: flex;
  align-items: center;
  pointer-events: none;
  flex-shrink: 0;
}
.main-search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 11px 0;
  min-width: 0;
}
.main-search-input::placeholder { color: var(--text-ph); }
.main-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  display: none;
  line-height: 1;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.main-search-clear:hover { color: var(--text-secondary); }
.main-search-clear.visible { display: flex; }

/* ── CARDS GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

/* ── CARD ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color 0.15s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.card:hover { border-color: var(--border-strong); }

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.sl-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s;
}
.sl-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 5;
  padding: 0;
  font-size: 13px;
}
.card:hover .sl-btn { opacity: 1; }
.sl-btn:hover { background: rgba(0,0,0,0.75); }
.sl-prev { left: 7px; }
.sl-next { right: 7px; }
.sl-dots {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 4px;
  z-index: 5;
}
.sl-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transition: background 0.15s, transform 0.15s;
}
.sl-dot.on { background: #fff; transform: scale(1.2); }

.card-badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex; gap: 4px;
  z-index: 4;
  max-width: calc(100% - 52px);
}
.card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  transition: background 0.15s, color 0.15s, transform 0.15s, border-color 0.15s;
}
.card-fav:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: scale(1.06);
}
.card-fav.saved {
  color: #ff5c7a;
  background: rgba(255, 92, 122, 0.22);
  border-color: rgba(255, 92, 122, 0.55);
}
.card-fav.saved:hover {
  background: rgba(255, 92, 122, 0.32);
}
.badge {
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-primary);
}

.card-completion {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--border-mid);
}
.card-completion-fill {
  height: 100%;
  background: var(--text-secondary);
}

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

.card-price-sqm {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 6px;
}
.card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-dist {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 1px;
  display: flex;
  align-items: center;
}
.card-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.card-top-left { flex: 1; min-width: 0; }
.card-dev {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}
.card-dev-logo {
  height: 36px;
  width: auto;
  max-width: 88px;
  object-fit: contain;
  opacity: 0.75;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  margin-top: 2px;
}
@media (max-width: 768px) {
  .card-dev-logo { height: 32px; max-width: 78px; }
}
/* units table */
.units-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}
.units-table thead tr {
  border-bottom: 1px solid var(--border-mid);
}
.units-table thead th {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 0 5px;
  text-align: left;
}
.units-table tbody tr {
  border-bottom: 1px solid var(--border-mid);
}
.units-table tbody tr:last-child { border-bottom: none; }
.units-table tbody td {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 5px 0;
  text-align: left;
}
.units-table tbody td:first-child {
  color: var(--text-primary);
  font-weight: 500;
}
.units-table tbody td:not(:first-child) { text-align: right; }

.units-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.units-extra { display: none; }
.units-extra.open { display: table-row-group; }
.units-toggle {
  font-size: 12px;
  color: var(--accent);
  margin: 2px 0 10px;
  cursor: pointer;
  user-select: none;
}
.units-toggle:hover { opacity: 0.8; }

.card-meta { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.card-meta-row {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-secondary);
}
.card-meta-row i { font-size: 13px; color: var(--text-muted); flex-shrink: 0; }
.card-facts {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 12px;
}
.card-fact {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--border-mid);
  border-radius: 6px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.card-info {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-bottom: 12px;
}
.info-cell {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}
.info-lbl {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.info-val {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
}

.card-actions {
  display: flex;
  gap: 5px;
  margin-top: auto;
}

.act-btn {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-family: inherit;
  transition: all 0.12s;
}
.act-btn:hover { border-color: #555; color: var(--text-primary); }
.act-btn i { font-size: 14px; }
.act-btn.wide {
  flex: 1.6;
  background: var(--text-primary);
  color: var(--bg-base);
  border-color: var(--text-primary);
  font-weight: 600;
}
.act-btn.wide:hover { opacity: 0.9; color: var(--bg-base); }

/* ── NO RESULTS ── */
.empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
}
.empty i { font-size: 36px; display: block; margin-bottom: 12px; }
.empty p { font-size: 14px; margin-bottom: 6px; color: var(--text-secondary); }
.empty small { font-size: 12px; }

#catalog-map {
  display: none;
  height: min(70vh, 720px);
  min-height: 420px;
  width: 100%;
  border-radius: 12px;
  margin: 16px 0 24px;
  overflow: hidden;
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
}
#catalog-map.is-on { display: block; }
#catalog-map .leaflet-container { background: #1c1c1c; height: 100%; width: 100%; }
#catalog-map.is-on ~ #pagination,
#catalog-map.is-on ~ #load-more-wrap { display: none !important; }
.catalog-map-fallback {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
}
.catalog-map-popup-name { font-weight: 600; color: #111; margin-bottom: 2px; }
.catalog-map-popup-meta { font-size: 12px; color: #666; margin-bottom: 4px; }
.catalog-map-popup-price { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.catalog-map-popup a { color: #1d4ed8; font-size: 12px; }

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.pg-btn {
  min-width: 34px; height: 34px;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 0 6px;
  transition: all 0.12s;
}
.pg-btn:hover:not(:disabled):not(.on) { border-color: #555; color: var(--text-primary); }
.pg-btn.on { background: var(--text-primary); color: var(--bg-base); border-color: var(--text-primary); font-weight: 600; }
.pg-btn:disabled { opacity: 0.3; cursor: default; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }

/* ════════════════════════════════
   MOBILE BOTTOM-SHEET POPUP
════════════════════════════════ */
.mob-popup-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 550;
  backdrop-filter: blur(2px);
}
.mob-popup-overlay.open { display: block; }

.mob-popup {
  position: fixed;
  bottom: -100%; left: 0; right: 0;
  background: var(--bg-base);
  border-top: 1px solid var(--border-strong);
  border-radius: 16px 16px 0 0;
  z-index: 600;
  transition: bottom 0.28s cubic-bezier(0.4,0,0.2,1);
  max-height: 82dvh;
  display: flex; flex-direction: column;
}
.mob-popup.open { bottom: 0; }

.mob-popup-handle {
  width: 36px; height: 4px;
  background: var(--border-strong);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.mob-popup-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--border-mid);
  flex-shrink: 0;
}
.mob-popup-title { font-size: 15px; font-weight: 600; }
.mob-popup-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-secondary); font-size: 20px; padding: 0; line-height: 1;
}
.mob-popup-body {
  flex: 1; overflow-y: auto; padding: 16px;
  scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent;
}
.mob-popup-footer {
  padding: 10px 16px 20px;
  border-top: 1px solid var(--border-mid);
  flex-shrink: 0;
  display: flex; gap: 8px;
}
.mob-popup-reset {
  flex: 0 0 auto;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 11px 18px; color: var(--text-primary);
  font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.mob-popup-reset:active { background: var(--border-strong); }

/* ════════════════════════════════
   MOBILE TOP BAR
════════════════════════════════ */
.mob-top {
  display: none;
  position: fixed;
  top: var(--site-header-h); left: 0; right: 0;
  z-index: 300;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-mid);
  flex-direction: column;
}
.mob-logo { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.mob-res  { font-size: 12px; color: var(--text-secondary); }

/* icon-only filter button inside chips row */
.mob-filter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  align-self: stretch;
  background: var(--bg-base);
  border: none;
  border-radius: 0;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mob-filter-btn:active { background: var(--bg-elevated); }
.mob-filter-btn i { font-size: 18px; line-height: 1; }

.mob-badge {
  position: absolute;
  top: -6px; right: -6px;
  width: 18px; height: 18px;
  background: var(--text-primary);
  color: var(--bg-base);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* horizontal quick-filter chips row */
.mob-quick-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  overflow: hidden; /* clip scrollable area */
}
/* pinned filter button on the left */
.mob-filter-pin {
  flex-shrink: 0;
  border-right: 1px solid var(--border-mid);
  border-radius: 0;
  width: 48px;
  padding: 10px 0;
}
/* right-fade on the chips area */
.mob-quick-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 40px;
  background: linear-gradient(to right, transparent, var(--bg-app));
  pointer-events: none;
  z-index: 2;
}
.mob-quick {
  display: flex;
  flex: 1;
  overflow-x: auto;
  gap: 6px;
  padding: 10px 14px 10px 10px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.mob-quick::-webkit-scrollbar { display: none; }

/* results + sort bar */
/* ── MOBILE BOTTOM NAV ── */
:root { --mob-nav-h: 60px; }
.mob-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--mob-nav-h);
  background: var(--bg-base);
  border-top: 1px solid var(--border-mid);
  z-index: 600;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.mob-nav-items {
  display: flex;
  height: 100%;
  align-items: stretch;
}
.mob-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 2px;
  transition: color 0.15s;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mob-nav-item i { font-size: 20px; line-height: 1; flex-shrink: 0; }
.mob-nav-item.active { color: var(--text-primary); }
.mob-nav-item:active { opacity: 0.7; }
.mob-nav-item-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
  min-height: 14px;
}
.mob-nav-item-sub {
  font-size: 8.5px;
  font-weight: 400;
  color: inherit;
  opacity: 0.65;
  margin-top: 1px;
}
/* items without subtitle — add invisible placeholder to keep same height */
.mob-nav-item-label:not(:has(.mob-nav-item-sub))::after {
  content: '';
  display: block;
  height: 11px;
}

.mob-results-bar {
  display: none;
  background: var(--bg-app);
  border-bottom: 1px solid var(--border-mid);
  padding: 7px 14px;
  align-items: center;
  justify-content: space-between;
}
.mob-results-bar-count {
  font-size: 12px;
  color: var(--text-secondary);
}
.mob-results-bar-sort {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.mob-results-bar-sort i { font-size: 16px; }
.mob-results-bar-sort.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-base);
}
.mob-qchip {
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
}
.mob-qchip i { font-size: 15px; }
.mob-qchip:hover { color: var(--text-primary); border-color: #555; }
.mob-qchip.on { background: var(--text-primary); color: var(--bg-base); border-color: var(--text-primary); }

/* overlay */
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 400;
  backdrop-filter: blur(2px);
}
.mob-overlay.open { display: block; }

/* load more */
.load-more-wrap {
  display: none;
  justify-content: center;
  padding: 8px 0 24px;
}
.btn-load-more {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 11px 28px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s;
}
.btn-load-more:hover { border-color: #555; }

/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */
@media (max-width: 768px) {
  /* show mobile top bar + results bar */
  .mob-top { display: flex; }
  .mob-results-bar { display: flex; }
  .mob-nav { display: block; }
  .act-btn { min-height: 38px; padding: 10px 4px; font-size: 12px; }
  .act-btn i { font-size: 16px; }
  .mob-popup .chip, .sidebar .chip { min-height: 40px; padding: 9px 14px; font-size: 13px; }
  .mob-popup .sel-inline { min-height: 40px; padding: 8px 28px 8px 12px; font-size: 13px; }
  .mob-popup .mm-wrap input { padding: 11px 42px 11px 12px; font-size: 13px; }
  .mob-popup .mm-wrap label { font-size: 12px; }
  .sl-btn { display: none; }

  /* layout stacks */
  .page { flex-direction: column; }
  .page-wrap { padding: 0; }

  /* sidebar becomes bottom sheet */
  .sidebar {
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    top: auto;
    z-index: 500;
    width: 100%;
    max-width: 100%;
    height: 92dvh;
    border-radius: 16px 16px 0 0;
    border-right: none;
    border-top: 1px solid var(--border-strong);
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
  }
  .sidebar.mob-open { transform: translateY(0); }
  .sidebar-header { padding: 16px 16px 14px; border-bottom: 1px solid var(--border-mid); }
  .sidebar-body { padding: 12px 16px 0; }

  /* push main down under fixed topbar */
  .main {
    padding: 16px;
    padding-top: calc(var(--mob-top-h, 100px) + 8px);
    padding-bottom: calc(var(--mob-nav-h, 64px) + 12px);
  }

  /* single column cards */
  .grid { grid-template-columns: 1fr; gap: 12px; }

  /* hide desktop pagination, show load-more */
  .pagination { display: none; }
  .load-more-wrap { display: flex; }

  /* hide desktop search+header bar */
  .main-search-sticky { display: none; }

  /* sidebar close btn */
  .sidebar-close { display: flex !important; }
}

.f-check{display:flex;align-items:center;gap:9px;padding:7px 0;cursor:pointer;color:var(--text-secondary);font-size:12px}
.f-check:hover{color:var(--text-primary)}
.f-check-box{width:16px;height:16px;border:1px solid var(--border-strong);border-radius:4px;background:var(--bg-card);display:flex;align-items:center;justify-content:center;font-size:11px;color:transparent;flex-shrink:0}
.f-check.on .f-check-box{background:#fff;border-color:#fff;color:#0a0a0a}
.yr-inp{width:100%;background:var(--bg-card);border:1px solid var(--border-mid);border-radius:var(--radius-sm);color:var(--text-primary);font-family:inherit;font-size:12px;padding:8px 10px;outline:none}
.yr-inp:focus{border-color:#555}
.card-price-main{font-size:14px;font-weight:700;color:var(--green);letter-spacing:-.01em;margin-bottom:6px}

/* ── LOC/TYPE/LAYOUT PANELS (from offplan) ── */
.loc-wrap { position: relative; width: 100%; }
.loc-trigger { width: 100%; }

.loc-panel {
  display: none;
  position: fixed;
  z-index: 1200;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  overflow: hidden;
  flex-direction: column;
}
.loc-panel.open { display: flex; }

.loc-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border-mid);
}
.loc-selected[hidden] { display: none !important; }

.loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
}
.loc-chip i { font-size: 12px; color: var(--text-muted); }
.loc-chip:hover i { color: var(--text-primary); }
.loc-chip-clear { color: var(--text-secondary); }
.loc-chip-more { font-size: 12px; color: var(--text-muted); align-self: center; }

.loc-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-mid);
  background: var(--bg-card);
}
.loc-search i { color: var(--text-muted); font-size: 15px; }
.loc-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}
.loc-search input::placeholder { color: var(--text-ph); }
.loc-search-static {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--bg-elevated);
}

.loc-cols {
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  min-height: 180px;
  height: 280px;
  max-height: 50vh;
  overflow: hidden;
}
.loc-col {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #555 transparent;
  touch-action: pan-y;
}
.loc-col-l { flex: 0 0 32%; max-width: 32%; }
.loc-col-m { flex: 0 0 34%; max-width: 34%; background: var(--bg-elevated); border-right: 1px solid var(--border-mid); }
.loc-col-r { flex: 1 1 auto; background: var(--bg-elevated); }
.loc-col::-webkit-scrollbar { width: 8px; }
.loc-col::-webkit-scrollbar-track { background: transparent; }
.loc-col::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
}
.loc-col::-webkit-scrollbar-thumb:hover { background: #777; }
.loc-col-l { border-right: 1px solid var(--border-mid); }
.loc-col-title {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-elevated);
}
.loc-col-l .loc-col-title { background: var(--bg-card); }
.loc-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.loc-row:hover { background: var(--bg-elevated); color: var(--text-primary); }
.loc-row.focus { background: var(--bg-elevated); color: var(--text-primary); }
.loc-row.chosen { color: var(--text-primary); }
.loc-row.on {
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
}
.loc-row i { font-size: 14px; color: var(--text-muted); flex-shrink: 0; }
.loc-row.on i { color: var(--text-primary); }
.loc-empty {
  padding: 16px 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.loc-mob-cols {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 0;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 52vh;
}
.loc-mob-cols.loc-mob-cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}
.loc-mob-cols .loc-col { max-height: 52vh; }
.loc-mob-cols .loc-col-l,
.loc-mob-cols .loc-col:not(:last-child) { border-right: 1px solid var(--border-mid); }

@media (max-width: 768px) {
  .loc-cols {
    flex-direction: column;
    height: auto;
    max-height: 62vh;
  }
  .loc-mob-cols,
  .loc-mob-cols.loc-mob-cols-3 {
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 62vh;
  }
  .loc-col-l,
  .loc-col-m,
  .loc-col-r {
    flex: 0 0 auto;
    max-width: none;
    max-height: none;
    height: auto;
  }
  .loc-col-l {
    max-height: 22vh;
    border-right: none;
    border-bottom: 1px solid var(--border-mid);
  }
  .loc-col-m {
    max-height: 22vh;
    border-right: none;
    border-bottom: 1px solid var(--border-mid);
  }
  .loc-col-r {
    flex: 1 1 auto;
    max-height: 28vh;
  }
  .loc-mob-cols .loc-col {
    border-right: none !important;
    border-bottom: 1px solid var(--border-mid);
    max-height: 22vh;
  }
  .loc-mob-cols .loc-col:last-child {
    border-bottom: none;
    max-height: 28vh;
  }
  .loc-row {
    padding: 12px 14px;
    min-height: 44px;
    font-size: 14px;
  }
}

/* ── TYPE PICKER (Bayut-style) ── */
.type-wrap { position: relative; width: 100%; }
.type-trigger { width: 100%; }

.type-panel {
  display: none;
  position: fixed;
  z-index: 1200;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  overflow: hidden;
  flex-direction: column;
}
.type-panel.open { display: flex; }

.type-tabs,
.type-tabs-static {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border-mid);
  padding: 0 8px;
  flex-shrink: 0;
}
.type-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  padding: 12px 8px 10px;
  cursor: pointer;
}
.type-tab.on {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}
.type-tabs-4 .type-tab {
  font-size: 12px;
  padding: 11px 4px 9px;
  white-space: nowrap;
}

.type-grid,
.type-grid-static {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 10px;
  overflow-y: auto;
  max-height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}

.type-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.type-opt:hover { background: var(--bg-elevated); color: var(--text-primary); }
.type-opt.on {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.type-opt-all {
  grid-column: 1 / -1;
  font-weight: 600;
  border-bottom: 1px solid var(--border-mid);
  border-radius: 0;
  margin-bottom: 2px;
  padding-bottom: 12px;
}

.type-check {
  width: 18px;
  height: 18px;
  border-radius: 50%; /* single-select: circle */
  border: 1.5px solid var(--border-strong);
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: transparent;
}
/* multi-select: square checks */
.type-check-multi {
  border-radius: 4px;
}
.type-check-single {
  border-radius: 50%;
}
.type-opt.on .type-check {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-base);
}

.type-actions,
.type-actions-static {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border-mid);
  flex-shrink: 0;
}
.type-btn {
  flex: 1;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.type-btn-reset {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.type-btn-reset:hover { border-color: #555; }
.type-btn-apply {
  background: var(--text-primary);
  border: 1px solid var(--text-primary);
  color: var(--bg-base);
}
.type-btn-apply:hover { opacity: 0.92; }

@media (max-width: 480px) {
  .type-grid, .type-grid-static { grid-template-columns: 1fr; max-height: 42vh; }
}

/* ── LAYOUT PICKER (Bayut beds + baths) ── */
.layout-wrap { position: relative; width: 100%; }
.layout-trigger { width: 100%; }

.layout-panel {
  display: none;
  position: fixed;
  z-index: 1200;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 36px rgba(0,0,0,0.55);
  overflow: hidden;
  flex-direction: column;
}
.layout-panel.open { display: flex; }

.layout-section { padding: 12px 12px 4px; }
.layout-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.layout-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.layout-chip {
  min-width: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}
.layout-chip:hover { border-color: #555; color: var(--text-primary); }
.layout-chip.on {
  background: var(--text-primary);
  color: var(--bg-base);
  border-color: var(--text-primary);
  font-weight: 600;
}
.layout-mob .layout-section { padding: 4px 0 12px; }
.layout-mob .type-actions-static { margin-top: 4px; }

