/* Property details page — layout uses global sidebar from style.css */

body.property-details-page {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================
   MAIN CONTENT
   ========================== */

/* Top Row - Desktop Layout */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 40px;
}

/* Image Box */
.image-box {
  flex: 1.5;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow: hidden;
  position: relative;
  min-width: 0; /* Important for flexbox shrinking */
}

.gallery-wrapper {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.scrollable-gallery {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 10px;
  height: 100%;
  padding: 10px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollable-gallery::-webkit-scrollbar {
  display: none;
}

.scrollable-gallery img {
  flex: 0 0 auto;
  width: 280px;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 56px;
}

.image-lightbox[hidden] {
  display: none !important;
}

.image-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #e2e8f0;
  font-size: 0.9rem;
  margin: 0;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  font-size: 18px;
  padding: 10px 12px;
  cursor: pointer;
  z-index: 5;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-btn:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
}

#scroll-left {
  left: 15px;
}

#scroll-right {
  right: 15px;
}

/* Details Box */
.details-box {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 300px;
}

.price-section h2 {
  font-size: 2em;
  color: #27ae60;
  margin: 0 0 5px 0;
}

.price-section p {
  color: #555;
  margin-bottom: 15px;
}

.status-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.status-badge {
  background: #e9ecef;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.9em;
  text-align: center;
}

.status-badge.available {
  background: #d4edda;
  color: #155724;
}

.contact-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-btn {
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.call-btn, .whatsapp-btn { display: none; }

.mynest-contact-btn {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  font-weight: 600;
  font-size: 1.05em;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
  width: 100%;
}

.mynest-contact-btn:hover {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

/* ===== CONTACT MODAL ===== */
.contact-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.contact-modal {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

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

.contact-modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #94a3b8;
  transition: color 0.2s;
  line-height: 1;
}

.contact-modal-close:hover {
  color: #1e293b;
}

.contact-modal-title {
  font-size: 1.5em;
  color: #1e293b;
  margin: 0 0 6px;
  font-weight: 700;
}

.contact-modal-subtitle {
  color: #64748b;
  font-size: 0.9em;
  margin: 0 0 24px;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-method-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.contact-method-btn:hover {
  border-color: #4f46e5;
  background: #f8f7ff;
  transform: translateX(4px);
}

.contact-method-btn.selected {
  border-color: #4f46e5;
  background: linear-gradient(135deg, #f0efff, #e8e7ff);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.method-icon {
  font-size: 1.8em;
  flex-shrink: 0;
}

.method-info {
  display: flex;
  flex-direction: column;
}

.method-name {
  font-weight: 600;
  font-size: 1em;
  color: #1e293b;
}

.method-desc {
  font-size: 0.82em;
  color: #64748b;
  margin-top: 2px;
}

.whatsapp-method:hover, .whatsapp-method.selected {
  border-color: #25d366;
  background: #f0fdf4;
}

.callback-method:hover, .callback-method.selected {
  border-color: #f59e0b;
  background: #fffbeb;
}

.inapp-method:hover, .inapp-method.selected {
  border-color: #3b82f6;
  background: #eff6ff;
}

.contact-message-section {
  margin-top: 20px;
  animation: modalSlideIn 0.2s ease;
}

.contact-message-section textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.95em;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}

.contact-message-section textarea:focus {
  outline: none;
  border-color: #4f46e5;
}

.contact-submit-btn {
  margin-top: 12px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-submit-btn:hover {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
}

.contact-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.contact-status {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  font-size: 0.95em;
  text-align: center;
  font-weight: 500;
  animation: modalSlideIn 0.2s ease;
}

.contact-status.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.contact-status.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ===== PROPERTY INFO SECTION (below gallery) ===== */
.pg-details-box {
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.pg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pg-header h1 {
  font-size: 1.75rem;
  margin: 0;
  color: #1e293b;
  line-height: 1.3;
  flex: 1;
  min-width: 200px;
}

.verified-badge {
  background: #d4edda;
  color: #155724;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.verified-badge.hidden {
  display: none;
}

.location-info {
  margin-bottom: 24px;
}

.property-extra-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.property-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
  font-size: 0.82rem;
  font-weight: 500;
}

.location-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #475569;
}

.location-item p {
  margin: 0;
  line-height: 1.5;
}

.description-section,
.amenities-section {
  margin-top: 28px;
}

.description-section h3,
.amenities-section h3 {
  font-size: 1.15rem;
  color: #1e293b;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eaf1ff;
}

.description-section p {
  color: #475569;
  line-height: 1.65;
  margin: 0;
}

.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.amenity-badge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  color: #334155;
}

.amenities-empty {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
  grid-column: 1 / -1;
}

.gallery-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  color: #64748b;
  font-size: 0.95rem;
  background: #f1f5f9;
  border-radius: 8px;
}

.room-configs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.room-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.room-card h4 {
  margin: 0 0 12px;
  font-size: 1rem;
  color: #1e293b;
}

.room-info-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid #e2e8f0;
}

