/**
 * Axom Home - View & Page Specific Layouts
 */

/* ==========================================
   HOMEPAGE VIEWS
   ========================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #083B24 0%, #0C5A37 50%, #127A4B 100%);
  color: white;
  padding: var(--space-3xl) 0 calc(var(--space-3xl) + 30px);
  overflow: hidden;
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: #FDE68A;
  margin-bottom: var(--space-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  color: #FFFFFF;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  color: #E2E8F0;
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: var(--space-xl);
  font-weight: 400;
}

/* Hero Search Card */
.hero-search-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: var(--space-md);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  text-align: left;
}

.search-type-selector {
  display: flex;
  gap: 6px;
  margin-bottom: var(--space-sm);
}

.type-tab {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-muted);
  background: var(--bg-muted);
  transition: all var(--transition-fast);
}

.type-tab.active {
  background: var(--primary);
  color: white;
}

.search-inputs-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .search-inputs-grid {
    grid-template-columns: 1.2fr 1.2fr 1.5fr auto;
    align-items: center;
  }
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.search-input-box svg {
  color: var(--primary);
  flex-shrink: 0;
}

.search-input-box input,
.search-input-box select {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
}

.quick-locations {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: #CBD5E1;
}

.quick-loc-pill {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.quick-loc-pill:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #FDE68A;
}

/* Category Grid */
.section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--space-xl);
}

@media (min-width: 640px) {
  .section-header {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }
}

.section-header .section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-3xl);
}

@media (min-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-main);
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-brand);
  box-shadow: var(--shadow-card-hover);
}

.category-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--primary-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.category-card:hover .category-icon-box {
  background: var(--primary);
  color: white;
}

.category-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.category-card p {
  font-size: 0.825rem;
}

/* Property Grid Layout */
.property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 640px) {
  .property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .property-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .property-grid-4col {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* How Axom Home Works Section */
.workflow-section {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-lg);
  margin: var(--space-3xl) 0;
  border: 1px solid var(--border-light);
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

@media (min-width: 768px) {
  .workflow-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: white;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 12px rgba(12, 90, 55, 0.3);
}

.workflow-step h4 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

/* Trust / Legal Feature Banner */
.legal-banner-card {
  background: linear-gradient(135deg, #0C5A37 0%, #083B24 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin: var(--space-3xl) 0;
}

@media (min-width: 1024px) {
  .legal-banner-card {
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
  }
}

.legal-banner-card h2 {
  color: white;
  margin-bottom: var(--space-sm);
}

.legal-banner-card p {
  color: #E2E8F0;
  margin-bottom: var(--space-lg);
  font-size: 1rem;
}

/* ==========================================
   SEARCH & FILTER PAGE
   ========================================== */
.search-page-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-top: var(--space-lg);
}

@media (min-width: 1024px) {
  .search-page-layout {
    grid-template-columns: 280px 1fr;
  }
}

.filter-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  height: fit-content;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.filter-section {
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.filter-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  border-color: var(--border-brand);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.active-filters-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-subtle);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==========================================
   PROPERTY DETAILS PAGE
   ========================================== */
.property-details-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  padding-top: var(--space-lg);
}

@media (min-width: 1024px) {
  .property-details-layout {
    grid-template-columns: 1fr 360px;
  }
}

.details-gallery {
  position: relative;
  background: #0F172A;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}

.gallery-main-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  cursor: pointer;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.8);
  overflow-x: auto;
}

.gallery-thumb {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.gallery-thumb.active, .gallery-thumb:hover {
  opacity: 1;
  outline: 2px solid #FBBF24;
}

.details-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

@media (min-width: 640px) {
  .specs-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.spec-box {
  background: var(--bg-app);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spec-box-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.spec-box-value {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main);
}

.features-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: var(--space-md);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.925rem;
  font-weight: 500;
}

.feature-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

/* Seller / Sticky Action Sidebar */
.seller-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.seller-profile-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-light);
}

.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--primary-subtle);
}

.mobile-sticky-actions {
  position: fixed;
  bottom: var(--bottom-nav-height);
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border-light);
  padding: 10px var(--space-md);
  display: flex;
  gap: 10px;
  z-index: var(--z-sticky);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 1024px) {
  .mobile-sticky-actions {
    display: none;
  }
}

/* ==========================================
   POST PROPERTY MULTI-STEP WIZARD
   ========================================== */
.wizard-container {
  max-width: 760px;
  margin: var(--space-xl) auto;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-light);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
}

.wizard-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  position: relative;
}

.wizard-progress-line {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border-light);
  z-index: 1;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width var(--transition-normal);
}

.wizard-step-node {
  position: relative;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.wizard-step-node.active {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.wizard-step-node.completed {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary);
}

/* Image Upload Previews Grid */
.upload-previews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: var(--space-md);
}

@media (min-width: 640px) {
  .upload-previews-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.preview-thumb-box {
  position: relative;
  padding-top: 75%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.preview-thumb-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* ==========================================
   CHAT & MESSAGING VIEW
   ========================================== */
.chat-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  height: 75vh;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-top: var(--space-lg);
}

@media (min-width: 768px) {
  .chat-layout {
    grid-template-columns: 320px 1fr;
  }
}

.chat-conv-list {
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.conv-item {
  padding: 14px var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.conv-item:hover, .conv-item.active {
  background: var(--primary-subtle);
}

.conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.chat-main-thread {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-app);
}

.chat-thread-header {
  padding: 12px var(--space-md);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-messages-area {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.925rem;
  line-height: 1.4;
  position: relative;
}

.message-bubble.incoming {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  border-bottom-left-radius: 4px;
}

.message-bubble.outgoing {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-time {
  font-size: 0.7rem;
  margin-top: 4px;
  opacity: 0.75;
  text-align: right;
}

.chat-input-bar {
  padding: 12px var(--space-md);
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ==========================================
   BUYER CHECKLIST & LEGAL ASSISTANCE
   ========================================== */
.checklist-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
}

.checklist-card.checked {
  background: #F0FDF4;
  border-color: #86EFAC;
}

.checklist-header-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.checklist-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-light);
  cursor: pointer;
  margin-top: 2px;
  accent-color: var(--primary);
}
