/* Room card (rendered by js/room-card.js) and the grids that hold cards */
.room-card {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.room-card__media {
  position: relative;
  height: 170px;
  flex-shrink: 0;
  background: var(--color-sand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
}

.room-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-green);
  color: var(--color-surface);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

/* Recency colour scale for the badge — vivid for fresh listings, fading to
   neutral for older ones. No red/orange on purpose: an older listing isn't
   an error, so it shouldn't read as one. */
.room-card__badge--recent { background: var(--color-green); }
.room-card__badge--today { background: var(--color-teal); }
.room-card__badge--yesterday { background: var(--color-teal-muted); }
.room-card__badge--older { background: var(--color-muted); }

.room-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.room-card__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.room-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  min-height: calc(1.3em * 2);
  color: var(--color-text);
}

.room-card__price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-teal-dark);
  white-space: nowrap;
}

.room-card__period {
  font-weight: 500;
  font-size: 12px;
  color: var(--color-muted);
}

.room-card__meta {
  font-size: 13.5px;
  color: var(--color-muted);
}

.room-card__meta--small {
  font-size: 12.5px;
}

.room-card__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.room-card__cta {
  margin-top: auto;
  text-align: center;
  background: var(--color-teal);
  color: var(--color-surface);
  font-weight: 700;
  font-size: 14px;
  padding: 11px;
  border-radius: var(--radius-xs);
}
/* Photo placeholder colours, shared with the room gallery.
   The variant is chosen in JS from the room number (see js/room-card.js). */
.photo-placeholder--1 { background: var(--color-photo-1); }
.photo-placeholder--2 { background: var(--color-photo-2); }
.photo-placeholder--3 { background: var(--color-photo-3); }
.photo-placeholder--4 { background: var(--color-photo-4); }

/* Card grids */
.card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
