/* rentals — things rented by the night or the day: cards in columns, a list or rows. */

.rentals--columns-2 .cards-grid { grid-template-columns: repeat(2, 1fr); }

.rentals--columns-3 .cards-grid { grid-template-columns: repeat(3, 1fr); }

.rentals--columns-4 .cards-grid { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 960px) {
  .rentals .cards-grid, .products .cards-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .rentals .cards-grid, .products .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .rentals--cards .svc-grid { grid-template-columns: 1fr; }
}

/* The card: a 4:3 photo — a house or a box is chosen with the eyes. */
.svc-card--rental .svc-card__media { aspect-ratio: 4 / 3; }

/* ---------- A rental's card (_rental_card.twig) ----------
   One thing rented: its 4:3 photo, name, line, the price, and «Choose dates». Built like the product card: the whole card is the
   link, the action above it, the price always the last line. Three looks:
   `cards`, `list` — a price list, the prices in one column on the right — and
   `rows`: one to a row, a large photo beside the words, the sides alternating —
   for a few things chosen with the eyes (rooms, houses, tours). */
.svc-card { position: relative; padding: 0; overflow: hidden; container-type: inline-size; }

.svc-card:hover { transform: translateY(-2px); }

.svc-card__link { color: inherit; }

.svc-card__link::after { content: ''; position: absolute; inset: 0; z-index: 0; }

.svc-card__link:focus-visible { outline: none; }

.svc-card:has(.svc-card__link:focus-visible) { outline: 2px solid var(--mark, var(--primary)); outline-offset: 2px; }

.svc-card__media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--hover-wash); }

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

.svc-card__body { display: flex; flex-direction: column; gap: .6rem; flex: 1; padding: 1.3rem 1.4rem 1.2rem; }

.svc-card__main { display: grid; gap: .3rem; }

.svc-card .svc-card__title {
  margin: 0; /* a design's `.card h3` margin would set the rows' height apart */ font-size: 1.1rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em; max-height: 2.6em;
}

.svc-card__excerpt {
  margin: 0; font-size: .92rem; line-height: 1.6; color: var(--body-text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 3.2em;
}

.svc-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-size: .85rem; color: var(--muted); }

/* No length, nobody named: no line — whitespace is not :empty, so asked by what it holds; the price list keeps its cell (.services--list … wins). */
.svc-card__meta:not(:has(*)) { display: none; }

.svc-card__dur { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }

.svc-card__dur svg { width: 1rem; height: 1rem; }

.svc-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .8rem; margin-top: auto; padding-top: .5rem; min-height: 2.5rem; }

.svc-card__price { display: grid; min-width: 0; color: var(--ink); }

.svc-card__price .price-main { display: flex; align-items: baseline; gap: .35rem; white-space: nowrap; }

.svc-card__price .price { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.svc-card__price .price-from, .svc-card__price .price-unit { font-size: .8rem; color: var(--muted); }

.svc-card__price .price-was { font-size: .8rem; color: var(--muted); margin: 0; }

.svc-card__price .price-ask { font-size: .92rem; font-weight: 600; }

.svc-card__action { position: relative; z-index: 1; flex: none; }

.svc-card__book {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem .95rem; border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--surface); color: var(--ink); font-size: .88rem; font-weight: 600; white-space: nowrap;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.svc-card__book svg { width: 1rem; height: 1rem; }

.svc-card__book:hover { border-color: var(--mark, var(--primary)); color: var(--mark, var(--primary)); background: var(--hover-wash); }

.svc-card__book:focus-visible { outline: 2px solid var(--mark, var(--primary)); outline-offset: 2px; }

@container (max-width: 240px) {
  .svc-card__excerpt { display: none; }
  .svc-card__book span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .svc-card__book { padding: .6rem; }
}

@container (max-width: 240px) {
  .svc-card__book span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .svc-card__book { padding: .6rem; }
}
