/* Rental and catering services: whole-card links with a photo area, the item dialog, and the catering facts. */

.rcard {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  overflow: hidden;
  min-width: 0;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.rcard:hover {
  border-color: var(--blue-ink);
  box-shadow: var(--shadow-md);
}

.rcard:focus-within {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* The heading link stretches over the whole card, so the card is one tap target. */
.rcard-link {
  color: inherit;
  text-decoration: none;
}

.rcard-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.rcard-link:focus-visible {
  outline: none;
}

/* Photo area. Placeholder now; swap in <img width height loading="lazy"> with the same 4:3 ratio. */
.photo {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--sp-2);
  aspect-ratio: 4 / 3;
  background-color: var(--blue-soft);
  background-image: radial-gradient(circle at center, var(--dot) 0 1.6px, transparent 2px);
  background-size: 18px 18px;
  color: var(--blue-deep);
}

.photo svg {
  width: var(--icon-tile);
  height: var(--icon-tile);
}

.photo span {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.rcard-body {
  display: grid;
  gap: var(--sp-2);
  align-content: start;
  padding: var(--sp-4) var(--sp-4) 0;
}

.rcard-body h3 {
  font-size: var(--fs-lg);
}

.rcard-body p {
  color: var(--muted);
  font-size: var(--fs-sm);
}

.price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rcard .price {
  color: var(--ink);
}

.rcard-cta {
  padding: var(--sp-3) var(--sp-4) var(--sp-4);
  color: var(--blue-ink);
  font-weight: 600;
  font-size: var(--fs-sm);
}

/* ---------- item dialog ---------- */

.item-dialog {
  width: min(100% - 2 * var(--sp-4), 480px);
  max-height: calc(100dvh - 2 * var(--sp-4));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.item-dialog::backdrop {
  background: var(--shadow-color);
  backdrop-filter: blur(2px);
}

.item-dialog .photo {
  aspect-ratio: 16 / 9;
}

.dialog-body {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5);
}

.dialog-close {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.dialog-close svg {
  width: 20px;
  height: 20px;
}

.dialog-qty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

@media (prefers-reduced-motion: no-preference) {
  .item-dialog[open] {
    animation: dialog-in var(--dur-pop) var(--ease-out);
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

/* ---------- catering ---------- */

.cater {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

/* Facts as label-over-value rows in one bordered panel. */
.facts {
  display: grid;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
}

.facts div {
  display: grid;
  gap: var(--sp-1);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--line);
}

.facts div:last-child {
  border-bottom: 0;
}

.facts dt {
  color: var(--text-soft);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.facts dd {
  margin: 0;
}

.cater-why {
  display: grid;
  gap: var(--sp-3);
  justify-items: start;
}

.cater-why h3 {
  color: var(--blue-deep);
}

/* --bp-md: facts and reasons side by side. */
@media (min-width: 900px) {
  .cater {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: var(--sp-6);
  }
}
