/* Belbaza global layout & performance fixes */

/* Demo glamping promo on homepage — removed */
#cabins-glamping {
  display: none !important;
}

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

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: clip;
  margin: 0;
  padding-bottom: 0;
}

#root {
  overflow-x: clip;
  width: 100%;
  min-height: 100dvh;
}

/* Cold load only — do not override Framer exit animations during SPA navigation */
html.bb-portal-redirect #root { opacity: 0 !important; }
html.bb-portal-redirect body::before {
  content: 'Переход к размещению…';
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0A1628;
  color: #94A3B8;
  font-family: Inter, system-ui, sans-serif;
}

html.bb-first-paint #root,
html.bb-first-paint #root > div {
  opacity: 1 !important;
}

img {
  content-visibility: auto;
  contain-intrinsic-size: 300px 200px;
  max-width: 100%;
}

img[loading="lazy"] {
  background: #0f172a;
}

/* Equal-height card grids — exclude rent list (horizontal cards) */
.grid:not(.bb-rent-grid) {
  align-items: stretch;
}

/* Rent page: horizontal list cards must not stretch to row height */
.bg-off-white .grid {
  align-items: start;
}

.bg-off-white .grid > div,
.bg-off-white .grid > a {
  height: auto !important;
  align-self: start;
}

/* ── Clean listing cards (/realty /rent) ── */
.bb-rent-grid {
  align-items: start !important;
  gap: 12px !important;
  grid-template-columns: 1fr !important;
}
.bb-rent-grid > * {
  height: auto !important;
  align-self: start !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Horizontal card: photo | content */
.bb-rent-grid .rounded-2xl,
.bb-rent-grid [class*="rounded-2xl"] {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  border-radius: 14px !important;
  overflow: hidden !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: none !important;
}

/* Photo: fixed landscape 4:3 — never stretch to card height */
.bb-rent-grid .rounded-2xl > .relative,
.bb-rent-grid [class*="rounded-2xl"] > .relative {
  aspect-ratio: 4 / 3 !important;
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
  height: 165px !important;
  min-height: 165px !important;
  max-height: 165px !important;
  flex: 0 0 220px !important;
  align-self: center !important;
  border-radius: 0 !important;
}
.bb-rent-grid .rounded-2xl > .relative img,
.bb-rent-grid [class*="rounded-2xl"] > .relative img,
.bb-rent-grid .rounded-2xl > .relative [class*="bg-cover"],
.bb-rent-grid [class*="rounded-2xl"] > .relative [style*="background-image"] {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  background-size: cover !important;
  background-position: center !important;
}

/* Hide noisy chrome on list photos */
.bb-rent-grid .rounded-2xl > .relative > button,
.bb-rent-grid [class*="rounded-2xl"] > .relative > button,
.bb-rent-grid .rounded-2xl > .relative > div.absolute.bottom-8,
.bb-rent-grid .rounded-2xl > .relative > div.absolute.bottom-3.right-3,
.bb-rent-grid .rounded-2xl > .relative > span.absolute.top-3.right-3,
.bb-rent-grid [class*="rounded-2xl"] > .relative > span.absolute[class*="bg-teal"],
.bb-rent-grid [class*="rounded-2xl"] > .relative [class*="bg-teal"][class*="absolute"] {
  display: none !important;
}

/* Content column — compact */
.bb-rent-grid .flex-1.p-5,
.bb-rent-grid [class*="rounded-2xl"] > .flex-1 {
  padding: 12px 14px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  gap: 0 !important;
  justify-content: space-between !important;
}
.bb-rent-grid h3 {
  font-size: 16px !important;
  line-height: 1.3 !important;
  -webkit-line-clamp: 2 !important;
  margin: 0 0 4px !important;
  min-height: 0 !important;
  color: #F8FAFC !important;
}

/* Hide bulky blocks: AI text, long description, duplicate tags, year chip clutter */
.bb-rent-grid .flex-1.p-5 > div:first-of-type > :nth-child(4),
.bb-rent-grid .flex-1.p-5 > div:first-of-type > :nth-child(n+5),
.bb-rent-grid [class*="rounded-2xl"] .flex-1 > div:first-of-type > p,
.bb-rent-grid [class*="rounded-2xl"] .flex-1 > div:first-of-type > div[class*="flex-wrap"][class*="gap-1"] {
  display: none !important;
}

.bb-rent-grid .flex-1.p-5 > div.border-t,
.bb-rent-grid [class*="rounded-2xl"] .flex-1 > div.border-t {
  margin-top: 10px !important;
  padding-top: 10px !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}
.bb-rent-grid .flex-1.p-5 > div.border-t button,
.bb-rent-grid [class*="rounded-2xl"] .flex-1 > div.border-t button {
  font-size: 13px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
}

@media (max-width: 640px) {
  .bb-rent-grid .rounded-2xl,
  .bb-rent-grid [class*="rounded-2xl"] {
    flex-direction: column !important;
  }
  .bb-rent-grid .rounded-2xl > .relative,
  .bb-rent-grid [class*="rounded-2xl"] > .relative {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    aspect-ratio: 16 / 10 !important;
    height: auto !important;
  }
}

/* Map mode: balanced columns (desktop) — list is first child, map is .bb-realty-map-col */
body.bb-realty-map-mode .bg-off-white [class*="flex"][class*="lg:flex-row"] > :first-child:not(.bb-realty-map-col) {
  flex: 1 1 55% !important;
  min-width: 0 !important;
  max-width: none !important;
}
body.bb-realty-map-mode .bb-realty-map-col,
body.bb-realty-map-mode .bg-off-white [class*="flex-[60]"] {
  flex: 0 0 42% !important;
  width: 42% !important;
  max-width: 560px !important;
}
body.bb-realty-map-mode .bb-rent-grid {
  grid-template-columns: 1fr !important;
}

.bg-off-white .rounded-2xl.flex {
  height: auto !important;
  min-height: 0;
}

.bg-off-white .rounded-2xl .flex-1 {
  flex: 1 1 auto;
}

.grid > a,
.grid > div {
  min-height: 0;
}

a[class*="rounded-2xl"],
a[class*="rounded-xl"],
a[class*="rounded-3xl"] {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Card text alignment */
.grid h3,
a[class*="rounded-2xl"] h3,
a[class*="rounded-xl"] h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  min-height: 2.7em;
}

/* Page headings */
h1 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* Horizontal filter rows */
[class*="overflow-x-auto"] {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

[class*="overflow-x-auto"]::-webkit-scrollbar {
  display: none;
}

/* Map popup thumbnails */
[style*="z-index: 999999"] img {
  object-fit: cover !important;
  background: #0f172a;
  min-width: 56px;
  min-height: 56px;
}

/* Map price markers */
[style*="border-radius: 50%"][style*="cursor: pointer"] {
  transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

[style*="border-radius: 50%"][style*="cursor: pointer"]:hover {
  transform: scale(1.15) !important;
  box-shadow: 0 3px 10px rgba(0, 212, 170, 0.35) !important;
}

/* Hero sections — static slideshow, no zoom animation */
[style*="kenBurns"] {
  animation: none !important;
  transform: none !important;
  will-change: auto;
}

/* Property cards — sale/rent: cabin-style photo cards */
.bg-off-white .bb-property-grid {
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

@media (max-width: 640px) {
  .bg-off-white .bb-property-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
}

@media (min-width: 1100px) {
  .bg-off-white .bb-property-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.bg-off-white .bb-property-grid > div {
  height: auto !important;
  align-self: start;
  min-height: 0;
}

.bg-off-white .bb-property-grid .rounded-2xl {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 0 !important;
  width: 100%;
  border-radius: 12px !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06) !important;
}

.bg-off-white .bb-property-grid .rounded-2xl:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1) !important;
}

.bg-off-white .bb-property-grid .rounded-2xl.overflow-hidden {
  min-height: 0 !important;
}

.bg-off-white .bb-property-grid .rounded-2xl > .relative {
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  width: 100% !important;
  max-height: none;
}

.bg-off-white .bb-property-grid .rounded-2xl > .relative img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide photo chrome — keep image clean */
.bg-off-white .bb-property-grid .rounded-2xl > .relative > button,
.bg-off-white .bb-property-grid .rounded-2xl > .relative > div.absolute.bottom-8,
.bg-off-white .bb-property-grid .rounded-2xl > .relative > div.absolute.bottom-3.right-3,
.bg-off-white .bb-property-grid .rounded-2xl > .relative > div.absolute.bottom-3.left-3,
.bg-off-white .bb-property-grid .rounded-2xl > .relative > span.absolute {
  display: none !important;
}

.bg-off-white .bb-property-grid .flex-1.p-5 {
  padding: 12px 14px 14px !important;
  gap: 0 !important;
}

.bg-off-white .bb-property-grid .flex-1.p-5 > div:first-of-type > :nth-child(2),
.bg-off-white .bb-property-grid .flex-1.p-5 > div:first-of-type > :nth-child(4),
.bg-off-white .bb-property-grid .flex-1.p-5 > div:first-of-type > :nth-child(n+5) {
  display: none !important;
}

.bg-off-white .bb-property-grid h3 {
  min-height: 0 !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  -webkit-line-clamp: 2 !important;
  margin: 0 !important;
}

.bg-off-white .bb-property-grid .flex-1.p-5 > div:first-of-type > :nth-child(3) {
  font-size: 14px !important;
  margin-top: 4px !important;
  line-height: 1.2 !important;
  color: #00D4AA !important;
  font-weight: 600 !important;
}

.bg-off-white .bb-property-grid .flex-1.p-5 > div.border-t {
  margin-top: 6px !important;
  padding-top: 0 !important;
  border-top: none !important;
  justify-content: stretch !important;
}

.bg-off-white .bb-property-grid .flex-1.p-5 > div.border-t button {
  width: 100% !important;
  font-size: 11px !important;
  padding: 5px 8px !important;
  border-radius: 8px !important;
}

.bg-off-white .bb-property-grid .rounded-2xl .flex-1 {
  flex: 0 1 auto !important;
}

/* Map containers only — never stretch listing photo cards */
.bb-realty-map-panel,
.bb-detail-map,
[class*="rounded-2xl"][class*="overflow-hidden"][class*="h-[300"],
[class*="rounded-2xl"][class*="overflow-hidden"][class*="h-[320"],
[class*="rounded-2xl"][class*="overflow-hidden"][class*="min-h-[280"] {
  min-height: 280px;
}

.bg-off-white .bb-property-grid .rounded-2xl.overflow-hidden,
.bb-rent-grid .rounded-2xl.overflow-hidden,
.bb-rent-grid [class*="rounded-2xl"] {
  min-height: 0 !important;
}

/* Cabin / catalog grid photos — landscape 4:3, not tall */
.bg-off-white .grid [class*="rounded-2xl"] > .relative[class*="aspect"],
.bg-off-white .grid [class*="rounded-2xl"] > .relative.aspect-square,
.bg-off-white .grid a[class*="rounded"] > .relative.aspect-square,
.bg-off-white .grid .aspect-square,
.bg-off-white a .aspect-square,
.bg-off-white .aspect-square {
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.bg-off-white .grid [class*="rounded-2xl"] > .relative[class*="aspect"] img,
.bg-off-white .grid .aspect-square img,
.bg-off-white .aspect-square img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.bg-off-white .bb-property-grid .rounded-2xl > .relative {
  aspect-ratio: 4 / 3 !important;
}

/* Cabins list: keep card media uniform (portrait uploads must not stretch the grid) */
body.bb-cabins-active:not(.bb-cabins-map-mode) #root a[href^="/cabin/"] img,
body.bb-cabins-active:not(.bb-cabins-map-mode) #root [class*="grid-cols"] a[href*="/cabin"] img {
  width: 100% !important;
  height: 180px !important;
  max-height: 180px !important;
  object-fit: cover !important;
  display: block !important;
}
body.bb-cabins-active:not(.bb-cabins-map-mode) #root a[href^="/cabin/"] .relative,
body.bb-cabins-active:not(.bb-cabins-map-mode) #root [class*="grid-cols"] a[href*="/cabin"] .relative {
  aspect-ratio: 4 / 3 !important;
  overflow: hidden !important;
}

/* Footer full width — never accept injected catalog cards */
footer {
  width: 100%;
  position: relative;
  z-index: 4;
  isolation: isolate;
  clear: both;
}
footer .bb-published-cabin-card,
footer .bb-hf-card,
footer .bb-cabin-card,
footer a[data-bb-published],
footer [class*="bb-hf-"],
footer > .grid > a,
footer > div > .grid > a[href*="/cabin"],
footer > div > .grid > a[href*="/property"] {
  display: none !important;
}

/* News article readability on mobile */
@media (max-width: 767px) {
  [class*="NewsArticle"] ,
  body[data-bb-path^="/news/"] #root main .prose,
  #root main .prose.prose-invert {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  #root main .max-w-\[800px\] {
    padding-left: 1.1rem !important;
    padding-right: 1.1rem !important;
    box-sizing: border-box;
    width: 100%;
  }
  #root main .prose.prose-invert,
  #root main .prose.prose-invert p {
    max-width: 100% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.65 !important;
    font-size: 1rem !important;
    color: #e2e8f0 !important;
  }
  #root main .prose.prose-invert {
    padding-bottom: 5.5rem; /* space above chat FAB */
  }
}

