/* =============================================================================
   Pods Property Map — style.css
   Split-panel layout: property list (left) + sticky Leaflet map (right)
   Luxury horizontal card style — image left, details right
   ============================================================================= */

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:wght@500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --ppm-accent:      #b8863f;   /* warm gold — matches "luxury coastal" branding */
  --ppm-accent-dark: #8f6529;
  --ppm-text:        #24272b;
  --ppm-muted:       #767c85;
  --ppm-border:      #e9e6df;
  --ppm-bg:          #ffffff;
  --ppm-white:       #ffffff;
  --ppm-card-bg:     #faf9f6;   /* subtle warm off-white behind each card */
  --ppm-hover-bg:    #f3efe6;
  --ppm-active-bg:   #efe6d3;
  --ppm-radius:      10px;
  --ppm-shadow:      0 1px 3px rgba(0,0,0,.06), 0 6px 16px rgba(0,0,0,.05);
  --ppm-list-width:  42%;
  --ppm-map-height:  calc(100vh - 100px);
  --ppm-thumb-size:  300px;     /* card image width */
}

/* ── Wrapper: side-by-side layout ─────────────────────────────────────────── */
.ppm-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--ppm-bg);
  border: 1px solid var(--ppm-border);
  border-radius: var(--ppm-radius);
  overflow: hidden;
  min-height: 600px;
}

/* ── Left: scrollable list ─────────────────────────────────────────────────── */
.ppm-list {
  width: var(--ppm-list-width);
  min-width: 460px;
  height: var(--ppm-map-height);
  overflow-y: auto;
  background: var(--ppm-white);
  border-right: 1px solid var(--ppm-border);
  scroll-behavior: smooth;
  padding: 16px;
  box-sizing: border-box;
}

/* Custom scrollbar */
.ppm-list::-webkit-scrollbar { width: 5px; }
.ppm-list::-webkit-scrollbar-track { background: transparent; }
.ppm-list::-webkit-scrollbar-thumb { background: var(--ppm-border); border-radius: 4px; }

/* ── Property card ─────────────────────────────────────────────────────────── */
.ppm-card {
  display: flex;
  align-items: stretch;
  gap: 20px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--ppm-card-bg);
  border: 1px solid var(--ppm-border);
  border-radius: var(--ppm-radius);
  text-decoration: none;
  color: inherit;
  transition: background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  cursor: pointer;
}

.ppm-card:last-child {
  margin-bottom: 0;
}

.ppm-card:hover {
  background: var(--ppm-hover-bg);
  box-shadow: var(--ppm-shadow);
}

.ppm-card.is-active {
  background: var(--ppm-active-bg);
  border-color: var(--ppm-accent);
}

.ppm-card.is-active .ppm-card__badge {
  background: var(--ppm-accent);
  color: #fff;
}

/* ── Thumbnail ─────────────────────────────────────────────────────────────── */
.ppm-card__thumb {
  position: relative;
  flex-shrink: 0;
  width: var(--ppm-thumb-size);
  height: 220px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ppm-border);
}

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

/* Number badge over thumbnail */
.ppm-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: var(--ppm-text);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
  transition: background 0.2s, color 0.2s;
}

/* ── Card body ─────────────────────────────────────────────────────────────── */
.ppm-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.ppm-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 21px;
  font-weight: 600;
  color: var(--ppm-text);
  margin: 0;
  line-height: 1.3;
  /* Truncate long titles at 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ppm-card__address {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--ppm-muted);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ppm-border);
}

.ppm-card__address svg {
  flex-shrink: 0;
  color: var(--ppm-accent);
}

/* ── Meta list (beds / baths / guests) ───────────────────────────────────── */
.ppm-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ppm-card__meta li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--ppm-muted);
  white-space: nowrap;
}

.ppm-card__meta svg {
  flex-shrink: 0;
  color: var(--ppm-accent);
}

.ppm-card__price {
  margin-left: auto;
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ppm-text) !important;
}

/* ── Right: sticky map panel ───────────────────────────────────────────────── */
.ppm-map-panel {
  flex: 1;
  position: sticky;
  top: 80px;            /* adjust to your header height */
  height: var(--ppm-map-height);
}

#ppm-map {
  width: 100%;
  height: 100%;
}

/* ── Custom Leaflet marker numbers ────────────────────────────────────────── */
.ppm-marker {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50%;
  background: var(--ppm-text);
  color: #fff;
  border: 2px solid #fff;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.ppm-marker.is-active {
  background: var(--ppm-accent) !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: 0 3px 10px rgba(184,134,63,.6);
  z-index: 1000 !important;
}

/* ── Leaflet popup override ───────────────────────────────────────────────── */
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
  padding: 0 !important;
  overflow: hidden;
}

.leaflet-popup-content {
  margin: 0 !important;
  width: 240px !important;
}

.ppm-popup {
  font-family: 'DM Sans', sans-serif;
}

.ppm-popup img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.ppm-popup__body {
  padding: 12px 14px;
}

.ppm-popup__title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ppm-text);
  margin: 0 0 4px;
  line-height: 1.3;
}

.ppm-popup__address {
  font-size: 11.5px;
  color: var(--ppm-muted);
  margin: 0 0 8px;
}

.ppm-popup__meta {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--ppm-muted);
  margin: 0 0 10px;
}

.ppm-popup__link {
  display: block;
  text-align: center;
  background: var(--ppm-accent);
  color: #fff !important;
  text-decoration: none;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.ppm-popup__link:hover {
  background: var(--ppm-accent-dark);
}

/* ── Empty state ─────────────────────────────────────────────────────────── */
.ppm-empty {
  padding: 2rem;
  color: var(--ppm-muted);
  font-style: italic;
}

/* ── Responsive: stack on mobile / narrower columns ──────────────────────── */
@media (max-width: 900px) {
  .ppm-card {
    flex-direction: column;
  }
  .ppm-card__thumb {
    width: 100%;
    height: 220px;
  }
}

@media (max-width: 768px) {
  .ppm-wrapper {
    flex-direction: column;
  }

  .ppm-list {
    width: 100%;
    min-width: unset;
    height: 50vh;
    border-right: none;
    border-bottom: 1px solid var(--ppm-border);
  }

  .ppm-map-panel {
    position: relative;
    top: 0;
    width: 100%;
    height: 50vh;
  }
}
