/* Page-specific styles for property detail */
/* Non-critical styles - can be deferred */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 8px; }

p.text_before_rate {
    background: #cddc39a3;
    padding: 10px;
    text-align: center;
    border-radius: 7px;
    font-size: 1.4rem;
    font-weight: 600;
    font-family: 'Source Serif 4';
}
p.text_before_rate.rented {
    background-color: #ff000094;
    color: #fff;
}
.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease;
  /* background: #f0f0f0; */
}

.property-section-title {
    font-size: 2.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #222;
}

.gallery-item img,
.gallery-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item:hover img,
.gallery-item:hover .gallery-thumb {
  transform: scale(1.05);
}

/* Make first image (hero) span 2x2 grid area */
.gallery-item:nth-child(1){
  grid-column: 1 / span 2;
  grid-row: 1 / span 2;
}
/* Remaining 4 images on the right in 2x2 */
.gallery-item:nth-child(2),
.gallery-item:nth-child(3),
.gallery-item:nth-child(4),
.gallery-item:nth-child(5) {
  grid-column: auto;
  grid-row: auto;
}

@media (max-width: 991.98px){
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .gallery-item:nth-child(1){ grid-column: 1 / span 2; grid-row: 1 / span 1; }
  .gallery-item:nth-child(n+2){ grid-column: auto; }
}

.property-stats div{ background:#f7f7f7; padding:8px 12px; border-radius:6px; }

/* Property Amenities List */
.property-amenities-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f6f9f3;
  border-radius: 6px;
  font-size: 0.95rem;
  color: #555;
  transition: background 0.2s ease;
}

.amenity-item:hover {
  background: #f0f0f0;
}

.amenity-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.amenity-icon-fallback {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #096153;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.amenities-list{ columns:2; list-style: none; padding-left:0; }

/* Inquiry card specific styles (desktop) */
.inquiry-card{ box-shadow: 0 6px 20px rgba(0,0,0,0.06); border-radius:10px; 
    position: sticky;
    top: 100px;
    z-index: 2; }

/* Mobile fixed inquiry button */
.mobile-inquiry-btn{
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  background: #096153;
  color:#fff;
  border:none;
  padding: 12px 20px;
  border-radius: 30px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* ============================================
   CUSTOM LIGHTBOX STYLES (NO GLIGHTBOX)
   ============================================ */

.custom-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Counter */
.lightbox-counter {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 10001;
  padding: 12px 20px;
  background: transparent;
  color: white;
  font-size: 18px;
  font-weight: bold;
  border: 3px solid #ff4444;
  border-radius: 6px;
  min-width: 100px;
  text-align: center;
  font-family: Arial, sans-serif;
}

/* Main Image Container */
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  touch-action: none;
  pointer-events: auto;
}

/* Navigation Arrows */
.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, opacity 0.3s ease;
  z-index: 10000;
}

.lightbox-arrow:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.4);
}

.lightbox-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Close Button */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
  z-index: 10001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Thumbnail Strip */
.lightbox-thumbnails {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  gap: 10px;
  padding: 15px 20px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 8px;
  overflow-x: auto;
  max-width: 85vw;
  scroll-behavior: smooth;
}

/* Hide scrollbar for cleaner look but keep functionality */
.lightbox-thumbnails::-webkit-scrollbar {
  height: 4px;
}

.lightbox-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

.lightbox-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.3s ease, border-color 0.3s ease;
  flex-shrink: 0;
}

.lightbox-thumb:hover {
  opacity: 0.8;
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: #ff6b6b;
  box-shadow: 0 0 8px rgba(255, 107, 107, 0.5);
}

/* Overlay for "+N more" on last image */
.more-overlay{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  border-radius: 8px;
}
.more-overlay:hover{ background: rgba(0,0,0,0.55); text-decoration: none; color: #fff; }


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991.98px){
  .sticky-top { position: static !important; }

  .lightbox-arrow {
    width: 40px;
    height: 40px;
  }

  .lightbox-arrow svg {
    width: 24px;
    height: 24px;
  }

  .lightbox-close {
    width: 36px;
    height: 36px;
  }

  .lightbox-close svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-counter {
    top: 15px;
    left: 15px;
    padding: 8px 12px;
    font-size: 14px;
    min-width: 80px;
  }

  .lightbox-thumbnails {
    bottom: 15px;
    max-width: 90vw;
    padding: 10px 15px;
    gap: 8px;
  }

  .lightbox-thumb {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 575.98px) {
  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-arrow {
    width: 36px;
    height: 36px;
  }

  .lightbox-arrow svg {
    width: 20px;
    height: 20px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 70vh;
  }

  .lightbox-counter {
    top: 10px;
    left: 10px;
    right: auto;
    padding: 6px 10px;
    font-size: 12px;
    min-width: 70px;
    border: 2px solid #ff4444;
  }

  .lightbox-thumbnails {
    bottom: 10px;
    left: 10px;
    right: 10px;
    transform: none;
    max-width: none;
    padding: 8px 10px;
    gap: 6px;
  }

  .lightbox-thumb {
    width: 50px;
    height: 50px;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .lightbox-close svg {
    width: 18px;
    height: 18px;
  }
}