@media (max-width: 767px) {
  body.bb-cabins-active.bb-cabins-map-mode {
    padding-bottom: 0 !important;
  }

  /* Home / cabins hero — prevent title clipping on mobile */
  section[class*="h-screen"][class*="min-h-"],
  section.relative.min-h-\[100dvh\] {
    min-height: auto !important;
    height: auto !important;
    padding-top: calc(var(--bb-header-h, 64px) + 52px) !important;
    padding-bottom: 28px !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow: visible !important;
  }

  section[class*="h-screen"] > div.relative.z-10,
  section.relative.min-h-\[100dvh\] > div.relative.z-10 {
    padding-top: 12px !important;
    width: 100%;
  }

  section[class*="h-screen"] h1,
  section.relative.min-h-\[100dvh\] h1 {
    font-size: clamp(1.35rem, 6.5vw, 1.85rem) !important;
    line-height: 1.2 !important;
    padding-top: 4px;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    min-height: 0 !important;
  }

  section[class*="h-screen"] p,
  section.relative.min-h-\[100dvh\] p {
    font-size: 14px !important;
    line-height: 1.45 !important;
  }

  /*
   * Cabin detail: flex-1 main + min-h layout was locking height to the viewport,
   * so page content overflowed and the footer painted mid-page. Grow with content.
   */
  body.bb-cabin-page-active #root,
  body.bb-cabin-page-active #root > div {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.bb-cabin-page-active #root div[class*="min-h-[100dvh]"] {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100dvh !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.bb-cabin-page-active #root main.flex-1,
  body.bb-cabin-page-active #root main {
    flex: 0 0 auto !important;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    order: unset !important;
  }

  body.bb-cabin-page-active #root main .min-h-screen,
  body.bb-cabin-page-active #root main [class*="min-h-screen"] {
    height: auto !important;
    max-height: none !important;
    min-height: 100dvh !important;
    overflow: visible !important;
  }

  body.bb-cabin-page-active #root footer {
    order: unset !important;
    margin-top: 0 !important;
    flex-shrink: 0;
    width: 100% !important;
    position: static !important;
    z-index: 5;
    padding: 14px 12px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.bb-cabin-page-active #root footer .grid,
  body.bb-cabin-page-active #root footer h4,
  body.bb-cabin-page-active #root footer ul {
    display: none !important;
  }

  body.bb-cabin-page-active #root footer > div {
    gap: 8px !important;
  }

  body.bb-cabin-page-active #root footer p,
  body.bb-cabin-page-active #root footer [class*="text-"] {
    font-size: 11px !important;
    line-height: 1.35 !important;
    margin: 0 !important;
  }

  body.bb-cabin-page-active #root footer a[class*="text-2xl"],
  body.bb-cabin-page-active #root footer .text-2xl {
    font-size: 1rem !important;
  }

  /* Unstick Framer opacity-0 — never touch Yandex map internals */
  body.bb-cabin-page-active #root main [style*="opacity: 0"]:not([class*="ymaps"]),
  body.bb-cabin-page-active #root main [style*="opacity:0"]:not([class*="ymaps"]) {
    opacity: 1 !important;
  }

  body.bb-cabin-page-active main [class*="lg:flex-row"] {
    display: flex !important;
    flex-direction: column !important;
  }

  body.bb-cabin-page-active main [class*="lg:w-[35%]"],
  body.bb-cabin-page-active main [class*="lg:w-[65%]"] {
    width: 100% !important;
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
  }

  body.bb-cabin-page-active main [class*="lg:w-[35%]"] {
    margin-bottom: 20px;
  }

  body.bb-cabin-page-active main [class*="sticky"] {
    position: static !important;
  }

  body {
    padding-bottom: 0;
  }

  .bb-bottom-nav {
    display: none !important;
  }

  h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.75rem) !important;
  }

  [class*="flex-[60]"] {
    min-height: 300px;
  }

  .bb-object-detail {
    padding: 0;
    align-items: flex-end;
  }

  .bb-object-detail-box {
    border-radius: 20px 20px 0 0;
    max-height: 92dvh;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
  }

  .bb-object-detail-box img {
    height: 200px;
  }

  .bb-object-detail-box h2 {
    font-size: 20px;
  }

  .bb-object-detail-actions {
    flex-direction: column;
  }

  .bb-object-detail-cta {
    width: 100%;
    min-height: 48px;
    touch-action: manipulation;
  }

  .bb-object-detail-close {
    min-width: 44px;
    min-height: 44px;
  }

  .bb-active-card,
  .bb-ready-card {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #bb-active-mount,
  #bb-ready-mount {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  }

  .bb-page-toast {
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    max-width: calc(100vw - 32px);
    text-align: center;
  }

  button,
  [role="button"],
  a.bb-hf-card {
    touch-action: manipulation;
  }
}

