/**
 * Property Detail Page Styles
 * Brand: deep teal #0d4a4a, coral #e07a5f, warm white #f7f5f2
 */

/* ============ LOADING / ERROR STATES ============ */
.pd-loading,
.pd-error {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-family: 'Lato', sans-serif;
}

.pd-error h2 {
  font-family: 'Playfair Display', serif;
  color: #0d4a4a;
  margin-bottom: 12px;
}

.pd-error a {
  color: #e07a5f;
  font-weight: 700;
}

/* ============ PHOTO GALLERY ============ */
.pd-gallery {
  margin-bottom: 24px;
}

.pd-gallery-empty {
  background: #f7f5f2;
  padding: 80px 20px;
  text-align: center;
  border-radius: 8px;
}

.pd-no-photo {
  font-size: 18px;
  color: #999;
}

.pd-main-photo {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background: #e8e8e8;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}

.pd-main-photo:hover {
  opacity: 0.95;
}

.pd-main-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-photo-count-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 6px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
}

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}

.pd-thumb {
  aspect-ratio: 1/1;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #e8e8e8;
  transition: opacity 0.2s, transform 0.1s;
}

.pd-thumb:hover {
  opacity: 0.85;
  transform: scale(0.98);
}

.pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-thumb-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d4a4a;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
}

/* ============ HERO SECTION ============ */
.pd-hero {
  padding: 24px 0;
  border-bottom: 1px solid #ede8e0;
  margin-bottom: 24px;
}

.pd-price {
  font-family: 'Playfair Display', serif;
  font-size: 40px;
  font-weight: 900;
  color: #0d4a4a;
  line-height: 1.1;
  margin-bottom: 12px;
}

.pd-specs {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 18px;
  color: #1a2e2e;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.pd-specs strong {
  color: #0d4a4a;
  font-weight: 700;
}

.pd-divider {
  color: #999;
}

.pd-address {
  font-size: 16px;
  color: #1a2e2e;
  margin-bottom: 8px;
  font-weight: 500;
}

.pd-meta {
  font-size: 14px;
  color: #4a5a5a;
  margin-bottom: 20px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pd-meta a {
  color: #0d4a4a;
  font-weight: 700;
  text-decoration: none;
}

.pd-meta a:hover {
  color: #e07a5f;
}

.pd-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.pd-btn {
  display: block;
  text-align: center;
  padding: 14px 20px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  transition: opacity 0.2s, transform 0.1s;
}

.pd-btn:hover {
  opacity: 0.9;
}

.pd-btn:active {
  transform: scale(0.98);
}

.pd-btn-primary {
  background: #0d4a4a;
  color: white;
}

.pd-btn-secondary {
  background: #e07a5f;
  color: white;
}

/* ============ SECTIONS ============ */
.pd-section {
  padding: 24px 0;
  border-bottom: 1px solid #ede8e0;
}

.pd-section:last-child {
  border-bottom: none;
}

.pd-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: #0d4a4a;
  margin-bottom: 16px;
  font-weight: 700;
}

.pd-description {
  font-size: 15px;
  line-height: 1.7;
  color: #1a2e2e;
  white-space: pre-wrap;
}

/* ============ FEATURES GRID ============ */
.pd-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.pd-feature {
  background: #f7f5f2;
  padding: 12px 16px;
  border-radius: 4px;
  border-left: 3px solid #0d4a4a;
}

.pd-feature-label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-weight: 600;
}

.pd-feature-value {
  font-size: 14px;
  color: #1a2e2e;
  font-weight: 600;
}

/* ============ MAP ============ */
.pd-map {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ede8e0;
}

.pd-map iframe {
  width: 100%;
  height: 360px;
  border: 0;
  display: block;
}

/* ============ DISCLAIMER ============ */
.pd-disclaimer p {
  font-size: 13px;
  color: #4a5a5a;
  line-height: 1.6;
  margin-bottom: 8px;
}

.pd-mls-text {
  font-size: 11px !important;
  color: #888 !important;
  line-height: 1.5;
  font-style: italic;
}

/* ============ LIGHTBOX ============ */
.pd-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.pd-lightbox.active {
  display: block;
}

.pd-lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}

.pd-lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90vw;
  max-height: 90vh;
}

.pd-lightbox-content img {
  max-width: 100%;
  max-height: 90vh;
  display: block;
  border-radius: 4px;
}

.pd-lightbox-close,
.pd-lightbox-prev,
.pd-lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  color: white;
  font-size: 32px;
  cursor: pointer;
  z-index: 10000;
  transition: background 0.2s;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-lightbox-close {
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
}

.pd-lightbox-prev,
.pd-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.pd-lightbox-prev {
  left: 20px;
}

.pd-lightbox-next {
  right: 20px;
}

.pd-lightbox-close:hover,
.pd-lightbox-prev:hover,
.pd-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}

.pd-lightbox-counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 14px;
  font-weight: 600;
}

/* ============ MOBILE ============ */
@media (max-width: 768px) {
  .pd-price {
    font-size: 30px;
  }
  
  .pd-specs {
    font-size: 15px;
  }
  
  .pd-cta-row {
    grid-template-columns: 1fr;
  }
  
  .pd-section h2 {
    font-size: 20px;
  }
  
  .pd-features-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .pd-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .pd-map iframe {
    height: 280px;
  }
  
  .pd-lightbox-prev,
  .pd-lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 24px;
  }
}

/* ============ BUTTON FIXES ============ */
.pd-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: normal;
  line-height: 1.3;
}

.pd-btn-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.pd-btn-text {
  flex: 1;
  text-align: center;
}

@media (max-width: 600px) {
  .pd-cta-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .pd-btn {
    font-size: 13px;
    padding: 14px 12px;
  }
}
span.pd-btn-text {
    color: #fff;
}