:root {
  --ec-red: #ec3138;
  --ec-dark: #0c0c0c;
  --ec-card-bg: #f1ebeb;
  --ec-muted: #5b5b5b;
  --ec-bar-bg: #e4dcdc;
  --ec-radius: 20px;
}

/* Card grid */
.ec-rentals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  padding-top: 4px;
}
@media (max-width: 1024px) {
  .ec-rentals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .ec-rentals { grid-template-columns: minmax(0, 1fr); }
}

.ec-rental-card {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--ec-card-bg);
  border-radius: var(--ec-radius);
  box-shadow: 2px 2px 8px -2px rgba(0, 0, 0, .3);
}
.ec-rental-card__media { display: block; border-radius: var(--ec-radius); overflow: hidden; }
.ec-rental-card__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .3s ease;
}
.ec-rental-card__media:hover .ec-rental-card__img { transform: scale(1.03); }
.ec-rental-card__title { margin: 0; font-size: 24px; line-height: 1.25; }
.ec-rental-card__title a { color: inherit; text-decoration: none; }
.ec-rental-card__title a:hover { color: var(--ec-red); }

.ec-rental-card__specs,
.ec-rental-single__specs {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.ec-rental-card__specs li,
.ec-rental-single__specs li {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin: 0;
}
.ec-icon { flex: none; color: var(--ec-red); }

.ec-rental-card__price {
  margin: 0;
  font-weight: 900;
  color: #000;
}
.ec-rental-card__from { font-weight: 400; }

.ec-rental-card__details {
  color: var(--ec-dark);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ec-rental-card__details:hover { color: var(--ec-red); }

.ec-rental-card__book {
  display: block;
  margin-top: auto;
  padding: 12px 24px;
  border-radius: 10px;
  background: var(--ec-red);
  color: #fff;
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s ease;
}
.ec-rental-card__book:hover,
.ec-rental-card__book:focus-visible { background: var(--ec-dark); color: #fff; }

.ec-rental-card a:focus-visible,
.ec-rental-single a:focus-visible,
.ec-gallery button:focus-visible,
.ec-lightbox button:focus-visible {
  outline: 3px solid var(--ec-red);
  outline-offset: 3px;
}

@media (max-width: 767px) {
  .ec-rental-card__title { font-size: 26px; }
}

/* Single page */
.ec-rental-single { padding: 0 0 80px; }
.ec-rental-single__back { margin: 0 0 24px; }
.ec-rental-single__back a { color: var(--ec-dark); font-weight: 700; text-decoration: none; }
.ec-rental-single__back a:hover { color: var(--ec-red); }

.ec-rental-single__layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px;
  align-items: start;
}
@media (max-width: 991px) {
  .ec-rental-single__layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.ec-rental-single__summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  background: var(--ec-card-bg);
  border-radius: var(--ec-radius);
}
.ec-rental-single__title { margin: 0; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
.ec-rental-single__specs { font-size: 16px; }
.ec-rental-single__summary .ec-rental-card__price { font-size: 24px; }
.ec-rental-single__heading { margin: 8px 0 0; font-size: 18px; line-height: 1.3; }
.ec-rental-single__book { margin-top: 8px; padding: 16px 24px; font-size: 18px; }
.ec-rental-single__content { margin-top: 48px; max-width: 75ch; }

/* Below 768px the theme header is taller than its page-title band and overlaps the content. */
@media (max-width: 767px) {
  .ec-rental-single { padding-top: 40px; }
}

@media (max-width: 767px) {
  .ec-rental-single { padding-bottom: 56px; }
  .ec-rental-single__summary { padding: 20px; }
}

/* Price tiers */
.ec-tiers { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.ec-tiers li {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 15px;
}
.ec-tiers__label { white-space: nowrap; }
.ec-tiers__bar { display: block; height: 12px; border-radius: 6px; background: var(--ec-bar-bg); overflow: hidden; }
.ec-tiers__bar span { display: block; height: 100%; border-radius: 6px; background: var(--ec-dark); }
.ec-tiers__price { white-space: nowrap; font-weight: 900; color: #000; }
.ec-tiers li.is-best .ec-tiers__bar span { background: var(--ec-red); }
.ec-tiers li.is-best .ec-tiers__price { color: var(--ec-red); }
@media (max-width: 420px) {
  .ec-tiers li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .ec-tiers__bar { grid-column: 1 / -1; grid-row: 2; }
}

/* Gallery */
.ec-gallery__stage { position: relative; border-radius: var(--ec-radius); overflow: hidden; background: #eee; }
.ec-gallery__main { display: block; cursor: zoom-in; }
.ec-gallery__main-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.ec-gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--ec-dark);
  font-size: 30px;
  line-height: 40px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.ec-gallery__nav:hover { background: var(--ec-red); color: #fff; }
.ec-gallery__nav,
.ec-lightbox__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
  letter-spacing: 0;
}
.ec-gallery__nav svg,
.ec-lightbox__close svg { display: block; width: 22px; height: 22px; }
.ec-gallery__nav--prev { left: 12px; }
.ec-gallery__nav--next { right: 12px; }
.ec-gallery__counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font-size: 13px;
}
.ec-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0 0 4px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
}
.ec-gallery__thumbs li { flex: 0 0 auto; margin: 0; }
.ec-gallery__thumbs a {
  display: block;
  width: 96px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  opacity: .75;
  transition: opacity .2s ease, border-color .2s ease;
}
.ec-gallery__thumbs a:hover,
.ec-gallery__thumbs a[aria-current="true"] { opacity: 1; border-color: var(--ec-red); }
.ec-gallery__thumbs img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
@media (max-width: 767px) {
  .ec-gallery__thumbs a { width: 72px; }
}

/* Lightbox */
.ec-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, .94);
  color: #fff;
}
.ec-lightbox::backdrop { background: rgba(0, 0, 0, .94); }
.ec-lightbox__figure {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 56px 64px;
  box-sizing: border-box;
  touch-action: pan-y;
}
.ec-lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.ec-lightbox .ec-gallery__nav { background: rgba(255, 255, 255, .15); color: #fff; }
.ec-lightbox .ec-gallery__nav:hover { background: var(--ec-red); }
.ec-lightbox__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  color: #fff;
  font-size: 28px;
  line-height: 44px;
  cursor: pointer;
}
.ec-lightbox__close:hover { background: var(--ec-red); }
.ec-lightbox__counter { position: absolute; top: 22px; left: 20px; font-size: 14px; }
@media (max-width: 767px) {
  .ec-lightbox__figure { padding: 56px 8px; }
  .ec-lightbox .ec-gallery__nav { top: auto; bottom: 16px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ec-rental-card__img, .ec-gallery__thumbs a { transition: none; }
}