@media (prefers-reduced-motion: reduce) {
  [style*="kenBurns"] {
    animation: none !important;
  }

  * {
    scroll-behavior: auto !important;
  }
}

/* ── Accessibility ── */
.bb-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100000;
  padding: 12px 20px;
  background: #00D4AA;
  color: #0A1628;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}

.bb-skip-link:focus {
  left: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid #00D4AA !important;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.35);
}

/* ── Mobile: Hero form ── */
@media (max-width: 767px) {
  .relative.h-screen,
  [class*="h-screen"][class*="min-h-"] {
    min-height: 520px !important;
    height: auto !important;
    max-height: 92dvh;
  }

  [class*="pt-[72px]"] {
    padding-top: 64px !important;
  }

  [class*="max-w-[720px]"] {
    max-width: 100% !important;
    padding-left: 12px;
    padding-right: 12px;
  }

  [class*="rounded-2xl"][class*="p-4"] {
    padding: 12px !important;
    margin-left: 12px;
    margin-right: 12px;
  }

  [class*="flex-col"][class*="md:flex-row"] {
    gap: 10px !important;
  }

  [class*="flex-col"][class*="md:flex-row"] button,
  [class*="flex-col"][class*="md:flex-row"] input,
  [class*="flex-col"][class*="md:flex-row"] [class*="h-12"] {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  [class*="overflow-x-auto"] button,
  [class*="overflow-x-auto"] a {
    min-height: 40px;
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ── Mobile: Map ── */
@media (max-width: 900px) {
  /* Card thumbs only — do not crush the realty/rent map panel */
  .bg-off-white .bb-property-grid [class*="rounded-2xl"][class*="overflow-hidden"] {
    min-height: 0 !important;
    max-height: none;
  }

  .bg-off-white [class*="flex-[60]"] {
    min-height: 220px !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  .bg-off-white [class*="flex-[40]"] {
    min-height: 220px !important;
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }

  .bg-off-white .bb-property-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Sale/rent map mode: full-viewport map on mobile */
  body.bb-realty-page .bg-off-white [class*="flex"][class*="lg:flex-row"],
  body.bb-realty-page [class*="flex"][class*="lg:flex-row"] {
    display: flex !important;
    flex-direction: column !important;
  }

  body.bb-realty-map-mode .bb-realty-map-col {
    display: block !important;
    order: -1 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    flex: none !important;
    min-height: calc(100dvh - 120px) !important;
    height: calc(100dvh - 120px) !important;
    max-height: none !important;
    margin: 0 !important;
    margin-left: calc(50% - 50vw) !important;
    padding: 0 !important;
    position: relative !important;
    border-radius: 0 !important;
    overflow: hidden !important;
  }

  body.bb-realty-map-mode .bb-realty-map-full {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    min-height: calc(100dvh - 120px) !important;
    height: calc(100dvh - 120px) !important;
    border-radius: 0 !important;
  }

  /* Kill desktop map flex/% width on mobile */
  body.bb-realty-map-mode .bg-off-white [class*="flex-[60]"],
  body.bb-realty-map-mode .bb-realty-map-col.flex-\[60\] {
    flex: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  body.bb-realty-map-mode .bb-realty-map-panel {
    position: absolute !important;
    inset: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: 0 !important;
  }

  body.bb-realty-map-mode .bb-realty-map-panel > div,
  body.bb-realty-map-mode .bb-realty-map-full > div:not([class*="absolute"]) {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
  }

  body.bb-realty-map-mode .bb-realty-map-col ymaps,
  body.bb-realty-map-mode .bb-realty-map-col [class*="ymaps-2-1"][class*="-map"],
  body.bb-realty-map-mode .bb-realty-map-full ymaps,
  body.bb-realty-map-mode .bb-realty-map-full [class*="ymaps-2-1"][class*="-map"] {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
  }

  /* Hide listing column / floating side card — full-page map */
  body.bb-realty-map-mode .bg-off-white [class*="flex"][class*="lg:flex-row"] > :not(.bb-realty-map-col),
  body.bb-realty-map-mode .bb-realty-map-full > [class*="absolute"][class*="top-4"] {
    display: none !important;
  }

  /* Parent row shouldn't constrain map */
  body.bb-realty-map-mode [class*="flex"][class*="lg:flex-row"],
  body.bb-realty-map-mode [class*="max-w-"][class*="mx-auto"] {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    gap: 0 !important;
  }

  /* Cabin/property detail location map — only real map boxes, not photo gallery */
  body.bb-cabin-page-active #root main .bb-detail-map,
  body.bb-property-detail #root main .bb-detail-map,
  body.bb-cabin-page-active #root main [class*="h-[300px]"]:has([class*="ymaps"]),
  body.bb-property-detail #root main [class*="h-[300px]"]:has([class*="ymaps"]),
  #root main .bb-detail-map {
    min-height: 280px !important;
    height: 300px !important;
    max-height: none !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.bb-cabin-page-active #root main .bb-detail-map > div,
  body.bb-property-detail #root main .bb-detail-map > div,
  body.bb-cabin-page-active #root main .bb-detail-map > ymaps,
  body.bb-property-detail #root main .bb-detail-map > ymaps,
  body.bb-cabin-page-active #root main .bb-detail-map > div > ymaps.ymaps-2-1-79-map,
  body.bb-property-detail #root main .bb-detail-map > div > ymaps.ymaps-2-1-79-map,
  body.bb-cabin-page-active #root main .bb-detail-map .ymaps-2-1-79-map,
  body.bb-property-detail #root main .bb-detail-map .ymaps-2-1-79-map {
    width: 100% !important;
    height: 100% !important;
    min-height: 280px !important;
    max-height: 100% !important;
  }

  /* Do not stretch copyright / controls / panes to full map height */
  body.bb-cabin-page-active #root main .bb-detail-map [class*="copyright"],
  body.bb-property-detail #root main .bb-detail-map [class*="copyright"],
  body.bb-cabin-page-active #root main .bb-detail-map [class*="controls"],
  body.bb-property-detail #root main .bb-detail-map [class*="controls"] {
    min-height: 0 !important;
    height: auto !important;
  }

  /* Booking date fields must not overflow the card */
  body.bb-cabin-page-active #root input[type="date"],
  body.bb-property-detail #root input[type="date"] {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    padding-left: 10px !important;
    padding-right: 8px !important;
  }

  body.bb-cabin-page-active #root main [class*="lg:w-[35%]"],
  body.bb-cabin-page-active #root main [class*="space-y-3"] {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.bb-cabin-page-active #root main [class*="lg:w-[35%]"] > div,
  body.bb-cabin-page-active #root main [class*="lg:w-[35%]"] > * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Cabin calendar visible on mobile booking card */
  body.bb-cabin-page-active #bb-cabin-cal-inline {
    display: block !important;
    margin: 12px 0 16px !important;
    padding: 14px !important;
  }

  body.bb-cabin-page-active .bb-full-cal__grid {
    gap: 4px !important;
  }

  body.bb-cabin-page-active .bb-full-cal__day {
    font-size: 12px !important;
    min-height: 36px !important;
  }
}

@media (max-width: 480px) {
  .bg-off-white .bb-property-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Nav contrast ── */
header nav a,
header nav button,
nav[class*="fixed"] a,
nav[class*="fixed"] button,
[class*="bg-navy"] nav a,
[class*="bg-navy"] nav button {
  color: #e2e8f0 !important;
}

header nav a:hover,
header nav button:hover {
  color: #00D4AA !important;
}

/* ── Dark theme for light pages ── */
.bg-off-white,
.bg-\[\#F1F5F9\],
.min-h-\[100dvh\].bg-off-white,
.min-h-\[100dvh\].bg-\[\#F1F5F9\] {
  background: #0A1628 !important;
  color: #e2e8f0 !important;
}

.bg-off-white .text-\[\#1E293B\],
.bg-\[\#F1F5F9\] .text-\[\#1E293B\] {
  color: #f1f5f9 !important;
}

.bg-off-white .text-\[\#64748B\],
.bg-\[\#F1F5F9\] .text-\[\#64748B\] {
  color: #94a3b8 !important;
}

/* Readable prices & titles on dark-themed property pages */
.bg-off-white .text-navy,
.bg-\[\#F1F5F9\] .text-navy,
.bg-off-white .text-slate,
.bg-\[\#F1F5F9\] .text-slate {
  color: #f1f5f9 !important;
}

.bg-off-white .rounded-2xl .text-navy,
.bg-\[\#F1F5F9\] .rounded-2xl .text-navy,
.bg-off-white .bb-property-grid .flex-1.p-5 > div:first-of-type > :nth-child(3),
.bg-\[\#F1F5F9\] .bb-property-grid .flex-1.p-5 > div:first-of-type > :nth-child(3) {
  color: #00D4AA !important;
}

.bg-off-white .font-semibold.text-navy,
.bg-\[\#F1F5F9\] .font-semibold.text-navy,
.bg-off-white .font-bold.text-navy,
.bg-\[\#F1F5F9\] .font-bold.text-navy {
  color: #00D4AA !important;
}

/* Cabin cards — price always visible */
.min-h-screen.bg-navy .font-semibold.text-white,
.bg-navy .font-semibold.text-white,
a[href*="/cabin/"] .font-semibold.text-white,
a[href*="/cabin/"] .text-white.font-semibold {
  color: #ffffff !important;
}

.bg-off-white .bg-white,
.bg-\[\#F1F5F9\] .bg-white {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.bg-off-white select option,
.bg-\[\#F1F5F9\] select option,
select option {
  color: #0f172a !important;
  background: #ffffff !important;
}

/* SPA pages: prevent blank screen from stuck motion opacity */
.min-h-\[100dvh\].bg-off-white,
body.bb-cabin-page-active #root > div,
body.bb-property-detail #root > div {
  opacity: 1 !important;
}

.min-h-\[100dvh\].bg-off-white [style*="opacity: 0"],
.min-h-\[100dvh\].bg-off-white [style*="opacity:0"],
body.bb-cabin-page-active #root [style*="opacity: 0"]:not([class*="ymaps"]),
body.bb-cabin-page-active #root [style*="opacity:0"]:not([class*="ymaps"]),
body.bb-property-detail #root [style*="opacity: 0"]:not([class*="ymaps"]),
body.bb-property-detail #root [style*="opacity:0"]:not([class*="ymaps"]) {
  opacity: 1 !important;
}

/* Property detail: hide heavy React snap carousel */
body.bb-property-detail section.relative.w-full.rounded-b-3xl [class*="snap-x"],
body.bb-property-detail section.relative.w-full.rounded-b-3xl .bb-prop-extra-slide,
body.bb-property-detail section.relative.w-full.rounded-b-3xl > button.absolute,
body.bb-property-detail section.relative.w-full.rounded-b-3xl .flex.items-center.justify-center.gap-2,
body.bb-property-detail section.relative.w-full.rounded-b-3xl .flex.gap-2.overflow-x-auto.mt-4,
body.bb-property-detail .bb-prop-gallery-thumbs {
  display: none !important;
}

/* Lightweight single-photo gallery */
.bb-lite-gallery {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem 1rem;
}
.bb-lite-gallery__main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 420px;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.bb-lite-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
@media (max-width: 768px) {
  .bb-lite-gallery {
    padding: 0.5rem 0.75rem 0.75rem;
  }
  .bb-lite-gallery__main {
    aspect-ratio: 4 / 3;
    max-height: 360px;
    border-radius: 14px;
  }
  .bb-lite-gallery__nav {
    width: 44px !important;
    height: 44px !important;
    font-size: 26px !important;
  }
}

/* Cabin mobile swipe gallery (desktop keeps React mosaic) */
.bb-cabin-lite-host {
  margin: 0 0 1.25rem;
}
body.bb-cabin-page-active .bb-cabin-lite-host .bb-lite-gallery {
  max-width: none;
  margin: 0;
  padding: 0;
}
body.bb-cabin-page-active .bb-cabin-lite-host .bb-lite-gallery__main {
  aspect-ratio: 4 / 3;
  max-height: none;
  height: min(56vw, 320px);
  border-radius: 16px;
  touch-action: pan-y;
}
body.bb-cabin-page-active .bb-cabin-lite-host .bb-lite-gallery__thumbs {
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 8px;
  padding-bottom: 4px;
}
body.bb-cabin-page-active .bb-cabin-lite-host .bb-lite-gallery__thumbs button {
  width: 56px;
  height: 42px;
}
@media (min-width: 768px) {
  .bb-cabin-lite-host {
    display: none !important;
  }
  body.bb-cabin-page-active .bb-cabin-react-gallery.is-replaced {
    display: grid !important;
  }

  /* Desktop mosaic: main photo flush with the 2×2 side grid (tops/bottoms aligned) */
  body.bb-cabin-page-active #root main [class*="md:grid-cols-2"][class*="rounded-2xl"][class*="mb-6"][class*="h-["] {
    display: grid !important;
    grid-template-columns: 1.05fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 0.75rem !important;
    overflow: hidden !important;
  }

  body.bb-cabin-page-active #root main [class*="md:grid-cols-2"][class*="rounded-2xl"][class*="mb-6"] > [class*="md:row-span-2"] {
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    height: 100% !important;
    min-height: 0 !important;
    align-self: stretch !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
  }

  body.bb-cabin-page-active #root main [class*="md:grid-cols-2"][class*="rounded-2xl"][class*="mb-6"] > [class*="hidden"][class*="md:grid"] {
    grid-column: 2 !important;
    grid-row: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    height: 100% !important;
    min-height: 0 !important;
    align-self: stretch !important;
    gap: 0.75rem !important;
  }

  body.bb-cabin-page-active #root main [class*="md:grid-cols-2"][class*="rounded-2xl"][class*="mb-6"] > [class*="hidden"][class*="md:grid"] > div {
    min-height: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    border-radius: 0.75rem !important;
    position: relative !important;
  }

  body.bb-cabin-page-active #root main [class*="md:grid-cols-2"][class*="rounded-2xl"][class*="mb-6"] img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    max-width: none !important;
    aspect-ratio: auto !important;
  }
}

.bb-lite-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.bb-lite-gallery__nav--prev { left: 10px; }
.bb-lite-gallery__nav--next { right: 10px; }
.bb-lite-gallery__nav:hover { background: rgba(0, 212, 170, 0.85); color: #0A1628; }
.bb-lite-gallery__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.bb-lite-gallery__thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
}
.bb-lite-gallery__thumbs::-webkit-scrollbar { display: none; }
.bb-lite-gallery__thumbs button {
  flex: 0 0 auto;
  width: 64px;
  height: 48px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  cursor: pointer;
  opacity: 0.65;
}
.bb-lite-gallery__thumbs button.is-active,
.bb-lite-gallery__thumbs button:hover {
  opacity: 1;
  border-color: #00D4AA;
}
.bb-lite-gallery__thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 640px) {
  .bb-lite-gallery { padding: 0.5rem 0.75rem 0.85rem; }
  .bb-lite-gallery__main {
    aspect-ratio: 4 / 3;
    max-height: 320px;
    border-radius: 12px;
  }
}

/* Hidden blocks */
.bb-hide-ai-reco,
.bb-hide-district-map,
.bb-hide-3d-view {
  display: none !important;
}

.bb-page-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100001;
  background: #00D4AA;
  color: #0A1628;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Glampi bottom banner — hidden via JS class */
.bb-glampi-hidden {
  display: none !important;
}

/* Broken cabin video hero — never show */
#bb-video-hero,
.bb-video-hero,
video.bb-card-video,
video.bb-review-video,
video {
  display: none !important;
}

/* Property cards — lightweight slideshow */
.bb-prop-slideshow {
  position: relative;
  overflow: hidden;
  background: #0f172a;
}

.bb-prop-slideshow__track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
}

.bb-prop-slideshow__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bb-prop-slideshow__img.is-active {
  opacity: 1;
  position: relative;
}

.bb-prop-slideshow__dots {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  z-index: 2;
}

.bb-prop-slideshow__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.bb-prop-slideshow__dot.is-active {
  background: #00D4AA;
}

/* Shared object detail modal */
.bb-object-detail {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(10, 22, 40, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.bb-object-detail-box {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  max-width: 720px;
  width: 100%;
  padding: 24px;
  position: relative;
  color: #e2e8f0;
  max-height: 90vh;
  overflow-y: auto;
}

.bb-object-detail-box img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 14px;
}

.bb-object-detail-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #00D4AA;
  background: rgba(0, 212, 170, 0.12);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 10px;
}

.bb-object-detail-box h2 {
  margin: 0 0 8px;
  font-size: 24px;
  color: #fff;
}

.bb-object-detail-meta {
  color: #94a3b8;
  font-size: 14px;
  margin: 0 0 12px;
}

.bb-object-detail-desc {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0 0 14px;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 68ch;
}

.bb-object-detail-desc .bb-desc-block {
  display: block;
  margin: 0 0 0.85em;
  white-space: pre-wrap;
  word-break: break-word;
}

.bb-object-detail-desc .bb-desc-block:last-child {
  margin-bottom: 0;
}

.bb-object-detail-price {
  color: #00D4AA;
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 16px;
}

.bb-object-detail-contacts {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.bb-object-detail-contacts h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #00D4AA;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.bb-object-detail-contacts p {
  margin: 0 0 6px;
  font-size: 15px;
}

.bb-object-detail-contacts a {
  color: #e2e8f0;
  text-decoration: none;
}

.bb-object-detail-contacts a:hover {
  color: #00D4AA;
}

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

.bb-object-detail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #00D4AA;
  color: #0A1628;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.bb-object-detail-cta--ghost {
  background: transparent;
  color: #00D4AA;
  border: 1px solid rgba(0, 212, 170, 0.4);
}

