.floor-plan-crumbs { font-size: 13px; color: var(--fg-soft); display: flex; gap: 8px; }
.floor-plan-crumbs a { color: var(--accent); font-weight: 500; }

.floor-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.floor-tab {
  position: relative;
  min-width: 42px; height: 40px; padding: 0 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 999px;
  font-weight: 600; font-size: 13.5px; color: var(--fg-soft);
  background: #fff; transition: all .15s; white-space: nowrap;
}
.floor-tab:hover { border-color: var(--accent); color: var(--accent); }
.floor-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.floor-tab-dot { position: absolute; top: 4px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: #22C55E; }
.floor-tab.active .floor-tab-dot { background: #fff; }

/* Паркінг — окремим рядом під поверхами (не впереміш і не заплутано серед
   номерів поверхів), той самий стиль вкладки, але з пунктирною рамкою. */
.floor-tabs-parking { margin-top: 10px; }
.floor-tab-parking { border-style: dashed; }
.floor-tab-parking.active { border-style: solid; }

.floor-plan-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: flex-start; }

.floor-plan-stage { position: relative; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-alt); }
.floor-plan-stage img { width: 100%; height: auto; display: block; }
/* Лише прямий нащадок (сам шар хотспотів) — інакше правило зачіпає й
   маленьку іконку лупи всередині .zoom-btn (вона теж <svg>, але вкладена
   через <button>), розтягуючи її на всю кнопку поверх тексту. */
.floor-plan-stage > svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.hotspot { cursor: pointer; fill-opacity: .45; stroke-width: 1; vector-effect: non-scaling-stroke; transition: fill-opacity .15s, stroke-width .15s; }
.hotspot:hover { fill-opacity: .65; }
.hotspot-available { fill: #22C55E; stroke: #15803D; }
.hotspot-reserved { fill: #F59E0B; stroke: #B45309; }
.hotspot-sold { fill: #E53935; stroke: #B71C1C; fill-opacity: .58; }
.hotspot-nolink { cursor: default; }
.hotspot-nolink:hover { fill-opacity: .58; }

.hotspot-label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 11px; font-weight: 700; color: #fff; line-height: 1.3;
  background: rgba(20, 19, 17, .78); padding: 0 5px; border-radius: 5px;
  white-space: nowrap; pointer-events: none; z-index: 3;
}

/* Вища специфічність (два класи), щоб гарантовано перебити колір статусу —
   інакше на плані, де майже всі квартири вільні (зелені), обрану годі відрізнити. */
.hotspot.hotspot-active {
  fill: #2563EB; fill-opacity: .55; stroke: #1D4ED8; stroke-width: 2.6;
  vector-effect: non-scaling-stroke;
  animation: hotspot-pulse 1.3s ease-in-out infinite;
}
@keyframes hotspot-pulse {
  0%, 100% { stroke-width: 2.6; }
  50% { stroke-width: 4; }
}

.floor-plan-legend { display: flex; gap: 20px; margin-top: 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-soft); }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.floor-plan-placeholder {
  border: 1px dashed var(--line-strong); border-radius: var(--radius-lg);
  padding: 60px 24px; text-align: center; font-size: 14.5px; color: var(--fg-soft);
}

.floor-plan-sidebar {
  position: sticky; top: 100px;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff; box-shadow: var(--shadow);
  min-height: 260px; padding: 24px;
}
.floor-plan-sidebar-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; padding: 30px 10px; color: var(--fg-soft); font-size: 13.5px; }
.sidebar-loading { padding: 30px 0; text-align: center; color: var(--fg-soft); font-size: 13.5px; }

.apt-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.apt-card-number { font-weight: 600; font-size: 17px; }
.apt-card-sub { font-size: 13px; color: var(--fg-soft); margin-top: 2px; }
.apt-card-img { width: 100%; border-radius: var(--radius); margin-bottom: 16px; }
.apt-card-stats { display: flex; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.apt-card-stat-value { font-weight: 600; font-size: 18px; }
.apt-card-stat-label { font-size: 12px; color: var(--fg-soft); margin-top: 2px; }
.apt-card-price-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.apt-card-price { font-weight: 700; font-size: 20px; }
.apt-card-price-per-m2 { font-size: 13px; color: var(--fg-soft); }
.apt-card-desc { font-size: 13.5px; color: var(--fg-soft); line-height: 1.6; }

.sheet-handle, .sheet-close { display: none; }
.sheet-backdrop { display: none; }

@media (max-width: 900px) {
  .floor-plan-layout { grid-template-columns: 1fr; }

  /* На мобільному картка обраної квартири/місця — це bottom sheet, що
     виїжджає знизу, а не звичайний блок у потоці сторінки. */
  .floor-plan-sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    max-height: 78vh; overflow-y: auto;
    border-radius: 20px 20px 0 0; border-bottom: none;
    box-shadow: 0 -10px 34px rgba(6, 8, 16, .22);
    transform: translateY(100%);
    transition: transform .28s ease;
    z-index: 210;
    padding-top: 30px;
  }
  .floor-plan-sidebar.open { transform: translateY(0); }
  .floor-plan-sidebar-empty { display: none; }

  .sheet-handle {
    display: block; position: absolute; top: 10px; left: 50%;
    transform: translateX(-50%); width: 40px; height: 4px;
    border-radius: 999px; background: var(--line-strong);
  }
  .sheet-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 8px; right: 10px; width: 32px; height: 32px;
    border-radius: 50%; background: var(--bg-alt); border: none;
    font-size: 20px; line-height: 1; color: var(--fg-soft); cursor: pointer;
  }
  .sheet-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(6, 8, 16, .42);
    z-index: 200; opacity: 0; pointer-events: none; transition: opacity .28s ease;
  }
  .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
}
