/* Портал relto.pro: пошук, плитки об'єктів, каталог, сторінка об'єкта, агентства. Токени — з relto.css. */
.hb-min0 { min-width: 0; }
.hb-page { padding-top: 24px; padding-bottom: 64px; }
@media (max-width: 560px) { .wrap { padding-left: 16px; padding-right: 16px; } }  /* не скорочено: інакше обнуляє padding-top/bottom у .wrap.hb-page */

/* hero з пошуком */
.hb-hero { padding: 56px 0 40px; background:
  radial-gradient(900px 420px at 85% -10%, rgba(34, 197, 94, .18), transparent 60%),
  radial-gradient(700px 360px at -10% 110%, rgba(245, 158, 11, .10), transparent 60%), var(--bg); }
.hb-hero h1 { max-width: 820px; }
.hb-hero h1 span { color: var(--brand); }
.hb-hero .lead { margin-bottom: 24px; }
.hb-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hb-quick a { padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: .9rem; }
.hb-quick a:hover { border-color: var(--brand); color: var(--brand); }
.hb-quick small { color: var(--muted); font-weight: 600; margin-left: 2px; }

.hb-search { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 14px; max-width: 1060px; }
.hb-search.is-compact { box-shadow: none; border-radius: 16px; max-width: none; }
.hb-deal-switch { display: inline-flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 12px; margin-bottom: 12px; }
.hb-deal-switch input { position: absolute; opacity: 0; pointer-events: none; }
.hb-deal-switch span { display: block; padding: 7px 16px; border-radius: 9px; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--muted); }
.hb-deal-switch input:checked + span { background: var(--card); color: var(--brand-d); box-shadow: var(--shadow); }
.hb-deal-switch input:focus-visible + span { outline: 2px solid var(--brand); }
.hb-search-fields { display: grid; grid-template-columns: 1.2fr 1fr 1.3fr .9fr auto; gap: 10px; align-items: end; }
.hb-search.is-compact .hb-search-fields { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hb-f { display: grid; gap: 4px; min-width: 0; }
.hb-f > span { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.hb-f select, .hb-f input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; }
.hb-f select:focus, .hb-f input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.hb-f-range > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hb-check { display: flex; align-items: center; gap: 8px; font-weight: 600; padding: 11px 0; }
.hb-check input { width: 18px; height: 18px; accent-color: var(--brand); }
.hb-go { height: 46px; }
@media (max-width: 960px) { .hb-search-fields { grid-template-columns: 1fr 1fr; } .hb-go { grid-column: 1 / -1; } }
@media (max-width: 520px) { .hb-search-fields, .hb-search.is-compact .hb-search-fields { grid-template-columns: 1fr; } .hb-hero { padding: 32px 0 28px; } }

/* секції */
.hb-sec { padding: 48px 0; }
.hb-sec-in { padding-top: 48px; }
.hb-soft { background: var(--soft); }
.hb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.hb-head h2 { margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.hb-head a { font-weight: 700; white-space: nowrap; }
.hb-rubrics { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.hb-rubrics a { flex: none; padding: 10px 16px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-d); font-weight: 700; font-size: .92rem; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.hb-rubrics a:hover { border-color: var(--brand); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hb-rubrics a { color: #6ee7a0; background: #12301f; } }
:root[data-theme="dark"] .hb-rubrics a { color: #6ee7a0; background: #12301f; }
@media (max-width: 620px) {  /* на телефоні — одна прокручувана стрічка без смуги прокрутки */
  .hb-rubrics { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 24px; padding: 0 16px; scroll-snap-type: x proximity; }
  .hb-rubrics::-webkit-scrollbar { display: none; }
  .hb-rubrics a { scroll-snap-align: start; }
}
.hb-rubrics a i { font-size: .75rem; margin-left: 4px; }

/* плитки */
.hb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .hb-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .hb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 520px) { .hb-grid { grid-template-columns: 1fr; } }
.hb-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; min-width: 0; }
.hb-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.hb-tile-img { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.hb-tile-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 2rem; }
.hb-count, .hb-deal { position: absolute; bottom: 10px; padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.hb-count { right: 10px; background: rgba(15, 23, 42, .72); color: #fff; }
.hb-deal { left: 10px; top: 10px; bottom: auto; background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.hb-tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.hb-price { font-size: 1.2rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.hb-price small { font-size: .8rem; font-weight: 600; color: var(--muted); }
.hb-title { font-size: .98rem; font-weight: 700; margin: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hb-title a { color: var(--ink); }
.hb-title a:hover { color: var(--brand); }
.hb-loc { color: var(--muted); font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-loc i, .hb-facts i { color: var(--brand); }
.hb-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; color: var(--text); }
.hb-agency { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.hb-empty { text-align: center; padding: 56px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.hb-empty > i { font-size: 2rem; color: var(--brand); margin-bottom: 10px; }

/* агентства */
.hb-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.hb-ag-mini { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 18px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.hb-ag-mini:hover { border-color: var(--brand); color: var(--ink); }
.hb-ag-mini img, .hb-ag-mini .hb-ag-ph { width: 64px; height: 64px; object-fit: contain; border-radius: 14px; }
.hb-ag-mini b { font-size: .95rem; line-height: 1.25; }
.hb-ag-mini small { color: var(--muted); }
.hb-ag-ph { display: inline-grid; place-items: center; background: var(--brand-soft); color: var(--brand-d); font-weight: 800; font-size: 1.4rem; }
.hb-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: var(--card); border: 1px solid var(--line); flex: none; }
.hb-logo-lg { width: 96px; height: 96px; border-radius: 20px; font-size: 2.2rem; }
.hb-logo-box { display: inline-grid; place-items: center; padding: 6px; overflow: hidden; }
.hb-logo-lg.hb-logo-box { padding: 10px; }
.hb-logo-box img { width: 100%; height: 100%; object-fit: contain; border-radius: 0; display: block; }
.hb-logo-box .hb-logo-d { display: none; }
.hb-ag-mini .hb-logo-mini { width: 64px; height: 64px; border-radius: 14px; }
.hb-ag-mini .hb-logo-box.hb-logo-mini img { width: 100%; height: 100%; border-radius: 0; }
:root[data-theme="dark"] .hb-logo-box.has-dark .hb-logo-l { display: none; }
:root[data-theme="dark"] .hb-logo-box.has-dark .hb-logo-d { display: block; }
:root[data-theme="dark"] .hb-logo-box.is-plate { background: #fff; border-color: #fff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hb-logo-box.has-dark .hb-logo-l { display: none; }
  :root:not([data-theme="light"]) .hb-logo-box.has-dark .hb-logo-d { display: block; }
  :root:not([data-theme="light"]) .hb-logo-box.is-plate { background: #fff; border-color: #fff; }
}
.hb-ag-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 40px; }
@media (max-width: 960px) { .hb-ag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .hb-ag-grid { grid-template-columns: 1fr; } }
.hb-ag-card { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--ink); }
.hb-ag-card:hover { border-color: var(--brand); color: var(--ink); box-shadow: var(--shadow); }
.hb-ag-card > span:not(.hb-logo) { display: grid; gap: 2px; flex: 1; }
.hb-ag-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-ag-n { color: var(--brand-d); font-weight: 700; }
.hb-ag-go { color: var(--muted); }
.hb-ag-head { display: flex; gap: 20px; align-items: center; margin: 8px 0 20px; }
.hb-ag-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin-bottom: .3em; }
.hb-ag-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.hb-ag-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hb-about { max-width: 820px; margin-bottom: 32px; }
@media (max-width: 560px) { .hb-ag-head { flex-direction: column; align-items: flex-start; } }

.hb-banner { background: radial-gradient(700px 300px at 90% 0, rgba(34, 197, 94, .35), transparent 60%), var(--hero); color: #d1e7da; border-radius: 24px; padding: 40px; display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.hb-banner h2 { color: #fff; margin-bottom: .3em; font-size: clamp(1.3rem, 2.6vw, 1.9rem); }
.hb-banner p { margin: 0; max-width: 620px; }
.hb-banner .eyebrow { color: #86efac; }
.hb-banner-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hb-banner-sm { padding: 28px; }
@media (max-width: 560px) { .hb-banner { padding: 26px 18px; } }

/* каталог */
.hb-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.hb-crumbs i { font-size: .6rem; }
.hb-crumbs a { color: var(--muted); }
.hb-crumbs a:hover { color: var(--brand); }
.hb-list-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hb-list-head h1 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); margin: 0; }
.hb-filter-box { margin-bottom: 14px; }
.hb-filter-box > summary { cursor: pointer; display: inline-flex; gap: 8px; align-items: center; font-weight: 700; padding: 8px 14px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; list-style: none; }
.hb-filter-box > summary::-webkit-details-marker { display: none; }
.hb-toolbar { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.hb-sorts, .hb-views { display: flex; gap: 4px; padding: 4px; background: var(--soft); border-radius: 12px; overflow-x: auto; max-width: 100%; }
.hb-sorts a, .hb-views a { padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--muted); white-space: nowrap; }
.hb-sorts a.on, .hb-views a.on { background: var(--card); color: var(--brand-d); box-shadow: var(--shadow); }
.hb-map { height: min(70vh, 640px); border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 10px; z-index: 0; }
.hb-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.hb-pager a, .hb-pager span { min-width: 42px; height: 42px; padding: 0 10px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.hb-pager a:hover { border-color: var(--brand); color: var(--brand); }
.hb-pager .on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hb-pager .gap { border: 0; }
.hb-pop { width: 220px; font: 13px/1.4 "Manrope", system-ui, sans-serif; }
.hb-pop img { width: 100%; height: 120px; object-fit: cover; border-radius: 8px; display: block; margin-bottom: 6px; }
.hb-pop b { display: block; font-size: 14px; color: #0f172a; }
.hb-pop a { color: #0f172a; font-weight: 700; }

/* сторінка об'єкта */
.hb-obj-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.hb-obj-head h1 { font-size: clamp(1.4rem, 3vw, 2.1rem); margin-bottom: .35em; overflow-wrap: anywhere; }
.hb-obj-sub { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .95rem; }
.hb-obj-sub i { color: var(--brand); }
.hb-obj-price { text-align: right; flex: none; }
.hb-obj-price b { display: block; font-size: clamp(1.4rem, 3vw, 2rem); color: var(--ink); font-weight: 800; }
.hb-obj-price span { color: var(--muted); }
@media (max-width: 720px) { .hb-obj-head { flex-direction: column; gap: 6px; } .hb-obj-price { text-align: left; } }
.hb-obj-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
@media (max-width: 960px) { .hb-obj-grid { grid-template-columns: minmax(0, 1fr); } }
.hb-gallery { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--soft); }
.hb-gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; aspect-ratio: 3 / 2; }
.hb-gal-track::-webkit-scrollbar { display: none; }
.hb-gal-item { flex: 0 0 100%; scroll-snap-align: start; display: block; }
.hb-gal-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #0f172a; cursor: pointer; box-shadow: var(--shadow); }
.hb-gal-nav.prev { left: 12px; } .hb-gal-nav.next { right: 12px; }
.hb-gal-count { position: absolute; right: 12px; bottom: 12px; background: rgba(15, 23, 42, .72); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.hb-gallery-empty { aspect-ratio: 3 / 2; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--muted); font-size: 1rem; }
.hb-gallery-empty i { font-size: 2.4rem; }
.hb-thumbs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; }
.hb-thumbs button { flex: none; width: 84px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: none; opacity: .75; }
.hb-thumbs button.on { border-color: var(--brand); opacity: 1; }
.hb-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hb-keyfacts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.hb-keyfacts div { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.hb-keyfacts i { color: var(--brand); }
.hb-keyfacts span { color: var(--muted); font-size: .88rem; }
section.hb-block { margin-top: 28px; padding: 0; }
.hb-block h2 { font-size: 1.3rem; }
.hb-params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.hb-params div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.hb-params dt { color: var(--muted); }
.hb-params dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; overflow-wrap: anywhere; }
@media (max-width: 620px) { .hb-params { grid-template-columns: minmax(0, 1fr); } }
.hb-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.hb-features span { padding: 5px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-d); font-size: .88rem; font-weight: 600; }
.hb-features i { margin-right: 6px; font-size: .78rem; }
.hb-descr { overflow-wrap: anywhere; }
.hb-obj-map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.hb-side { display: grid; gap: 14px; position: sticky; top: 84px; }
@media (max-width: 960px) { .hb-side { position: static; } }
.hb-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.hb-box-title { font-size: 1.1rem; margin: 0 0 4px; }
.hb-box form { display: grid; }
.hb-person { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.hb-person b { display: block; overflow: hidden; text-overflow: ellipsis; }
.hb-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.hb-avatar-ph { display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-d); font-size: 1.3rem; }
.hb-links { display: grid; gap: 4px; }
.hb-links a { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .92rem; }
.hb-note { margin: 8px 0 0; }

/* повноекранний перегляд фото */
.hb-gal-item { cursor: zoom-in; }
.hb-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(8, 10, 14, .94); display: flex; align-items: center; justify-content: center; }
.hb-lb[hidden] { display: none; }
.hb-lb-img { max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); object-fit: contain; user-select: none; }
.hb-lb-btn { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 1.25rem; display: grid; place-items: center; cursor: pointer; }
.hb-lb-btn:hover, .hb-lb-btn:focus-visible { background: rgba(255, 255, 255, .28); outline: none; }
.hb-lb-close { top: 16px; right: 16px; }
.hb-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.hb-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.hb-lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; background: rgba(0, 0, 0, .45);
  padding: 4px 12px; border-radius: 999px; font-size: .9rem; }
html.hb-lb-open, html.hb-lb-open body { overflow: hidden; }
@media (max-width: 575px) { .hb-lb-prev, .hb-lb-next { width: 40px; height: 40px; } .hb-lb-prev { left: 8px; } .hb-lb-next { right: 8px; } }
