/* ==========================================================================
   Shared Rentistan property detail gallery + info-panel styles.
   Used by: property-detail.html, listings.html (quick-view modal),
   property-manager.html (owner's read-only view). One definition so the
   "same view" stays visually identical everywhere it appears instead of
   drifting across three hand-maintained copies.
   Brand tokens are redeclared here (not relying on a page's own :root)
   so this file works standalone regardless of which page includes it.
   ========================================================================== */

.pg-gallery {
  --pg-navy: #0F2F5A;
  --pg-blue: #1A4B8C;
  --pg-blue-light: #2A6CC4;
  --pg-gold: #F59E0B;
  --pg-sky: #EFF4FB;
  --pg-gray-200: #E0EAF4;
  --pg-gray-400: #6B8FBD;
  --pg-radius: 14px;
  position: relative;
}

.pg-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 460px;
  border-radius: var(--pg-radius);
  overflow: hidden;
  background: #0b1f38;
  isolation: isolate;
}
@media (max-width: 640px) {
  .pg-main { aspect-ratio: 4 / 3; max-height: 340px; border-radius: 10px; }
}

/* Blurred, scaled copy of the same photo fills the frame edge-to-edge so
   non-matching aspect ratios never show bare letterbox bars; the crisp
   foreground image sits on top with object-fit:contain so nothing is ever
   cropped or stretched. */
.pg-main-backdrop {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: blur(24px) brightness(0.55) saturate(1.1);
  transform: scale(1.15);
  z-index: 0;
}
.pg-main-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.18s ease;
  cursor: zoom-in;
}
.pg-main-img.pg-fading { opacity: 0; }

.pg-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; color: white;
  background: linear-gradient(135deg, var(--pg-navy), var(--pg-blue));
}

.pg-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(15,47,90,0.55); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; z-index: 2;
  transition: background 0.2s, transform 0.2s;
  backdrop-filter: blur(2px);
}
.pg-nav:hover { background: rgba(15,47,90,0.85); transform: translateY(-50%) scale(1.06); }
.pg-prev { left: 14px; }
.pg-next { right: 14px; }

.pg-counter {
  position: absolute; bottom: 12px; right: 14px; z-index: 2;
  background: rgba(15,47,90,0.6); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 11px; border-radius: 20px; letter-spacing: 0.2px;
}
.pg-expand {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 34px; height: 34px; border-radius: 8px; border: none;
  background: rgba(15,47,90,0.55); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  transition: background 0.2s;
}
.pg-expand:hover { background: rgba(15,47,90,0.85); }

.pg-featured-badge {
  position: absolute; top: 12px; left: 14px; z-index: 2;
  background: var(--pg-gold); color: var(--pg-navy);
  font-size: 11px; font-weight: 700; padding: 5px 12px; border-radius: 20px;
  display: flex; align-items: center; gap: 5px; letter-spacing: 0.2px;
}

.pg-thumbs {
  display: flex; gap: 7px; margin-top: 10px; overflow-x: auto;
  scroll-behavior: smooth; padding-bottom: 4px;
}
.pg-thumbs::-webkit-scrollbar { height: 5px; }
.pg-thumbs::-webkit-scrollbar-thumb { background: var(--pg-gray-200); border-radius: 3px; }
.pg-thumb {
  width: 68px; height: 52px; object-fit: cover; border-radius: 7px;
  cursor: pointer; opacity: 0.62; transition: opacity 0.2s, border-color 0.2s;
  border: 2px solid transparent; flex-shrink: 0;
}
.pg-thumb:hover { opacity: 0.9; }
.pg-thumb.active { opacity: 1; border-color: var(--pg-gold); }

/* ===== Lightbox ===== */
.pg-lightbox {
  display: none; position: fixed; inset: 0; z-index: 5000;
  background: rgba(5,14,28,0.96);
  align-items: center; justify-content: center; flex-direction: column;
}
.pg-lightbox.open { display: flex; animation: pgFadeIn 0.15s ease; }
@keyframes pgFadeIn { from { opacity: 0; } to { opacity: 1; } }
.pg-lightbox img {
  max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 6px;
  transition: opacity 0.15s ease;
}
.pg-lightbox img.pg-fading { opacity: 0; }
.pg-lb-close {
  position: absolute; top: 18px; right: 22px; width: 40px; height: 40px;
  border-radius: 50%; border: none; background: rgba(255,255,255,0.12);
  color: #fff; font-size: 22px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: background 0.2s;
}
.pg-lb-close:hover { background: rgba(255,255,255,0.25); }
.pg-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); color: #fff; font-size: 26px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.pg-lb-nav:hover { background: rgba(255,255,255,0.25); }
.pg-lb-prev { left: 22px; }
.pg-lb-next { right: 22px; }
.pg-lb-counter {
  margin-top: 14px; color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ===== Info panel (shared typography/spacing for the content below the gallery) ===== */
.pg-info { font-family: 'Plus Jakarta Sans', sans-serif; }
.pg-price-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 18px 0 6px; flex-wrap: wrap; }
.pg-price { font-size: 26px; font-weight: 700; color: var(--pg-navy); }
.pg-price span { font-size: 14px; color: var(--pg-gray-400); font-weight: 500; }
.pg-deposit-line { font-size: 13px; color: #555E7A; margin-top: 3px; }
.pg-status-pill { padding: 5px 13px; border-radius: 20px; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pg-status-available { background: rgba(29,158,117,0.1); color: #1D9E75; }
.pg-status-unavailable { background: rgba(239,68,68,0.1); color: #ef4444; }

.pg-title { font-size: 22px; font-weight: 700; color: #1A1A2E; margin-bottom: 6px; line-height: 1.3; }
.pg-location { font-size: 14px; color: #555E7A; display: flex; align-items: center; gap: 5px; margin-bottom: 20px; }

.pg-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 22px; }
.pg-stat { background: var(--pg-sky); border-radius: 10px; padding: 14px; text-align: center; }
.pg-stat-icon { font-size: 20px; color: var(--pg-blue); margin-bottom: 5px; }
.pg-stat-value { font-size: 15px; font-weight: 700; color: #1A1A2E; }
.pg-stat-label { font-size: 10.5px; color: var(--pg-gray-400); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }

.pg-section { margin-bottom: 22px; }
.pg-section h4 { font-size: 14.5px; font-weight: 700; color: #1A1A2E; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--pg-gray-200); }
.pg-section p { font-size: 14px; color: #555E7A; line-height: 1.75; white-space: pre-wrap; }

.pg-amenities { display: flex; flex-wrap: wrap; gap: 8px; }
.pg-amenity-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(26,75,140,0.07); color: var(--pg-blue); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 20px; border: 1px solid rgba(26,75,140,0.15); }

.pg-unavailable-banner {
  background: rgba(239,68,68,0.07); border: 1px solid rgba(239,68,68,0.2);
  color: #b91c1c; border-radius: 10px; padding: 12px 16px; font-size: 13.5px;
  font-weight: 600; margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
