/* ==========================================================================
   IVY CENTRAL - FLOORPLANS REDESIGN (EDITORIAL LUXURY ARCHITECTURAL)
   Typography: Playfair Display (Serif), Montserrat (Sans)
   Palette: Ivory #F6F3EC, Navy #0B1D49, Champagne #C6A468 / #B88E4B, Slate #687080
   ========================================================================== */

#floorplans {
  background-color: #F2F7FF;
  color: #243B60;
  padding: clamp(56px, 6vw, 96px) 0;
  position: relative;
  overflow: hidden;
}

.fp-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3.5vw, 40px);
}

/* ---------------- HEADER ---------------- */
.fp-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto clamp(24px, 2.8vw, 36px) auto;
}

.fp-eyebrow {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0549CE;
  display: block;
  margin-bottom: 10px;
}

.fp-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 700;
  color: #0B1D49;
  line-height: 1.2;
  margin: 0 0 12px 0;
}

.fp-subtitle {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: clamp(14px, 1.15vw, 16px);
  color: #243B60;
  line-height: 1.55;
  margin: 0;
  font-weight: 400;
}

/* ---------------- 6 UNIT TABS ---------------- */
.fp-tabs-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  gap: 10px;
  padding: 4px 0 0 0;
  margin-bottom: 12px;
}

.fp-tabs-wrap::-webkit-scrollbar {
  display: none;
}

.fp-tab-btn {
  background: transparent;
  color: #0B1D49;
  border: 1px solid rgba(11, 29, 73, 0.22);
  padding: 10px 22px;
  border-radius: 9999px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  flex-shrink: 0;
}

.fp-tab-btn:hover {
  background: rgba(11, 29, 73, 0.06);
  border-color: rgba(11, 29, 73, 0.4);
  color: #0B1D49;
}

.fp-tab-btn.active {
  background: #0B1D49;
  color: #FFFFFF;
  border-color: #0B1D49;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(11, 29, 73, 0.22);
}

.fp-tabs-note {
  text-align: center;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: #405779;
  margin: 0 auto clamp(24px, 2.6vw, 36px) auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.015em;
}

.fp-tabs-note strong {
  font-weight: 700;
  color: #0B1D49;
}

/* ---------------- MAIN SHOWCASE CARD ---------------- */
.fp-showcase {
  background: #FFFFFF;
  border-radius: 20px;
  border: 1px solid rgba(11, 29, 73, 0.12);
  box-shadow: 0 16px 48px rgba(11, 29, 73, 0.08);
  padding: clamp(20px, 3.2vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(360px, 1fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  position: relative;
}

/* ---------------- LEFT: DRAWING VIEWPORT ---------------- */
.fp-draw-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* View Mode Selector (3D / 2D / Vị trí tầng) */
.fp-view-modes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fp-mode-btn {
  background: #F1F5F9;
  color: #475569;
  border: 1px solid rgba(11, 29, 73, 0.12);
  padding: 8px 16px;
  border-radius: 9999px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  outline: none;
}

.fp-mode-btn:hover {
  background: #E2E8F0;
  border-color: #0B1D49;
  color: #0B1D49;
}

.fp-mode-btn.active {
  background: #0549CE;
  color: #FFFFFF;
  border-color: #0549CE;
  font-weight: 600;
}

.fp-mode-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

/* Drawing Stage Canvas */
.fp-stage {
  background: #FFFFFF;
  border: 1px solid rgba(11, 29, 73, 0.12);
  border-radius: 16px;
  height: clamp(380px, 38vw, 520px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 2vw, 28px);
  cursor: zoom-in;
  transition: border-color 0.25s ease;
}

.fp-stage:hover {
  border-color: #0549CE;
}

.fp-stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fp-stage-img.fade-out {
  opacity: 0;
  transform: scale(0.98);
}

.fp-zoom-trigger {
  position: absolute;
  right: 14px;
  top: 14px;
  background: rgba(11, 29, 73, 0.88);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  z-index: 5;
}

.fp-zoom-trigger:hover {
  background: #C6A468;
  color: #0B1D49;
  transform: scale(1.08);
}

.fp-zoom-trigger svg {
  width: 18px;
  height: 18px;
}

/* ---------------- INSET FLOOR LOCATION (Bottom-Right of 2D Plan) ---------------- */
.fp-loc-inset {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: clamp(140px, 14vw, 185px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(198, 164, 104, 0.4);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 29, 73, 0.15), 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 6px 10px 8px 10px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 280ms ease, transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 240ms ease;
  cursor: pointer;
  pointer-events: auto;
}

.fp-loc-inset:hover {
  border-color: #C6A468;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(198, 164, 104, 0.35), 0 4px 12px rgba(11, 29, 73, 0.1);
}

.fp-loc-inset.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.fp-loc-inset-label {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #B88E4B;
  text-transform: uppercase;
  margin-bottom: 4px;
  user-select: none;
}

.fp-loc-inset-img {
  width: 100%;
  height: auto;
  max-height: 70px;
  object-fit: contain;
  display: block;
}

/* ---------------- RIGHT: UNIT INFORMATION ---------------- */
.fp-info-col {
  border-left: 1px solid rgba(198, 164, 104, 0.25);
  padding-left: clamp(24px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: auto;
  justify-content: flex-start;
  padding-bottom: 24px;
  min-width: 0;
}

/* Khối 1: Nhãn loại căn + tên căn + dòng mã áp dụng */
.fp-info-header {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.fp-cat-label {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0549CE;
  margin: 0 0 10px 0;
}

.fp-unit-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 600;
  color: #0B1D49;
  line-height: 1.2;
  margin: 0 0 8px 0;
  min-height: auto;
}

.fp-unit-codes {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  color: #687080;
  line-height: 1.45;
  margin: 0;
  min-height: auto;
}

/* Khối 2: Hai thông số diện tích */
.fp-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 20px;
  background: #F0F6FF;
  border-radius: 12px;
  border: 1px solid rgba(5, 73, 206, 0.16);
  margin: 0;
}

.fp-spec-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fp-spec-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(19px, 1.6vw, 23px);
  font-weight: 600;
  color: #0B1D49;
  line-height: 1.15;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums tabular-nums;
  -webkit-font-feature-settings: "lnum" 1, "tnum" 1;
  font-feature-settings: "lnum" 1, "tnum" 1;
  margin: 0 0 6px 0;
}

.fp-spec-value.gold {
  color: #0549CE;
}

.fp-spec-unit {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  margin-left: 2px;
  color: #687080;
  white-space: nowrap;
  vertical-align: baseline;
}

.fp-spec-label {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;
  color: #687080;
  margin: 0;
  white-space: nowrap;
}

/* Khối 3: Dòng công năng */
.fp-funcs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding-top: 16px;
  padding-bottom: 16px;
  border-top: 1px solid rgba(11, 29, 73, 0.12);
  border-bottom: 1px solid rgba(11, 29, 73, 0.12);
  margin: 0;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #0B1D49;
}