.bb-object-detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.35);
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  z-index: 2;
}

.bb-active-card,
.bb-ready-card {
  cursor: pointer;
}

button.bb-fav-active {
  border-color: #00D4AA !important;
  color: #00D4AA !important;
}

/* Footer polish — keep 4 balanced columns */
footer.bg-navy {
  background: linear-gradient(180deg, #0A1628 0%, #07111f 100%) !important;
}
footer.bg-navy .grid {
  align-items: start;
}
footer.bg-navy h4 {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.75rem !important;
  color: #94A3B8 !important;
}
footer.bg-navy a.text-sm:hover {
  color: #00D4AA !important;
}

/* ═══════════════════════════════════════════
   Property detail — clean story layout
   photos → meta → description → map → CTA
   ═══════════════════════════════════════════ */
.bb-hide-prop-junk {
  display: none !important;
}

body.bb-property-detail {
  background: #07111f;
}

body.bb-property-detail .min-h-\[100dvh\] {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(0, 212, 170, 0.12), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(0, 200, 255, 0.08), transparent 50%),
    #0A1628 !important;
}

/* Hero gallery */
body.bb-property-detail > #root section.relative.w-full.rounded-b-3xl,
body.bb-property-detail #root > div > section.relative.w-full.rounded-b-3xl,
body.bb-property-detail section.relative.w-full.bg-\[\#0A1628\].rounded-b-3xl {
  border-radius: 0 0 28px 28px !important;
  background: #050b14 !important;
}

