/* ── SP2 Floor Plans — dark theme (mirrors Shoreline Symphony) ───────────── */

:root {
  --sp2-accent:    var(--hn-gold, #B89A4A);
  --sp2-accent-dk: var(--hn-gold-dk, #977b36);
  --sp2-dark:      #0a0a0a;
  --sp2-available: #35875b;
  --sp2-reserved:  #fc6606;
  --sp2-sold:      #a5b2ab;
  --sp2-font:      'Montserrat', sans-serif;
  --sp2-radius:    2px;
}

.sp2-plans {
  color: #fff;
  background: transparent;
  overflow: hidden;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.sp2-plans__inner {
  display: grid;
  grid-template-columns: 1fr 400px;
  column-gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.sp2-plans__viewer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sp2-plans__col {
  display: flex;
  flex-direction: column;
}

/* ── Section title bar (gold, matches SS) ────────────────────────────────── */

.sp2-col-title {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  margin-bottom: 20px;
  padding: 0 16px;
  background: var(--sp2-accent);
  flex-shrink: 0;
}

.sp2-col-title span {
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sp2-dark);
}

/* ── View switcher ────────────────────────────────────────────────────────── */

.sp2-viewer-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 48px;
  box-sizing: border-box;
}

.sp2-view-label {
  flex: 1;
  text-align: center;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}

.sp2-flip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--sp2-radius);
  background: transparent;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
  flex-shrink: 0;
}

.sp2-flip-btn:hover {
  color: var(--sp2-accent);
  border-color: var(--sp2-accent);
  background: color-mix(in srgb, var(--sp2-accent) 6%, transparent);
}

/* ── DA viewer ────────────────────────────────────────────────────────────── */

.sp2-viewer-wrap { position: relative; }

.sp2-view {
  visibility: hidden;
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  pointer-events: none;
}
.sp2-view.is-active {
  visibility: visible;
  position: relative;
  pointer-events: auto;
}

/* Force DA image to fill container */
.sp2-view .hotspots-container,
.sp2-view .hotspots-interaction { width: 100% !important; }

.sp2-view .layout-left  .hotspots-image-container,
.sp2-view .layout-right .hotspots-image-container,
.sp2-view .hotspots-image-container { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }

.sp2-view .hotspot-more-info-container { display: none !important; }
.sp2-view [id^="hotspots-map-container"] { width: 100% !important; }
.sp2-view .hotspots-image { width: 100% !important; height: auto !important; display: block !important; }
.sp2-view .leaflet-container { width: 100% !important; }

/* Hide DA built-in tooltips/popups */
.sp2-plans .hotspot-info,
.sp2-plans .hotspots-placeholder,
.sp2-plans .hotspot-initial,
.sp2-plans .da-tooltip,
.sp2-plans .da-popup,
.sp2-plans .leaflet-tooltip,
.sp2-plans .leaflet-tooltip-pane,
.sp2-plans .hotspot-tooltip { display: none !important; }

/* ── DA path status colors ────────────────────────────────────────────────── */

.sp2-plans path.da-status-available {
  fill: var(--sp2-available) !important;
  fill-opacity: 0 !important;
  stroke: var(--sp2-available) !important;
  stroke-opacity: 0 !important;
  transition: fill-opacity 0.2s, stroke-opacity 0.2s;
}
.sp2-plans path.da-status-available:hover,
.sp2-plans path.da-status-available.da-hover {
  fill-opacity: 0.75 !important;
  stroke-opacity: 0.8 !important;
}

.sp2-plans path.da-status-reserved {
  fill: var(--sp2-reserved) !important;
  fill-opacity: 0 !important;
  stroke: var(--sp2-reserved) !important;
  stroke-opacity: 0 !important;
  transition: fill-opacity 0.2s, stroke-opacity 0.2s;
}
.sp2-plans path.da-status-reserved:hover,
.sp2-plans path.da-status-reserved.da-hover {
  fill-opacity: 0.75 !important;
  stroke-opacity: 0.8 !important;
}

