/* ============================================================
   FLATMATES-STYLE PROPERTY PAGE — FIXED
   ============================================================ */

/* ── Base reset for this component ─────────────────────── */
.shm-fm-wrap *,
.shm-fm-wrap *::before,
.shm-fm-wrap *::after {
  box-sizing: border-box;
}

.shm-fm-wrap {
  background: #f4f4f4;
  padding: 60px 0px 60px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.shm-fm-shell {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* ── Photo Grid ─────────────────────────────────── */
.shm-photo-grid-wrap {
  position: relative;
  margin-bottom: 24px;
  background: #000;
  overflow: hidden;
}

.shm-photo-grid {
  display: grid !important;
  grid-template-columns: 2fr 1fr !important;
  grid-template-rows: 523px !important;
  gap: 3px;
  overflow: hidden;
  height: 523px;
}

.shm-photo-main {
  grid-row: 1 / 2 !important;
  position: relative;
  overflow: hidden;
  height: 523px;
}

.shm-photo-side {
  display: grid !important;
  grid-template-rows: 1fr 1fr; /* default 2 rows; overridden inline to "1fr" when only 1 image */
  gap: 3px;
  height: 100%;
  overflow: hidden;
}

.shm-photo-side-item {
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.shm-photo-main a,
.shm-photo-side-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.shm-photo-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
  max-width: none !important;
  transition: transform 0.3s ease;
}

.shm-photo-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
  max-width: none !important;
  transition: transform 0.3s ease;
}

.shm-photo-main img:hover,
.shm-photo-side-item img:hover {
  transform: scale(1.02);
}

.shm-photo-count-btn {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 2;
}

/* ── Two-column layout ─────────────────────────── */
.shm-fm-layout {
  display: grid !important;
  grid-template-columns: 1fr 340px !important;
  gap: 20px;
  align-items: start;
  width: 100%;
}

.shm-fm-main {
  min-width: 0;
  width: 100%;
}

.shm-fm-sidebar {
  position: sticky;
  top: 20px;
  min-width: 0;
  width: 100%;
}

/* ── Cards ─────────────────────────────────────── */
.shm-fm-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.shm-fm-card-body {
  padding: 20px 24px;
}

/* ── Listing Header ─────────────────────────────── */
.shm-listing-location {
  font-size: 13px;
  color: #666;
  margin-bottom: 8px;
}

.shm-listing-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px;
  line-height: 1.2;
}

.shm-listing-subtitle {
  font-size: 14px;
  color: #555;
  margin-bottom: 18px;
}

/* Price pills */
.shm-price-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.shm-price-pill {
  border: 1px solid #f57a20;
  border-radius: 8px;
  padding: 10px 14px;
  min-width: 96px;
  background: #fff;
}

.shm-price-pill strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
}

.shm-price-pill span {
  font-size: 12px;
  color: #777;
}

/* Stats row */
.shm-stats-row {
  display: flex;
  gap: 20px;
  color: #444;
  font-size: 14px;
  flex-wrap: wrap;
}

.shm-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Section headings */
.shm-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 14px;
}

/* ── Content / Text areas ───────────────────────── */
.shm-fm-text,
.shm-fm-text p,
.shm-fm-text li {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin: 0 0 10px;
}

/* Constrain any images rendered inside ACF / content areas */
.shm-fm-text img {
  max-width: 100% !important;
  height: auto !important;
  display: block;
  border-radius: 6px;
  margin: 10px 0;
}

/* Constrain WP block / Gutenberg figures inside content */
.shm-fm-text figure,
.shm-fm-text .wp-block-image {
  max-width: 100% !important;
  margin: 10px 0;
}

.shm-fm-text figure img,
.shm-fm-text .wp-block-image img {
  max-width: 100% !important;
  height: auto !important;
}

/* Chips */
.shm-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shm-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f57a202b;
  border: 1px solid #f57a20;
  color: #000000;
  font-size: 13px;
  font-weight: 500;
}

/* Property features */
.shm-feat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
}

.shm-feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.shm-feat-item i {
  font-size: 15px;
  color: #555;
  width: 18px;
  text-align: center;
}

/* ── Room block ────────────────────────────────── */
.shm-room-block {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

.shm-room-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  flex-wrap: wrap;
  gap: 10px;
}

.shm-room-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.shm-room-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
}

.shm-room-status.available {
  background: #e6f9f4;
  color: #00875a;
  border: 1px solid #b3e8d6;
}

.shm-room-status.unavailable {
  background: #f5f5f5;
  color: #888;
  border: 1px solid #ddd;
}

