.rental {
  padding: clamp(72px, 10vw, 150px) 24px clamp(104px, 13vw, 198px);
  color: #141414;
  background: #fff;
}

.rental h1 {
  margin: 0 auto clamp(48px, 6vw, 75px);
  text-align: center;
  font: 500 clamp(1.875rem, 4vw, 2.5rem)/1.2 var(--heading);
}

.rental-divider {
  display: inline-block;
  width: .075em;
  height: .95em;
  margin: 0 .13em 0 .12em;
  vertical-align: -.17em;
  background: #850000;
}

.rental-list {
  max-width: 960px;
  margin: 0 auto;
  padding: 0;
  border-top: 1px solid #dedede;
  list-style: none;
}

.rental-item {
  display: grid;
  grid-template-columns: clamp(132px, 20vw, 200px) minmax(0, 1fr) auto;
  grid-template-areas: "picture summary action" "picture previews previews";
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #dedede;
}

.rental-picture {
  grid-area: picture;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  background: #f2eeeb;
  cursor: zoom-in;
}

.rental-picture img { width: 100%; height: 100%; object-fit: cover; }
.rental-summary { grid-area: summary; }
.rental-summary h2 { font: 600 clamp(1.15rem, 2.1vw, 1.3rem)/1.25 var(--heading); }
.rental-summary p { margin-top: 7px; font-size: 1rem; color: #68615d; }
.rental-more { grid-area: action; min-height: 46px; min-width: 192px; margin-top: 14px; }
.rental-more, .rental-dialog .button { background-color: #850000; border-color: #850000; font-weight: 500; }
.rental-more:hover, .rental-dialog .button:hover { background-color: #680000; border-color: #680000; }

.rental-previews {
  grid-area: previews;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rental-previews button {
  flex: 0 0 64px;
  padding: 0;
  aspect-ratio: 1;
  border: 0;
  background: #f2eeeb;
  cursor: zoom-in;
}
.rental-previews img { width: 100%; height: 100%; object-fit: cover; }
.rental-previews button:hover { outline: 2px solid #850000; outline-offset: 2px; }

.rental-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

body:has(.rental-dialog[open]) { overflow: hidden; }
.rental-dialog {
  width: min(900px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 0;
  background: #fff;
  color: #141414;
}
.rental-dialog::backdrop { background: #1b1113b8; }
.rental-dialog-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 42px);
  padding: 54px clamp(16px, 4vw, 38px) 32px;
}
.rental-close, .rental-gallery-controls button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #ded8d6;
  border-radius: 50%;
  background: #fff;
  color: #211c1b;
  font: 25px/1 Arial, sans-serif;
  cursor: pointer;
}
.rental-close { position: absolute; top: 8px; right: 10px; }
.rental-close:hover, .rental-gallery-controls button:hover { background: #f4efec; }
.rental-gallery-photo { width: 100%; aspect-ratio: 1; max-height: 65dvh; object-fit: contain; background: #f5f1ee; }
.rental-gallery-controls { display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 9px; }
.rental-gallery-count { min-width: 48px; text-align: center; }
.rental-dialog h2 { font-size: clamp(1.3rem, 3vw, 2rem); }
.rental-dialog-price { margin-top: 8px; font-size: 1.125rem; }
.rental-dialog-description { margin: 17px 0 22px; }
.rental-dialog-description p + p { margin-top: 9px; }

@media (max-width: 690px) {
  .rental { padding-inline: 16px; }
  .rental-item {
    grid-template-columns: clamp(84px, 28vw, 150px) minmax(0, 1fr);
    grid-template-areas: "picture summary" "picture action" "previews previews";
    grid-template-rows: auto auto auto;
    align-content: start;
    column-gap: 13px;
    row-gap: 9px;
  }
  .rental-summary h2 { font-size: clamp(1rem, 4vw, 1.2rem); }
  .rental-summary p { margin-top: 4px; }
  .rental-more { justify-self: start; min-width: 0; min-height: 40px; margin-top: 0; padding: 7px 13px; font-size: .8rem; }
  .rental-previews { gap: 5px; margin-top: 2px; }
  .rental-previews button { flex-basis: 45px; }
  .rental-dialog-content { grid-template-columns: 1fr; }
  .rental-gallery-photo { max-height: 40dvh; }
}