.sp2-plans path.da-status-sold {
  fill: var(--sp2-sold) !important;
  fill-opacity: 0.65 !important;
}
.sp2-plans path.da-status-sold:hover,
.sp2-plans path.da-status-sold.da-hover { fill-opacity: 0.85 !important; }

/* ── Zone labels ──────────────────────────────────────────────────────────── */

.da-zone-label-item { opacity: 1; transition: opacity 0.18s; }
.da-zone-label-item.is-hidden { opacity: 0; }
.da-zone-label-bg { fill: var(--sp2-accent); }
.da-zone-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 12px !important;
  font-weight: 600;
  fill: #1a1008;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

/* ── Legend ───────────────────────────────────────────────────────────────── */

.sp2-legend {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.sp2-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

.sp2-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sp2-legend-dot--available { background: var(--sp2-available); }
.sp2-legend-dot--reserved  { background: var(--sp2-reserved); }
.sp2-legend-dot--sold      { background: var(--sp2-sold); }

/* ── Apartment list ───────────────────────────────────────────────────────── */

.sp2-list-wrap {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--sp2-accent) 30%, transparent) transparent;
}

.sp2-list-wrap::-webkit-scrollbar { width: 4px; }
.sp2-list-wrap::-webkit-scrollbar-track { background: transparent; }
.sp2-list-wrap::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--sp2-accent) 30%, transparent); border-radius: 2px; }

.sp2-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sp2-list-empty {
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}

/* ── Apartment card ───────────────────────────────────────────────────────── */

.sp2-apt {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--sp2-radius);
  padding: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.sp2-apt:hover { background: rgba(255,255,255,0.07); }

.sp2-apt.is-highlighted {
  border-color: var(--sp2-accent);
  background: color-mix(in srgb, var(--sp2-accent) 8%, transparent);
}

.sp2-apt--sold { opacity: 0.55; }

.sp2-apt__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sp2-apt__number {
  font-family: var(--sp2-font);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.02em;
}

/* ── Badges ───────────────────────────────────────────────────────────────── */

.sp2-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--sp2-radius);
  white-space: nowrap;
  flex-shrink: 0;
}

.sp2-badge--available { background: rgba(53,135,91,0.15);   color: var(--sp2-available); }
.sp2-badge--reserved  { background: rgba(252,102,6,0.15);   color: var(--sp2-reserved); }
.sp2-badge--sold      { background: rgba(165,178,171,0.15); color: var(--sp2-sold); }

/* ── Meta grid ────────────────────────────────────────────────────────────── */

.sp2-apt__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin-bottom: 14px;
}

.sp2-meta-item { display: flex; flex-direction: column; gap: 2px; }

