/* CasaRoma AI - Page-specific styles */

/* ============ Home Page ============ */
.home-greeting {
  margin-bottom: 20px;
}

.home-greeting h2 {
  font-size: 1.375rem;
}

.home-greeting p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 4px;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.home-featured {
  margin-bottom: 20px;
}

.home-featured__scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.home-featured__scroll::-webkit-scrollbar { display: none; }

.home-featured__scroll .property-card {
  min-width: 280px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ============ Search Page ============ */
.search-header {
  margin-bottom: 16px;
}

.search-ai-bar {
  position: relative;
  margin-bottom: 12px;
}

.search-ai-bar .input {
  padding-right: 44px;
}

.search-ai-bar__send {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}

.search-ai-bar__send:active { transform: translateY(-50%) scale(0.93); }

.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-results-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ============ Publish Page ============ */
.publish-wizard {
  margin-top: 8px;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
  animation: pageIn 0.2s ease;
}

.wizard-step h3 {
  margin-bottom: 4px;
}

.wizard-step p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.wizard-nav .btn { flex: 1; }

/* Photo Upload */
.photo-upload {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.photo-upload__slot {
  aspect-ratio: 1;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  gap: 4px;
  transition: all var(--t-fast);
}

.photo-upload__slot:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.photo-upload__slot.filled {
  border-style: solid;
  border-color: var(--border);
  overflow: hidden;
  padding: 0;
}

.photo-upload__slot.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============ Valuation Page ============ */
.valuation-result {
  text-align: center;
  padding: 24px 16px;
  margin-top: 16px;
}

.valuation-result__range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 16px 0;
}

.valuation-result__price {
  font-size: 1.5rem;
  font-weight: 700;
}

.valuation-result__price.min { color: var(--primary-light); }
.valuation-result__price.max { color: var(--primary-dark); }
.valuation-result__sep { color: var(--text-tertiary); font-size: 1.25rem; }

.valuation-result__avg {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.valuation-comparables {
  margin-top: 24px;
}

/* ============ Showcase Page ============ */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

.showcase-slide {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}

.showcase-slide__content {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
}

.showcase-slide__icon {
  opacity: 0.9;
  margin-bottom: 4px;
}

.showcase-slide__title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.showcase-slide__subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
}

.showcase-slide__body {
  color: rgba(255,255,255,0.9);
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 320px;
}

.showcase-slide__counter {
  color: rgba(255,255,255,0.6);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

.showcase-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.showcase-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border);
  cursor: pointer;
  transition: all var(--t-fast);
}

.showcase-dot.active {
  width: 20px;
  background: var(--primary);
}

/* ============ Profile Page ============ */
.profile-header {
  text-align: center;
  padding: 24px 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--primary-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 12px;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-menu__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast);
  width: 100%;
  text-align: left;
}

.profile-menu__item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.profile-menu__item:last-child { border-radius: 0 0 var(--radius) var(--radius); border-bottom: none; }
.profile-menu__item:active { background: var(--primary-bg); }

.profile-menu__item svg { color: var(--text-secondary); flex-shrink: 0; }
.profile-menu__item span { flex: 1; }

.profile-menu__item .toggle { margin-left: auto; }

/* ============ Login / SSO Required ============ */
.login-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 32px;
  text-align: center;
}

.login-prompt svg {
  color: var(--primary);
  margin-bottom: 24px;
}

.login-prompt h2 {
  margin-bottom: 8px;
}

.login-prompt p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 280px;
}

/* ============ Responsive Pages ============ */

/* Tablet */
@media (min-width: 768px) {
  .home-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .home-featured__scroll {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow-x: visible;
  }

  .home-featured__scroll .property-card {
    min-width: unset;
  }

  .search-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .photo-upload {
    grid-template-columns: repeat(4, 1fr);
  }

  .valuation-result__range {
    gap: 24px;
  }

  .valuation-result__price {
    font-size: 1.75rem;
  }

  .valuation-result__avg {
    font-size: 2.5rem;
  }

  .profile-header {
    padding: 32px 24px;
  }

  .profile-avatar {
    width: 88px;
    height: 88px;
    font-size: 1.75rem;
  }

  .showcase-slide__body {
    max-width: 420px;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .home-stats {
    grid-template-columns: repeat(6, 1fr);
  }

  .home-featured__scroll {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-results {
    grid-template-columns: repeat(3, 1fr);
  }

  .photo-upload {
    grid-template-columns: repeat(6, 1fr);
  }

  .valuation-result {
    padding: 32px;
  }

  .showcase-slide {
    aspect-ratio: 16/9;
  }

  .showcase-slide__title {
    font-size: 2rem;
  }

  .showcase-slide__body {
    max-width: 520px;
    font-size: 1rem;
  }

  .login-prompt p {
    max-width: 380px;
  }
}

/* ============ AI Guide Floating ============ */
.ai-fab {
  position: fixed;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 16px);
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 90;
  transition: all var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}

.ai-fab:active { transform: scale(0.92); }

.ai-fab svg { width: 24px; height: 24px; }

.ai-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  background: var(--accent);
  border: 2px solid var(--bg);
}