body.bb-property-detail section.relative.w-full.rounded-b-3xl [class*="snap-x"] > div img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Title / price band */
body.bb-property-detail section.max-w-\[1280px\].mx-auto.px-4.sm\:px-6.py-10 {
  padding-top: 2rem !important;
  padding-bottom: 1.25rem !important;
}

body.bb-property-detail h1 {
  font-size: clamp(1.6rem, 2.4vw, 2.25rem) !important;
  letter-spacing: -0.02em;
  color: #f8fafc !important;
  line-height: 1.2 !important;
}

body.bb-property-detail .bb-prop-chip,
body.bb-property-detail span.bb-prop-chip {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e2e8f0 !important;
  border-radius: 999px !important;
  backdrop-filter: blur(8px);
}

body.bb-property-detail [style*="JetBrains Mono"] {
  color: #00D4AA !important;
  font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
  letter-spacing: -0.03em;
}

body.bb-property-detail .bb-prop-price-unit {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  font-family: inherit;
  letter-spacing: 0;
}

/* Soften fake AI callouts in header */
body.bb-property-detail .bb-prop-ai-soft,
body.bb-property-detail [class*="border-l-[3px]"] {
  display: none !important;
}

body.bb-property-detail a[href="#"] {
  display: none !important;
}

/* Story: description + amenities + map */
.bb-prop-story {
  position: relative;
  margin: 0 auto 0;
  max-width: none;
  animation: bbPropStoryIn 0.55s ease both;
}