.sp2-meta-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.sp2-meta-value {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

.sp2-meta-item--price {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  margin: 8px -16px 0;
  padding: 10px 16px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sp2-price-group { display: flex; flex-direction: column; gap: 2px; }
.sp2-price-group--sqm { text-align: right; }

.sp2-price {
  font-size: 15px !important;
  font-weight: 700;
  color: var(--sp2-accent) !important;
  letter-spacing: 0.02em;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.sp2-apt__actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp2-btn {
  width: 100%;
  padding: 9px 12px;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  border-radius: var(--sp2-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sp2-btn--primary {
  background: var(--sp2-accent);
  color: var(--sp2-dark);
}

.sp2-btn--primary:hover { background: color-mix(in srgb, var(--sp2-accent) 82%, #fff); }

.sp2-btn--outline {
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
  background: transparent;
}

.sp2-btn--outline:hover {
  border-color: var(--sp2-accent);
  color: var(--sp2-accent);
}

/* ── Price list strip ─────────────────────────────────────────────────────── */

.sp2-info-strip {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sp2-pricelist-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sp2-dark);
  background: var(--sp2-accent);
  border: 1px solid var(--sp2-accent);
  border-radius: var(--sp2-radius);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.sp2-pricelist-btn:hover {
  /* Bauen theme's global "span, a, a:hover { display: inline-block; }" wins the
     specificity fight on :hover, and since this button is a flex item of
     .sp2-below-col, the inline-block gets blockified to "block" — breaking the
     icon+text flex row into a stacked column. Re-declare display to keep it a row. */
  display: inline-flex;
  background: transparent;
  color: var(--sp2-accent);
}

/* All buttons in the below-strip (price list / parking scheme / custom) share one height. */
.sp2-pricelist-btn,
.sp2-below-btn {
  box-sizing: border-box;
  height: 46px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  line-height: 1;
}

/* ── Below-strip (price list + parking + custom button) ──────────────────── */

.sp2-below-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 56px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sp2-below-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 0 auto;
}

.sp2-below-col--pricelist {
  justify-content: flex-start;
}

.sp2-below-label {
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin: 0 0 10px;
}

.sp2-below-desc {
  font-size: 14px;
  color: #fff;
  line-height: 1.5;
  margin: 0 0 18px;
}

.sp2-below-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 10px 18px !important;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sp2-accent);
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--sp2-accent) 40%, transparent) !important;
  border-radius: var(--sp2-radius);
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  outline: none;
}

.sp2-below-btn:hover {
  background: color-mix(in srgb, var(--sp2-accent) 8%, transparent);
  border-color: var(--sp2-accent) !important;
  color: var(--sp2-accent);
}

.sp2-below-btn:focus,
.sp2-below-btn:focus-visible,
.sp2-below-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

@media (max-width: 640px) {
  .sp2-below-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    margin-top: 24px;
    padding-top: 24px;
  }
  .sp2-below-col {
    width: 100%;
  }
}

/* ── Overlay & Drawer (popup) ─────────────────────────────────────────────── */

.sp2-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999 !important;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.sp2-overlay[hidden] { display: none; }

.sp2-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  cursor: pointer;
}

.sp2-popup-drawer {
  position: relative;
  z-index: 1;
  background: var(--sp2-popup-bg, #0d1e30);
  color: #fff;
  width: min(680px, 100vw);
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  animation: sp2-slide-in 0.26s ease;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--sp2-accent) 30%, transparent) transparent;
}

.sp2-popup-drawer.show-form { overflow-y: hidden; }

/* ── Contact form sliding panel ───────────────────────────────────────────── */

.sp2-popup-panel--form {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  overflow-y: auto;
  z-index: 5;
  background: var(--sp2-popup-bg, #0d1e30);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--sp2-accent) 30%, transparent) transparent;
}

.sp2-popup-drawer.show-form .sp2-popup-panel--form {
  transform: translateX(0);
}

.sp2-contact-panel__head {
  position: sticky;
  top: 0;
  background: var(--sp2-popup-bg, #0d1e30);
  z-index: 2;
}

.sp2-contact-panel__back {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-bottom-color: rgba(255,255,255,0.1);
  background: none;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.18s;
  flex-shrink: 0;
  box-sizing: border-box;
  outline: none;
}
.sp2-contact-panel__back:hover {
  color: rgba(255,255,255,0.8);
  background: none !important;
  border-color: transparent !important;
  border-bottom-color: rgba(255,255,255,0.1) !important;
}
.sp2-contact-panel__back:focus,
.sp2-contact-panel__back:focus-visible { outline: none; }

.sp2-contact-panel__apt {
  padding: 20px 28px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sp2-contact-panel__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 4px;
}
.sp2-contact-panel__number {
  font-size: 26px;
  font-weight: 700;
  color: var(--sp2-accent);
  line-height: 1.1;
}

.sp2-contact-panel__form { padding: 24px 28px 40px; }

/* CF7 form styling inside the sliding contact panel */
.sp2-contact-panel__form .wpcf7-form { margin: 0; }
.sp2-contact-panel__form .wpcf7-form p { margin: 0 0 16px; }
.sp2-contact-panel__form .wpcf7-form label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sp2-contact-panel__form .wpcf7-form input[type="text"],
.sp2-contact-panel__form .wpcf7-form input[type="email"],
.sp2-contact-panel__form .wpcf7-form input[type="tel"],
.sp2-contact-panel__form .wpcf7-form select,
.sp2-contact-panel__form .wpcf7-form textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
  outline: none;
}
.sp2-contact-panel__form .wpcf7-form input:focus,
.sp2-contact-panel__form .wpcf7-form select:focus,
.sp2-contact-panel__form .wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--sp2-accent);
  background: rgba(255,255,255,0.08);
}
.sp2-contact-panel__form .wpcf7-form textarea { min-height: 100px; resize: vertical; }
.sp2-contact-panel__form .wpcf7-form input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--sp2-accent);
  color: #0a0a0a;
  border: 1px solid var(--sp2-accent);
  padding: 13px 32px;
  border-radius: var(--sp2-radius);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--sp2-font);
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  outline: none;
}
.sp2-contact-panel__form .wpcf7-form input[type="submit"]:hover { opacity: 0.85; }
.sp2-contact-panel__form .wpcf7-form input[type="submit"]:focus,
.sp2-contact-panel__form .wpcf7-form input[type="submit"]:focus-visible { outline: none; }
.sp2-contact-panel__form .wpcf7-form .wpcf7-acceptance { display: flex; align-items: flex-start; gap: 10px; }
.sp2-contact-panel__form .wpcf7-form .wpcf7-acceptance input[type="checkbox"] {
  width: auto; flex-shrink: 0; margin-top: 3px;
  accent-color: var(--sp2-accent);
}
.sp2-contact-panel__form .wpcf7-form .wpcf7-acceptance .wpcf7-list-item-label {
  font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.5;
}
.sp2-contact-panel__form .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 13px;
  color: #fff;
  border-color: rgba(255,255,255,0.25) !important;
}
.sp2-contact-panel__form .wpcf7-spinner { display: none !important; }