.room-info-item:last-of-type {
  border-bottom: none;
}

.room-info-label {
  color: #64748b;
}

.room-price {
  margin-top: 12px;
  font-weight: 700;
  color: #27ae60;
  font-size: 1.1rem;
}

.page-error {
  padding: 2rem;
  text-align: center;
  color: #475569;
  background: #fff;
  border-radius: 8px;
  margin: 1rem 0;
}

.page-error a {
  color: var(--brand-teal, #4a89a4);
}

.homestay-section-title {
  color: var(--brand-text, #2c3e50);
  margin-bottom: 20px;
  font-size: 1.5em;
  border-bottom: 2px solid var(--brand-border, #eaf1ff);
  padding-bottom: 10px;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large Tablets */
@media (max-width: 1024px) {
  .top-row {
    gap: 30px;
  }
  
  .gallery-wrapper {
    height: 350px;
  }
  
  .scrollable-gallery img {
    width: 250px;
  }
  
  .main {
    padding: 25px 30px;
  }
}

/* Tablets and Small Laptops */
@media (max-width: 900px) {
  .top-row {
    flex-direction: column;
    gap: 25px;
  }
  
  .image-box, .details-box {
    width: 100%;
  }
  
  .gallery-wrapper {
    height: 350px;
  }
}

/* Tablets */
@media (max-width: 768px) {
  body.property-details-page .main {
    padding-top: 72px !important;
  }

  .gallery-wrapper {
    height: 300px;
  }
  
  .scrollable-gallery img {
    width: 220px;
  }
  
  .pg-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .verified-badge {
    align-self: flex-start;
  }
  
  .details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .contact-modal {
    padding: 24px;
    margin: 10px;
  }
}

/* Mobile Phones */
@media (max-width: 480px) {
  .main {
    padding: 15px;
  }
  
  .gallery-wrapper {
    height: 250px;
  }
  
  .scrollable-gallery img {
    width: 200px;
  }
  
  .scroll-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
    padding: 8px;
  }
  
  .details-box,
  .pg-details-box {
    padding: 20px;
  }
  
  .price-section h2 {
    font-size: 1.6em;
  }
  
  .pg-header h1 {
    font-size: 1.4em;
  }
  
  .details-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .amenities-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-btn {
    padding: 10px;
    font-size: 0.9em;
  }

  .contact-modal {
    padding: 20px;
    border-radius: 16px;
  }

  .contact-modal-title {
    font-size: 1.25em;
  }

  .contact-method-btn {
    padding: 14px 16px;
  }
}

/* Small Mobile Phones */
@media (max-width: 360px) {
  .gallery-wrapper {
    height: 200px;
  }
  
  .scrollable-gallery img {
    width: 180px;
  }
  
  .details-grid {
    grid-template-columns: 1fr;
  }
  
  .details-box,
  .pg-details-box {
    padding: 15px;
  }
  
  .detail-item {
    padding: 12px 8px;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  .scroll-btn {
    background: rgba(255,255,255,0.95);
    border: 1px solid #ddd;
  }
  
  .detail-item:hover,
  .amenity-badge:hover {
    transform: none;
  }
}