.fp-func-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fp-func-item svg {
  width: 16px;
  height: 16px;
  stroke: #0549CE;
  flex-shrink: 0;
}

.fp-func-dot {
  color: #0549CE;
}

/* Khối 4: Đoạn mô tả */
.fp-desc {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.65;
  color: #334155;
  margin: 0;
  min-height: auto;
}

/* Khối 5: Nút nhận tư vấn */
.fp-cta-btn {
  background: #0549CE;
  color: #FFFFFF;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  height: 54px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 10px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid #0549CE;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(5, 73, 206, 0.25);
  outline: none;
  margin: 0;
}

.fp-cta-btn:hover {
  background: #071D54;
  border-color: #071D54;
  box-shadow: 0 6px 20px rgba(7, 29, 84, 0.35);
  transform: translateY(-1px);
}

.fp-cta-arrow {
  color: #A3CDFF;
  font-size: 17px;
  transition: transform 0.2s ease;
}

.fp-cta-btn:hover .fp-cta-arrow {
  transform: translate(2px, -2px);
}

/* Disclaimer text at bottom */
.fp-disclaimer {
  text-align: center;
  margin-top: 24px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

/* ---------------- FULLSCREEN LIGHTBOX ---------------- */
.fp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(5, 13, 33, 0.94);
  backdrop-filter: blur(14px);
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.fp-lightbox.active {
  display: flex;
  opacity: 1;
}

.fp-lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.fp-lb-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.fp-lb-unit-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
}

.fp-lb-mode-name {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: #E5C378;
  font-weight: 500;
}

.fp-lb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fp-lb-ctrl-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: 600;
}

.fp-lb-ctrl-btn:hover {
  background: #C6A468;
  color: #0B1D49;
  border-color: #C6A468;
}

.fp-lb-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 20px;
  margin-left: 8px;
}

.fp-lb-close-btn:hover {
  background: #E53E3E;
  color: #FFFFFF;
  border-color: #E53E3E;
}

.fp-lb-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fp-lb-viewport.dragging {
  cursor: grabbing;
}

.fp-lb-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
  user-select: none;
  -webkit-user-drag: none;
}

.fp-lb-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 16px;
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  pointer-events: none;
}

/* ---------------- RESPONSIVE BREAKPOINTS ---------------- */
@media (max-width: 1024px) {
  .fp-showcase {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 24px 20px;
    align-items: start;
  }

  .fp-info-col {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid rgba(198, 164, 104, 0.2);
    padding-top: 24px;
    padding-bottom: 0;
    gap: 20px;
    height: auto;
    justify-content: flex-start;
  }

  .fp-stage {
    height: clamp(320px, 50vw, 440px);
  }
}

@media (max-width: 768px) {
  .fp-tabs-wrap {
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: 16px;
    margin-left: -16px;
    margin-right: -16px;
  }

  .fp-tab-btn {
    padding: 8px 16px;
    font-size: 13px;
  }

  .fp-specs-grid {
    grid-template-columns: 1fr 1fr;
    padding: 16px 14px;
    gap: 16px;
  }

  .fp-spec-value {
    font-size: 17.5px;
  }

  .fp-loc-inset {
    width: clamp(110px, 30vw, 135px);
    padding: 4px 6px 6px 6px;
    right: 10px;
    bottom: 10px;
  }

  .fp-loc-inset-label {
    font-size: 8.5px;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
  }

  .fp-loc-inset-img {
    max-height: 48px;
  }

  .fp-funcs {
    font-size: 12.5px;
    gap: 8px 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .fp-cta-btn {
    height: 52px;
    min-height: 52px;
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .fp-specs-grid {
    padding: 12px 10px;
    gap: 8px;
  }

  .fp-spec-value {
    font-size: 15px;
  }

  .fp-spec-unit {
    font-size: 11px;
    margin-left: 2px;
  }

  .fp-spec-label {
    font-size: 11px;
    margin-top: 3px;
  }
}