/* ── Phone mask (intl-tel-input) in SP2 dark theme ────────────────────────── */

.sp2-contact-panel__form .iti {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  box-sizing: border-box;
  transition: border-color 0.2s, background 0.2s;
  --iti-dropdown-bg: var(--sp2-popup-bg, #0d1e30);
  --iti-hover-color: color-mix(in srgb, var(--sp2-accent) 15%, transparent);
  --iti-border-color: rgba(255,255,255,0.12);
  --iti-dialcode-color: rgba(255,255,255,0.5);
  --iti-arrow-color: var(--sp2-accent);
}

.sp2-contact-panel__form .iti:focus-within {
  border-color: var(--sp2-accent);
  background: rgba(255,255,255,0.08);
}

.sp2-contact-panel__form .wpcf7-form-control-wrap:has(.iti) {
  position: relative;
  z-index: 5;
  display: block;
  width: 100%;
}

.sp2-contact-panel__form .iti input.iti__tel-input {
  width: 100%;
  height: 100%;
  padding: 11px 14px;
  background: transparent !important;
  border: none !important;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  box-sizing: border-box;
  outline: none;
}

.sp2-contact-panel__form .iti__country-container { padding: 0; }

.sp2-contact-panel__form .iti__selected-country,
.sp2-contact-panel__form .iti__selected-country-primary {
  border: none !important;
  background: transparent !important;
  color: #fff;
  box-sizing: border-box;
  padding: 0 4px 0 12px !important;
  outline: none !important;
  box-shadow: none !important;
}

.sp2-contact-panel__form .iti__selected-country:hover,
.sp2-contact-panel__form .iti__selected-country-primary:hover {
  background: transparent !important;
}

.sp2-contact-panel__form .iti__selected-dial-code {
  padding: 0 10px 0 4px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
}

.sp2-contact-panel__form .iti__dropdown-content {
  z-index: 10;
  background: var(--sp2-popup-bg, #0d1e30);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.sp2-contact-panel__form .iti__search-input {
  background: rgba(255,255,255,0.05);
  color: #fff;
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  outline: none;
  font-size: 13px;
}

.sp2-contact-panel__form .iti__search-input::placeholder {
  color: rgba(255,255,255,0.4);
}

.sp2-contact-panel__form .iti__country-list {
  background: var(--sp2-popup-bg, #0d1e30);
  max-height: 220px;
}

.sp2-contact-panel__form .iti__country-name,
.sp2-contact-panel__form .iti__dial-code {
  color: #fff;
}

.sp2-contact-panel__form .iti__highlight { background: color-mix(in srgb, var(--sp2-accent) 15%, transparent); }

.sp2-popup-drawer::-webkit-scrollbar { width: 4px; }
.sp2-popup-drawer::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--sp2-accent) 30%, transparent); }

