/* ═══════════════════════════════════════════════
   property.css — Premium Property Detail Page
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Variables now centralized in color-palette.css */

#property-detail {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-secondary);
  background: var(--surface-alt);
  min-height: 100vh;
  padding: 0 0 60px 0;
}

/* ─── LOADER ─── */
.prop-loader {
  text-align: center;
  padding: 120px 0;
  font-family: 'Inter', sans-serif;
}

.loader-pulse {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
  animation: pulseRing 1.5s ease-out infinite;
}

.loader-icon {
  font-size: 28px;
  color: var(--primary);
  animation: pulseIcon 1.5s ease-in-out infinite;
}

@keyframes pulseRing {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }

  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

@keyframes pulseIcon {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }
}

/* ─── GALLERY ─── */
.gallery-container {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow-lg);
}

.gallery-hero {
  position: relative;
  height: 420px;
  cursor: pointer;
  overflow: hidden;
}

.gallery-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-hero:hover img {
  transform: scale(1.03);
}

.gallery-expand-btn {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--prop-transition);
  z-index: 2;
}

.gallery-expand-btn:hover {
  background: rgba(0, 0, 0, 0.85);
}

.gallery-count-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.gallery-thumbs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #0f172a;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 90px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: var(--prop-transition);
  border: 2px solid transparent;
}

.gallery-thumb.active,
.gallery-thumb:hover {
  opacity: 1;
  border-color: var(--primary-light);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── TITLE BAR ─── */
.prop-title-bar {
  padding: 16px 0 0;
}

.prop-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 12px;
}

.prop-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gradient-prop);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.prop-sell-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #059669;
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.prop-category-badge {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: var(--text-secondary);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-soft);
}

.prop-featured-badge {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.prop-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.prop-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.prop-meta-item i {
  color: var(--primary-light);
  font-size: 13px;
}

/* ─── PRICE BAR ─── */
.prop-price-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}

.prop-price-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.prop-price-value {
  font-size: 30px;
  font-weight: 800;
  background: var(--gradient-prop);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.prop-cta-group {
  display: flex;
  gap: 10px;
}

.btn-request-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--gradient-prop);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--prop-transition);
  position: relative;
  overflow: hidden;
}

.btn-request-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
  opacity: 0;
  transition: var(--prop-transition);
}

.btn-request-primary:hover::before {
  opacity: 1;
}

.btn-request-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.35);
}

.btn-request-primary:active {
  transform: translateY(0);
}

.btn-request-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: var(--prop-transition);
}

.btn-request-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

/* ─── SECTIONS ─── */
.prop-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.prop-section.revealed {
  opacity: 1;
  transform: translateY(0);
}

.prop-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.prop-section-title i {
  color: var(--primary);
  font-size: 16px;
}

/* ─── DESCRIPTION ─── */
.prop-description {
  font-size: 15px;
  line-height: 1.8;
  color: #475569;
}

/* ─── SPEC CARDS ─── */
.spec-card {
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--prop-transition);
  cursor: default;
}

.spec-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: var(--primary-light);
}

.spec-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-prop-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 16px;
  flex-shrink: 0;
}

.spec-card:hover .spec-icon-box {
  background: var(--gradient-prop);
  color: #fff;
}

.spec-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}

.spec-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

/* ─── TABS ─── */
.prop-tab-nav {
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 0;
  margin: 0 0 16px;
  border-bottom: 2px solid var(--border-soft);
  padding-bottom: 2px;
}

.prop-tab {
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  padding: 10px 18px;
  border-radius: 10px 10px 0 0;
  cursor: pointer;
  transition: var(--prop-transition);
  position: relative;
}

.prop-tab.active {
  color: var(--primary);
  background: var(--gradient-prop-soft);
}

.prop-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-prop);
  border-radius: 2px;
}

.prop-tab:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--surface-alt);
}

/* Tab Panels — Custom show/hide (not using Bootstrap tab plugin) */
.prop-tab-panels {
  position: relative;
}

.prop-tab-panel {
  display: none;
}

.prop-tab-panel.active {
  display: block;
}

.prop-media-box {
  background: #0f172a;
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
}

.prop-media-box iframe {
  width: 100%;
  height: 320px;
  border: none;
}