@keyframes bbPropStoryIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.bb-prop-story__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0.25rem 1.25rem 2rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .bb-prop-story__inner {
    padding: 0.5rem 1.5rem 2.25rem;
    gap: 1.5rem;
  }
}

.bb-prop-story__eyebrow {
  margin: 0 0 0.4rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #00D4AA;
}

.bb-prop-story__title {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.bb-prop-story__desc,
.bb-prop-story__amenities {
  padding: 1.5rem 1.5rem 1.6rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

/* Paid extra services — same zone as amenities / house rules */
.bb-cabin-extras {
  margin: 1.5rem 0 1.75rem;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}

.bb-cabin-extras__title {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.bb-cabin-extras__hint {
  margin: 0 0 1rem;
  font-size: 13px;
  line-height: 1.45;
  color: #94a3b8;
}

.bb-cabin-extras__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 640px) {
  .bb-cabin-extras__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.bb-cabin-extras__card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-width: 0;
}

.bb-cabin-extras__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #00d4aa;
  background: rgba(0, 212, 170, 0.12);
}

.bb-cabin-extras__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bb-cabin-extras__name {
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-cabin-extras__price {
  color: #00d4aa;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.bb-cabin-extras__unit {
  color: #94a3b8;
  font-weight: 500;
  font-size: 12px;
  margin-left: 2px;
}

.bb-prop-story__text {
  color: #cbd5e1;
  font-size: 15.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
  max-width: 68ch;
}

.bb-prop-story__text .bb-cabin-desc__p {
  display: block;
  margin: 0 0 0.9em;
  white-space: pre-wrap;
}

.bb-prop-story__text .bb-cabin-desc__p:last-child {
  margin-bottom: 0;
}

.bb-prop-story__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.bb-prop-story__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.22);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.bb-prop-story__chip:hover {
  background: rgba(0, 212, 170, 0.16);
  border-color: rgba(0, 212, 170, 0.4);
  transform: translateY(-1px);
}

/* Full-bleed map */
.bb-prop-story__mapblock {
  margin-top: 0.25rem;
}

.bb-prop-story__maphead {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem 1rem;
}

@media (min-width: 640px) {
  .bb-prop-story__maphead {
    padding: 0 1.5rem 1.1rem;
  }
}

.bb-prop-story__addr {
  margin: 0.25rem 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.bb-prop-story__map,
.bb-prop-story__map.bb-detail-map {
  position: relative;
  width: 100% !important;
  height: min(62vh, 520px) !important;
  min-height: 340px !important;
  max-height: none !important;
  border: none !important;
  border-radius: 0 !important;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.bb-prop-story__map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow:
    inset 0 40px 60px rgba(7, 17, 31, 0.35),
    inset 0 -40px 60px rgba(7, 17, 31, 0.45);
  z-index: 2;
}

.bb-prop-story__map > div,
.bb-prop-story__map .ymaps-2-1-79-map {
  width: 100% !important;
  height: 100% !important;
}

/* Compact CTA */
body.bb-property-detail .bb-prop-cta {
  background:
    linear-gradient(180deg, rgba(10, 22, 40, 0.2), #07111f 30%) !important;
  padding-top: 3rem !important;
  padding-bottom: 4rem !important;
}

body.bb-property-detail .bb-prop-cta .text-center.mb-12 {
  margin-bottom: 1.5rem !important;
}

body.bb-property-detail .bb-prop-cta .flex.flex-col.lg\:flex-row.gap-8 > .flex-1.flex.flex-col.gap-5 {
  display: none !important; /* hide 3 fake step cards */
}

body.bb-property-detail .bb-prop-cta form {
  max-width: 520px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  body.bb-property-detail .bb-prop-cta .flex.flex-col.lg\:flex-row.gap-8 {
    justify-content: center;
  }
  body.bb-property-detail .bb-prop-cta .flex.flex-col.lg\:flex-row.gap-8 > .flex-1.bg-\[rgba\(30\,41\,59\,0\.6\)\] {
    flex: 0 1 520px !important;
  }
}

/* Cabin detail description: keep owner paragraphs / indents / line breaks */
.bb-cabin-desc-wrap {
  max-width: 68ch;
}
.bb-cabin-desc {
  white-space: pre-wrap !important;
  word-break: break-word;
  line-height: 1.75;
  color: #cbd5e1;
  display: block !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  overflow: visible !important;
  max-height: none !important;
}
.bb-cabin-desc.line-clamp-4 {
  /* line-clamp/-webkit-box collapses newlines — force readable block */
  display: block !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
  overflow: visible !important;
  max-height: none !important;
}
.bb-cabin-desc br {
  display: block;
  content: "";
  margin-top: 0.15em;
}
.bb-cabin-desc__p {
  display: block;
  margin: 0 0 0.95em;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
}
.bb-cabin-desc__p:last-child {
  margin-bottom: 0;
}

/* Hide legacy homepage switcher: Базы отдыха | Продажа недвижимости */
div.sticky.top-\[72px\].z-40 {
  display: none !important;
}

/* Amenity icon fallback: checkmark when React icon key is missing */
body.bb-cabin-page-active [class*="bg-teal/10"]:empty::before {
  content: "✓";
  color: #2dd4bf;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
body.bb-cabin-page-active .bb-amenity-check {
  color: #2dd4bf;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