@keyframes sp2-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

.sp2-popup-close {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border: 1px solid transparent;
  border-bottom-color: rgba(255,255,255,0.1);
  background: none;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: color 0.18s;
  flex-shrink: 0;
  box-sizing: border-box;
}

.sp2-popup-close:hover {
  color: rgba(255,255,255,0.8);
  background: none !important;
  border-color: transparent !important;
  border-bottom-color: rgba(255,255,255,0.1) !important;
}

/* ── Loader ───────────────────────────────────────────────────────────────── */

.sp2-popup-loader {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.sp2-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid color-mix(in srgb, var(--sp2-accent) 20%, transparent);
  border-top-color: var(--sp2-accent);
  border-radius: 50%;
  animation: sp2-spin 0.8s linear infinite;
}

@keyframes sp2-spin { to { transform: rotate(360deg); } }

/* ── Popup content ────────────────────────────────────────────────────────── */

.sp2-popup-content { flex: 1; }

.sp2-popup__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sp2-popup__ident {
  flex: 1;
  min-width: 0;
}

.sp2-popup__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.sp2-popup__logo-img {
  width: 120px;
  height: auto;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

.sp2-popup__number {
  display: block;
  font-family: var(--sp2-font);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 10px;
}

.sp2-popup__ident-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.sp2-popup__floor {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
}

/* ── Popup specs ──────────────────────────────────────────────────────────── */

.sp2-popup__specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sp2-spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  background: var(--sp2-popup-bg, #0d1e30);
}

.sp2-spec__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.sp2-spec__value {
  font-size: 15px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
}

/* ── Popup price block ────────────────────────────────────────────────────── */

.sp2-popup__price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sp2-popup__price-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  flex-basis: 100%;
}

.sp2-popup__price-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--sp2-accent);
  letter-spacing: 0.02em;
}

.sp2-popup__price-sqm {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-left: auto;
}

.sp2-price-value {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: var(--sp2-accent) !important;
}

/* ── Popup media ──────────────────────────────────────────────────────────── */

.sp2-popup__media {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sp2-media-tabs {
  display: flex;
  gap: 2px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--sp2-radius);
  padding: 3px;
  margin-bottom: 14px;
}

.sp2-media-tab {
  flex: 1;
  padding: 7px 12px;
  border: none;
  background: transparent;
  font-family: var(--sp2-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  border-radius: 1px;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.sp2-media-tab.is-active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

/* Both tabs (3D visualization / 2D plan) share one fixed-ratio box, so switching tabs never
   changes the popup's height — whichever tab is active fills it, each image scaled down to
   fit (never cropped or stretched) via max-width/max-height "contain". 1:1 matches how both
   the 3D renders and the 2D plans are exported for this project; if a future image isn't
   square it just letterboxes inside the box instead of distorting or resizing it. */
.sp2-media-viewport {
  position: relative;
  aspect-ratio: 1 / 1;
}

.sp2-media-slide { display: none; height: 100%; }
.sp2-media-slide.is-active { display: flex; }

.sp2-media-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--sp2-radius);
}

/* ── Photo carousel (multiple 3D visualizations) ──────────────────────────── */

.sp2-photo-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--sp2-radius);
  flex: 1;
  height: 100%;
}

.sp2-photo-carousel__track {
  display: flex;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.sp2-photo-carousel__slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  line-height: 0;
}

/* 3D image is shown at 80% of the popup width, centred. The link (= the zoom-in click
   area) shrinks with it so the empty side margins aren't clickable. */
.sp2-photo-carousel__slide a,
.sp2-media-plan-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0 auto;
  cursor: zoom-in;
}

.sp2-photo-carousel__slide a { width: 80%; }
.sp2-media-plan-link { width: 100%; }

