/* ==========================================================================
   Fresh Makelaars – Theme 2 – Tab: Overview
   ========================================================================== */

#fresh-makelaars .fm2-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--fm2-text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--fm2-blue-light);
}

#fresh-makelaars .fm2-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

#fresh-makelaars .fm2-overview-grid--split {
  grid-template-columns: 2fr 1fr;
}

/* Facts list */
#fresh-makelaars .fm2-facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

#fresh-makelaars .fm2-facts-list-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--fm2-border);
  font-size: 14px;
  gap: 12px;
}

#fresh-makelaars .fm2-facts-list-row:last-child { border-bottom: none; }

#fresh-makelaars .fm2-facts-list-label {
  color: var(--fm2-text-muted);
  flex-shrink: 0;
  font-weight: 500;
}

#fresh-makelaars .fm2-facts-list-value {
  font-weight: 600;
  color: var(--fm2-text);
  text-align: right;
}

#fresh-makelaars .fm2-facts-list-value--price {
  color: var(--fm2-blue);
  font-size: 16px;
}

#fresh-makelaars .fm2-link-btn {
  background: none;
  border: none;
  color: var(--fm2-blue);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0 0;
  display: inline-block;
  text-decoration: none;
}

#fresh-makelaars .fm2-link-btn:hover,
#fresh-makelaars .fm2-link-btn:focus {
  background-color: transparent;
  text-decoration: underline;
  color: var(--fm2-blue);
}

/* Description */
#fresh-makelaars .fm2-overview-description-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fm2-text);
}

/* ── Map ──────────────────────────────────────────────────── */
#fresh-makelaars .fm2-overview-map {
  margin-bottom: 36px;
}

#fresh-makelaars .fm2-map-wrapper {
  position: relative;
  border-radius: var(--fm2-radius);
  overflow: hidden;
}

#fresh-makelaars .fm2-map-poi-list {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

#fresh-makelaars .fm2-map-poi {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--poi-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

#fresh-makelaars .fm2-map-poi:hover {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

#fresh-makelaars .fm2-map-poi.is-active {
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--poi-color), 0 6px 16px rgba(0, 0, 0, 0.25);
}

#fresh-makelaars .fm2-map-poi svg {
  pointer-events: none;
  display: block;
}

#fresh-makelaars .fm2-map-poi-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

#fresh-makelaars .fm2-map-poi-label::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.75);
}

#fresh-makelaars .fm2-map-poi:hover .fm2-map-poi-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#fresh-makelaars .fm2-map-poi-trigger {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  cursor: pointer;
}

/* POI info window. The markup is injected by single-house.js into Google's
   InfoWindow, so it is not scoped to a theme wrapper — theme 1 styles the same
   classes in css/single-house.css, which theme 2 never loads. Without a width
   cap the popup is sized by the photo, and getURI() asks for one up to 800px
   wide, which is where the oversized bubble came from. */
#fresh-makelaars .map-places-popup {
  max-width: 300px;
  /* The photo is the first child and Google's InfoWindow leaves no room above it,
     so the image sat flush against the top edge of the bubble. */
  padding-top: 12px;
}

#fresh-makelaars .map-places-popup .map-places-popup-image {
  width: 100%;
  /* Google sets an inline max-width on images inside the InfoWindow. */
  max-width: 100% !important;
  max-height: 160px;
  object-fit: cover;
  border-radius: var(--fm2-radius, 8px);
  display: block;
}

#fresh-makelaars .map-places-popup-content {
  padding-top: 8px;
}

#fresh-makelaars .map-places-popup-title {
  margin: 0;
  font-size: 16px;
}

#fresh-makelaars .map-places-popup-rating,
#fresh-makelaars .map-places-popup-address {
  margin: 4px 0 0;
  font-size: 13px;
}

#fresh-makelaars .map-places-popup-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

#fresh-makelaars .map-places-popup-actions .map-places-popup-link {
  font-size: 13px;
  text-decoration: underline;
}

/* Google's own close button sits over the content at this size. */
#fresh-makelaars .fm2-map-wrapper .gm-style-iw-chr {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 1;
}

/* Sits over the photo, so it needs its own ground to stay legible on a dark
   image. Rounded because a white square over a rounded photo reads as a glitch. */
#fresh-makelaars .fm2-map-wrapper .gm-style-iw-chr button {
  background-color: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ── Media row ────────────────────────────────────────────── */
#fresh-makelaars .fm2-overview-media-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 36px;
}

#fresh-makelaars .fm2-overview-media-thumb {
  display: block;
  border-radius: var(--fm2-radius);
  overflow: hidden;
}

#fresh-makelaars .fm2-overview-media-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

#fresh-makelaars .fm2-overview-media-thumb:hover img { transform: scale(1.03); }

/* ── Images grid (media tab) ──────────────────────────────── */
#fresh-makelaars .fm2-media .images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

#fresh-makelaars .fm2-media .images img {
  display: block;
  width: 100%;
  height: 200px;
  border-radius: 16px;
  object-fit: cover;
}

@media (max-width: 768px) {
  #fresh-makelaars .fm2-overview-grid,
  #fresh-makelaars .fm2-overview-grid--split { grid-template-columns: 1fr; }

  #fresh-makelaars .fm2-media .images {
    grid-template-columns: 1fr;
  }
}

/* Four across is too tight for a tablet; halve it before dropping to one. */
@media (min-width: 769px) and (max-width: 1024px) {
  #fresh-makelaars .fm2-media .images {
    grid-template-columns: repeat(2, 1fr);
  }
}