/* Room carousel */
.shm-room-carousel {
  position: relative;
  overflow: hidden;
}

.shm-room-carousel-track {
  display: flex;
  transition: transform .35s ease;
  will-change: transform;
}

/* Each slide = 1/3 of the viewport → 3 visible at once */
.shm-room-carousel-slide {
  min-width: calc(100% / 3);
  flex: 0 0 calc(100% / 3);
  padding: 0 3px;
  box-sizing: border-box;
}

.shm-room-carousel-slide img,
.shm-room-carousel-slide a {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  max-width: none !important;
}

.shm-room-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shm-room-carousel-prev { left: 8px; }
.shm-room-carousel-next { right: 8px; }

/* Room photo count badge */
.shm-room-photo-count {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255,255,255,0.92);
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
  pointer-events: none;
}

/* Book Now button */
.shm-room-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid #f0f0f0;
}

.shm-book-now-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f57a20;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.shm-book-now-btn:hover {
  background: #f57a20;
}

.shm-book-now-btn i {
  font-size: 14px;
}

/* Room body */
.shm-room-body {
  padding: 16px 20px;
}

.shm-room-meta-section {
  margin-bottom: 14px;
}

.shm-room-meta-label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000000;
  font-weight: 600;
  margin-bottom: 10px;
}

.shm-room-meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.shm-room-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #333;
}

.shm-room-meta-item i {
  font-size: 14px;
  color: #555;
  width: 16px;
  text-align: center;
}

.shm-room-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.7;
  margin-top: 12px;
}

.shm-room-inspection {
  margin-top: 14px;
  border-top: 1px solid #eee;
  padding-top: 12px;
  font-size: 14px;
  color: #555;
}

.shm-room-inspection strong {
  display: block;
  color: #1a1a1a;
  margin-bottom: 4px;
}

/* ── Sidebar ────────────────────────────────────── */
.shm-agent-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
}

.shm-agent-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 10px;
  border: 3px solid #f0f0f0;
}

.shm-agent-name {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 3px;
}

.shm-agent-role {
  font-size: 13px;
  color: #666;
  margin: 0 0 8px;
}

.shm-agent-response {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f57a202b;
  border: 1px solid #f57a20;
  color: #000000;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  margin-bottom: 14px;
}

.shm-agent-info {
  font-size: 13px;
  color: #555;
  margin: 3px 0;
  word-break: break-word;
}

/* Sidebar contact form */
.shm-sidebar-form {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
}

.shm-sidebar-form-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 14px;
}

.shm-form-field {
  margin-bottom: 10px;
}

.shm-form-field input,
.shm-form-field textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  background: #fff;
  color: #1a1a1a;
  box-sizing: border-box;
  font-family: inherit;
}

.shm-form-field textarea {
  min-height: 90px;
  resize: vertical;
}

.shm-form-submit {
  width: 100%;
  border: 0;
  background: #f57a20;
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.shm-form-submit:hover {
  background: #f57a20;
}

/* Map */
.shm-map-wrap {
  margin-top: 14px;
  border-radius: 10px;
  overflow: hidden;
}

.shm-map-wrap iframe,
.shm-map-wrap > div {
  width: 100%;
  min-height: 280px;
  display: block;
}

/* Divider between meta sections */
.shm-room-meta-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 14px 0;
}

/* Always show location card — never let theme tab system hide it */
.shm-fm-main .shm-fm-card,
.shm-fm-main .shm-room-block {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 991px) {
  .shm-fm-layout {
    grid-template-columns: 1fr !important;
  }
  .shm-fm-sidebar {
    position: static;
  }
  .shm-photo-grid {
    grid-template-rows: 443px !important;
    height: 443px;
  }
  .shm-photo-main {
    height: 443px;
  }
  .shm-photo-side {
    height: 443px;
  }
}

@media (max-width: 767px) {
  .shm-fm-wrap {
    padding: 0 0 40px;
  }
  .shm-photo-grid {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    height: auto !important;
  }
  .shm-photo-main {
    grid-row: auto !important;
    height: 240px;
  }
  .shm-photo-side {
    flex-direction: row !important;
    height: 130px;
  }
  .shm-photo-side-item {
    flex: 1;
  }
  .shm-listing-title {
    font-size: 22px;
  }
  /* On mobile show 1 image at a time */
  .shm-room-carousel-slide {
    min-width: 100%;
    flex: 0 0 100%;
  }
  .shm-room-carousel-slide img,
  .shm-room-carousel-slide a {
    height: 200px;
  }
}