/* Desktop Gallery Styles */
.gallery-container {
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
}
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}
.gallery-image {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
  transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}
.no-images {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50vh;
  text-align: center;
  color: #6c757d;
  font-size: 18px;
}
/* Mobile Gallery Styles - Vertical Scrolling */
.mobile-gallery-container {
  /* Hide scrollbar for Chrome, Safari and Opera */
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* Internet Explorer 10+ */
}
.mobile-gallery-container::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari and Opera */
}
.mobile-gallery-container::-webkit-scrollbar-track {
  display: none !important;
}
.mobile-gallery-container::-webkit-scrollbar-thumb {
  display: none !important;
}
.mobile-image-container {
  min-height: 16rem; /* 384px - ensures consistent height for all images */
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.mobile-image-container.loaded {
  opacity: 1;
  transform: translateY(0);
}
.mobile-image-container.loading {
  opacity: 0;
  transform: translateY(20px);
}
.mobile-image {
  width: 100%;
  height: 100%;
  -o-object-fit: contain;
     object-fit: contain;
}
.mobile-spacer {
  height: 14rem;
}
/* Gallery Property Footer */
.gallery-property-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: white;
  z-index: 1000;
  border-top: 1px solid #e9ecef;
  min-height: 12rem;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  border: none;
  /* padding: 0rem 1rem 3rem 1rem; */
  text-align: left;
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.gallery-property-footer:hover {
  background-color: #f5f5f5;
}
.gallery-property-footer:disabled {
  cursor: default;
  opacity: 0.6;
}
.gallery-property-footer:disabled:hover {
  background-color: white;
}
/* Overlay Styles */
.property-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}
.overlay-content {
  background: white;
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  overflow: hidden;
}
.overlay-header {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1rem 0.5rem 0 1.5rem;
  border-bottom: 1px solid #e9ecef;
  position: relative;
}
.close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #6c757d;
  padding: 0.5rem;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.close-button:hover {
  background-color: #f5f5f5;
  color: #495057;
}
.overlay-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 1.5rem;
  box-sizing: border-box;
  width: 100%;
}
.overlay-section {
  margin-bottom: 2rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}
.overlay-section:last-child {
  margin-bottom: 0;
}
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #212529;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.5rem;
}
/* Mobile overlay styles (for screens < 1200px) */
@media (max-width: 1199px) {
  .property-overlay {
    padding: 0;
    align-items: stretch;
  }

  .overlay-content {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
    width: 100%;
    max-width: 100%;
  }

  .overlay-header {
    padding: 1rem;
    box-sizing: border-box;
  }

  .overlay-body {
    padding: 1rem;
    box-sizing: border-box;
  }

  .section-title {
    font-size: 1.125rem;
  }
  
  /* Override property-section width in overlay */
  .overlay-body .property-section {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 0;
    box-sizing: border-box;
  }
  
  /* Ensure price section doesn't overflow */
  .overlay-body .price-section {
    width: 100% !important;
    box-sizing: border-box;
    flex-wrap: wrap;
  }
  
  /* Ensure property stats don't overflow */
  .overlay-body .property-stats {
    width: 100% !important;
    box-sizing: border-box;
    flex-wrap: wrap;
    overflow-x: hidden;
  }
  
  /* Allow property title to wrap in overlay */
  .overlay-body .property-title {
    white-space: normal !important;
    overflow: visible !important;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Ensure feature grid doesn't overflow */
  .overlay-body .property-feature-grid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Ensure remarks don't overflow */
  .overlay-body .remarks {
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}
/* Gallery specific styles for larger screens */
@media (min-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
  }
  
  /* Desktop overlay styles - ensure content doesn't overflow */
  .overlay-body .property-section {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 0;
    box-sizing: border-box;
  }
  
  /* Ensure price section doesn't overflow */
  .overlay-body .price-section {
    width: 100% !important;
    box-sizing: border-box;
    flex-wrap: wrap;
  }
  
  /* Ensure property stats don't overflow */
  .overlay-body .property-stats {
    width: 100% !important;
    box-sizing: border-box;
    flex-wrap: wrap;
    overflow-x: hidden;
  }
  
  /* Allow property title to wrap in overlay */
  .overlay-body .property-title {
    white-space: normal !important;
    overflow: visible !important;
    word-wrap: break-word;
    width: 100%;
    box-sizing: border-box;
  }
  
  .overlay-body .property-feature-grid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* Ensure remarks don't overflow */
  .overlay-body .remarks {
    width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}
/* Loading state */
.gallery-item.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/* Error state */
.gallery-item.error {
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}
.gallery-item.error::after {
  content: "Image unavailable";
  font-size: 14px;
} 