.prop-docs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 0;
}

.prop-doc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  text-decoration: none;
  color: var(--text-secondary);
  transition: var(--prop-transition);
}

.prop-doc-item:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
  color: var(--primary);
}

.prop-doc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

/* ─── SIDEBAR ─── */
.prop-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.prop-sidebar-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-soft);
}

.prop-sidebar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.prop-sidebar-title i {
  color: var(--primary);
}

.prop-quick-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-soft);
  font-size: 14px;
}

.quick-detail-row:last-child {
  border-bottom: none;
}

.quick-detail-label {
  color: var(--text-muted);
  font-weight: 500;
}

.quick-detail-value {
  font-weight: 700;
  color: var(--text-secondary);
}

.prop-sidebar-cta {
  background: var(--gradient-prop-soft);
  border: 1px solid rgba(79, 70, 229, 0.15);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.prop-sidebar-cta .cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--gradient-prop);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}

.prop-sidebar-cta h5 {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 6px;
}

/* ─── RELATED PROPERTIES ─── */
.prop-related-section {
  margin-top: 20px;
}

.related-scroll-container {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-light) transparent;
}

.related-scroll-container::-webkit-scrollbar {
  height: 6px;
}

.related-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.related-scroll-container::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: 10px;
}

.related-card {
  flex-shrink: 0;
  width: 300px;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: var(--prop-transition);
  text-decoration: none;
  color: inherit;
  display: block;
}

.related-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
  color: inherit;
  text-decoration: none;
}

.related-card-img {
  position: relative;
  height: 190px;
  overflow: hidden;
}

.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.related-card:hover .related-card-img img {
  transform: scale(1.08);
}

.related-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 55%);
  opacity: 0;
  transition: var(--prop-transition);
}

.related-card:hover .related-card-overlay {
  opacity: 1;
}

.related-card-price {
  position: absolute;
  bottom: 12px;
  left: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.related-card-type {
  position: absolute;
  top: 12px;
  left: 14px;
  background: var(--gradient-prop);
  color: #fff;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-card-body {
  padding: 16px 18px;
}

.related-card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.related-card-meta i {
  color: var(--primary-light);
  font-size: 11px;
}

.related-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--prop-transition);
}

.related-nav-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── REQUEST MODAL ─── */
.prop-modal {
  border: none;
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.prop-modal-header {
  background: var(--gradient-prop);
  color: #fff;
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.prop-modal-body {
  padding: 28px;
}

.prop-modal-body .form-control,
.prop-modal-body .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  padding: 10px 14px;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: var(--prop-transition);
}

.prop-modal-body .form-control:focus,
.prop-modal-body .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.prop-modal-footer {
  padding: 16px 28px;
  background: var(--surface-alt);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border-soft);
}

/* ─── LIGHTBOX ─── */
.prop-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
}

.lb-image-wrap {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 88vh;
}

.lb-image {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
  transition: opacity 0.3s ease;
}

.lb-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--prop-transition);
}

.lb-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: var(--prop-transition);
}

.lb-arrow:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lb-prev-btn {
  left: 24px;
}

.lb-next-btn {
  right: 24px;
}

.lb-counter {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 991.98px) {
  .gallery-hero {
    height: 300px;
  }

  .prop-title {
    font-size: 22px;
  }

  .prop-price-value {
    font-size: 24px;
  }

  .prop-price-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .prop-cta-group {
    width: 100%;
  }

  .btn-request-primary {
    flex: 1;
  }

  .prop-sidebar {
    position: static;
  }

  .related-card {
    width: 260px;
  }
}

@media (max-width: 575.98px) {
  .gallery-hero {
    height: 220px;
  }

  .gallery-thumb {
    width: 64px;
    height: 48px;
  }

  .prop-section {
    padding: 20px 16px;
  }

  .prop-price-bar {
    padding: 16px 18px;
  }

  .prop-title {
    font-size: 20px;
  }

  .prop-meta-row {
    gap: 10px;
  }

  .prop-meta-item {
    font-size: 12px;
  }

  .related-card {
    width: 240px;
  }

  .prop-modal-header {
    padding: 18px 20px;
  }

  .prop-modal-body {
    padding: 20px;
  }
}
