/* ============================================
   COMPONENTS CSS - Misc Components
   ============================================ */

/* ============================================
   PROPERTY DETAIL PAGE
   ============================================ */
.detail-page {
  padding-top: var(--navbar-h);
  background: var(--bg);
}

.detail-hero {
  position: relative;
  height: 520px;
  background: #1e293b;
  overflow: hidden;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 100%;
  gap: 3px;
}

.gallery-main {
  grid-row: span 2;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-thumb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery-main img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery-main:hover img,
.gallery-thumb:hover img { transform: scale(1.04); }

.gallery-overlay {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(10px);
  color: white;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 0.825rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 24px;
}

.detail-main {}

.detail-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.detail-breadcrumbs a {
  color: var(--primary);
  font-weight: 500;
}

.detail-breadcrumbs span { color: var(--border); }

.detail-header {
  margin-bottom: 1.5rem;
}

.detail-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.detail-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.detail-badge.sale { background: rgba(22,163,74,0.1); color: var(--primary); }
.detail-badge.verified { background: rgba(14,165,233,0.1); color: var(--secondary); }
.detail-badge.featured { background: rgba(245,158,11,0.1); color: var(--accent-dark); }

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.detail-location i { color: var(--primary); }

.detail-price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-price {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--primary);
}

.detail-price-per {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 400;
}

.detail-price-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
}

.icon-btn.saved { color: #ef4444; border-color: #ef4444; }

/* Property Specs Grid */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.spec-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  transition: var(--transition-fast);
}

.spec-item:hover { border-color: var(--primary); }

.spec-icon {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.spec-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-display);
  margin-bottom: 2px;
}

.spec-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Section Cards */
.detail-section-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.detail-section-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.description-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Amenities List */
.amenities-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.amenity-item i {
  color: var(--primary);
  width: 16px;
  font-size: 0.8rem;
}

/* Map Section */
.map-placeholder {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: var(--radius-md);
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #7dd3fc;
  color: #0369a1;
  font-size: 0.9rem;
  font-weight: 500;
  gap: 10px;
}

/* ============================================
   AGENT CONTACT SIDEBAR
   ============================================ */
.agent-contact-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: calc(var(--navbar-h) + 1rem);
}

.agent-card-header {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.agent-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.2);
}

.agent-detail-name {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 2px;
}

.agent-company {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}

.agent-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #fbbf24;
}

.agent-rating span { color: rgba(255,255,255,0.6); }

.agent-contact-body { padding: 1.5rem; }

.contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 10px;
  font-family: var(--font-primary);
}

.contact-btn-call {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  box-shadow: 0 4px 16px rgba(22, 163, 74, 0.3);
}

.contact-btn-call:hover {
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.4);
  transform: translateY(-1px);
}

.contact-btn-whatsapp {
  background: #25d366;
  color: white;
  border: none;
}

.contact-btn-whatsapp:hover { background: #128c7e; }

.contact-btn-email {
  background: white;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.contact-btn-email:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.contact-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  margin-top: 0.25rem;
}

/* Price History Chart */
.price-history {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  margin-top: 1rem;
}

.price-history h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* ============================================
   POST PROPERTY PAGE
   ============================================ */
.post-page {
  padding-top: var(--navbar-h);
  min-height: 100vh;
  background: var(--bg);
}

.post-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0ea5e9 100%);
  padding: 3rem 0;
  text-align: center;
  color: white;
}

.post-hero h1 {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.post-hero p {
  font-size: 1rem;
  opacity: 0.85;
}

.post-layout {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 24px;
}

/* Step Indicator */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2.5rem;
  gap: 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  flex: 1;
  max-width: 120px;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.step-item.active .step-circle,
.step-item.done .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
}

.step-item.active .step-label { color: var(--primary); font-weight: 700; }

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-bottom: 22px;
  max-width: 60px;
}

.step-connector.done { background: var(--primary); }

/* Form Sections */
.form-section {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title i { color: var(--primary); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full-width { grid-column: 1 / -1; }

.form-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-label span { color: #ef4444; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: var(--font-primary);
  transition: var(--transition-fast);
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.form-textarea { resize: vertical; min-height: 120px; }

/* Photo Upload */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.photo-upload-area:hover, .photo-upload-area.drag-over {
  border-color: var(--primary);
  background: var(--primary-pale);
}

.photo-upload-area input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-icon {
  font-size: 2.5rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.upload-text { font-size: 0.875rem; color: var(--text-secondary); }
.upload-text strong { color: var(--primary); }
.upload-hint { font-size: 0.775rem; color: var(--text-muted); margin-top: 4px; }

/* Form Submit */
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.btn-outline {
  padding: 12px 24px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: white;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-primary);
}

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

.btn-submit {
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-primary);
  box-shadow: var(--shadow-primary);
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(22, 163, 74, 0.4);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.auth-left {
  flex: 1;
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #0f3460 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.auth-left::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(22,163,74,0.15), transparent);
  top: -100px;
  right: -100px;
}

.auth-info {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.auth-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
}

.auth-logo span { color: var(--primary-light); }

.auth-info h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.auth-info p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  text-align: center;
}

.auth-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
}

.auth-stat span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.auth-right {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 3rem;
  background: white;
  overflow-y: auto;
}

.auth-form-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.auth-form-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.auth-form .form-group { margin-bottom: 1rem; }

.social-login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-primary);
}

.social-btn:hover { border-color: var(--primary); color: var(--primary); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-toggle {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

.auth-toggle a {
  color: var(--primary);
  font-weight: 600;
}

/* ============================================
   EMI CALCULATOR
   ============================================ */
.calculator-page {
  padding-top: var(--navbar-h);
  min-height: 100vh;
  background: var(--bg);
}

.calculator-hero {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  padding: 3rem 0;
  text-align: center;
  color: white;
}

.calculator-layout {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
}

.calc-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 2rem;
}

.calc-result-card {
  background: linear-gradient(160deg, #0f172a, #1e293b);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: white;
  position: sticky;
  top: calc(var(--navbar-h) + 1rem);
  height: fit-content;
}

.calc-emi-amount {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 900;
  color: var(--primary-light);
  margin-bottom: 0.25rem;
}

.calc-emi-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 2rem;
}

.calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.calc-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.calc-item span { color: rgba(255,255,255,0.55); }
.calc-item strong { color: white; font-weight: 700; }

/* ============================================
   AGENTS PAGE
   ============================================ */
.agent-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.agent-card-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 auto 1rem;
  border: 3px solid white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.agent-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.agent-card .city { font-size: 0.825rem; color: var(--text-muted); margin-bottom: 8px; }

.agent-card-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.agent-stat strong { display: block; font-size: 1rem; font-weight: 800; color: var(--primary); }
.agent-stat span { font-size: 0.7rem; color: var(--text-muted); }

/* ============================================
   NOTIFICATION TOAST
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #0f172a;
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: toastIn 0.3s ease both;
  pointer-events: all;
}

.toast.success i { color: #4ade80; }
.toast.error i { color: #f87171; }
.toast.info i { color: #38bdf8; }

.toast.out { animation: toastOut 0.3s ease both; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-10px) scale(0.95); }
}

/* ============================================
   MODAL
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 540px;
  width: 100%;
  padding: 2rem;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
  box-shadow: var(--shadow-xl);
}

.modal-backdrop.open .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover { background: var(--primary); color: white; }