.sp2-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(10, 10, 10, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
  outline: none;
}

.sp2-carousel-btn:hover { background: var(--sp2-accent); color: #0a0a0a; }
.sp2-carousel-btn:focus,
.sp2-carousel-btn:focus-visible { outline: none !important; box-shadow: none !important; }

.sp2-carousel-btn--prev { left: 10px; }
.sp2-carousel-btn--next { right: 10px; }

.sp2-carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}

.sp2-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, width 0.2s;
  outline: none;
}

.sp2-carousel-dot.is-active {
  width: 16px;
  border-radius: 3px;
  background: var(--sp2-accent);
}

/* ── Popup features ───────────────────────────────────────────────────────── */

.sp2-popup__features {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sp2-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.72);
}

.sp2-feature__icon { color: var(--sp2-accent); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.sp2-feature__icon img { width: 25px; height: 25px; object-fit: contain; display: block; }
.sp2-feature__icon svg { width: 25px !important; height: 25px !important; display: block; }

/* ── Popup actions ────────────────────────────────────────────────────────── */

.sp2-popup__actions {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sp2-popup-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 13px 16px !important;
  font-family: var(--sp2-font) !important;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.18) !important;
  border-radius: var(--sp2-radius);
  background: transparent !important;
  color: rgba(255,255,255,0.7) !important;
  text-decoration: none;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  box-sizing: border-box;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  text-align: center;
}

.sp2-popup-btn--primary {
  background: var(--sp2-accent) !important;
  border-color: var(--sp2-accent) !important;
  color: #0a0a0a !important;
}

.sp2-popup-btn--primary:hover { background: color-mix(in srgb, var(--sp2-accent) 82%, #fff) !important; border-color: color-mix(in srgb, var(--sp2-accent) 82%, #fff) !important; }

.sp2-popup-btn:not(.sp2-popup-btn--primary):hover {
  border-color: var(--sp2-accent);
  color: var(--sp2-accent);
}

.sp2-popup-btn--disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

/* ── Popup contact (CF7 form) ─────────────────────────────────────────────── */

.sp2-popup__contact { padding: 0 24px 20px; }

.sp2-contact-form { margin-top: 0; }

/* ── Popup company info ───────────────────────────────────────────────────── */

.sp2-popup__company-info {
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sp2-popup__company-info p {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

.sp2-popup__company-info a {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
}

.sp2-popup__company-info a:hover { color: var(--sp2-accent); }

/* ── Remove focus outlines on popup controls ──────────────────────────────── */

.sp2-popup-btn:focus,
.sp2-popup-btn:focus-visible,
.sp2-popup-close:focus,
.sp2-popup-close:focus-visible,
.sp2-flip-btn:focus,
.sp2-flip-btn:focus-visible,
.sp2-media-tab:focus,
.sp2-media-tab:focus-visible,
.sp2-btn:focus,
.sp2-btn:focus-visible,
.sp2-btn:active,
.sp2-pricelist-btn:focus,
.sp2-pricelist-btn:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* ── Scroll lock ──────────────────────────────────────────────────────────── */

body.sp2-no-scroll { overflow: hidden; }

/* ── Mobile ───────────────────────────────────────────────────────────────── */

@media (max-width: 960px) {
  .sp2-plans__inner {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .sp2-list-wrap { max-height: none; }

  /* Apartment cards — 2-column grid on tablet */
  .sp2-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* Popup specs stay 2-col on tablet */
  .sp2-popup__specs { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  /* Popup takes full viewport width (min(680px,100vw) already handles this) */

  .sp2-popup__head    { padding: 20px 20px 16px; gap: 12px; }
  .sp2-popup__number  { font-size: 24px; }
  .sp2-popup__logo-img { width: 80px; }

  /* Specs: single column on small phones */
  .sp2-popup__specs { grid-template-columns: 1fr; }

  /* Apartment list: single column on small phones */
  .sp2-list { grid-template-columns: 1fr; }

  .sp2-apt__meta { grid-template-columns: 1fr 1fr; }
}
