/* Cars: grids, listing rows, category tiles, and the detail page. */

/* ---- Filter bar ---------------------------------------------------------- */

.car-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 50px;
}

.car-filter button {
  padding: 11px 24px;
  border: 1px solid var(--rnx-rule);
  border-radius: var(--rnx-radius);
  background: none;
  color: var(--rnx-body);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--rnx-dur) var(--rnx-ease);
}

.car-filter button:hover,
.car-filter button[aria-pressed="true"] {
  border-color: var(--rnx-accent);
  background: var(--rnx-accent);
  color: var(--rnx-ink);
}

/* The reference spaces its two-up car grid with mb-60. */
.car-grid {
  row-gap: 60px;
}

.car-grid > [hidden] {
  display: none;
}

.filter-empty {
  padding: 40px 0;
  text-align: center;
}

/* ---- Boxed card variant (Grid 02) --------------------------------------- */

.car-card--boxed {
  padding: 18px;
  border: 1px solid var(--rnx-rule);
  border-radius: var(--rnx-radius-card-all);
  transition: border-color var(--rnx-dur) var(--rnx-ease);
}

.car-card--boxed:hover {
  border-color: var(--rnx-accent);
}

/* Boxed variant already has its own frame, so the panel sits flush inside it
   rather than floating inset over the photo. */
.car-card--boxed .car-card__con {
  margin: -55px 0 0;
}

/* ---- Listing rows -------------------------------------------------------- */

.car-row {
  display: grid;
  grid-template-columns: 300px 1fr auto;
  gap: 30px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--rnx-rule);
  border-radius: var(--rnx-radius-card-all);
  transition: border-color var(--rnx-dur) var(--rnx-ease);
}

.car-row + .car-row {
  margin-top: 24px;
}

.car-row:hover {
  border-color: var(--rnx-accent);
}

.car-row__img img {
  width: 100%;
  aspect-ratio: 20 / 13;
  object-fit: cover;
  border-radius: var(--rnx-radius-sm);
}

.car-row h4 {
  margin-bottom: 10px;
}

.car-row__side {
  text-align: right;
}

.car-row__price {
  margin-bottom: 12px;
}

.car-row__price strong {
  display: block;
  color: var(--rnx-ink);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.car-row__price span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: var(--rnx-tracking-ui);
}

/* ---- Category tiles ------------------------------------------------------ */

.type-grid {
  row-gap: 30px;
}

/* List variant */
.type-list li {
  border-bottom: 1px solid var(--rnx-rule);
}

.type-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
}

.type-list strong {
  color: var(--rnx-ink);
  font-size: 20px;
  font-weight: 600;
  transition: color var(--rnx-dur) var(--rnx-ease);
}

.type-list a:hover strong {
  color: var(--rnx-accent);
}

.type-list em {
  font-style: normal;
  font-size: 13px;
  color: var(--rnx-muted);
}

/* ---- Detail page --------------------------------------------------------- */

.car-detail__gallery > .glightbox {
  display: block;
  border-radius: var(--rnx-radius-card-all);
  overflow: hidden;
}

.car-detail__gallery > .glightbox img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--rnx-dur-slow) var(--rnx-ease);
}

.car-detail__gallery > .glightbox:hover img {
  transform: scale(1.03);
}

.car-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.car-detail__thumbs a {
  display: block;
  border-radius: var(--rnx-radius-sm);
  overflow: hidden;
}

.car-detail__thumbs img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform var(--rnx-dur-slow) var(--rnx-ease);
}

.car-detail__thumbs a:hover img {
  transform: scale(1.06);
}

.car-detail__copy {
  margin-top: 45px;
}

.car-detail__copy h4 {
  margin-top: 30px;
}

.car-detail__note {
  margin-top: 26px;
  padding: 22px 26px;
  border-left: 3px solid var(--rnx-accent);
  background: var(--rnx-bg-soft);
  border-radius: 0 var(--rnx-radius-card-all) var(--rnx-radius-card-all) 0;
}

/* Weekly / monthly / deposit block, set apart from the spec table above it. */
.spec-list--rates {
  margin-top: 20px;
  padding-top: 5px;
  border-top: 2px solid var(--rnx-accent);
}

/* Measured off the reference: grey panel, amber header block, 30px body. */
.car-detail__aside {
  padding: 0;
  border: 0;
  border-radius: var(--rnx-radius-card-all);
  background: var(--rnx-bg-soft);
  overflow: hidden;
}

.car-detail__price {
  margin: 0;
  padding: 35px 30px 25px;
  background: var(--rnx-accent);
  color: var(--rnx-ink);
}

.car-detail__price strong {
  color: var(--rnx-ink);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.25;
}

.car-detail__price span {
  margin-left: 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: var(--rnx-tracking-ui);
}

/* Everything after the amber header sits in a 30px well. */
.car-detail__aside > :not(.car-detail__price) {
  margin-left: 30px;
  margin-right: 30px;
}

.car-detail__aside > .spec-list {
  padding-top: 15px;
}

/* The same panel is reused as a plain sidebar (FAQ, contact, blog) with no
   amber header — it still needs a top inset. */
.car-detail__aside > :first-child:not(.car-detail__price) {
  margin-top: 30px;
}

.car-detail__aside > :last-child {
  margin-bottom: 30px;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rnx-rule);
}

.spec-list li:last-child {
  border-bottom: 0;
}

.spec-list strong {
  color: var(--rnx-ink);
  font-weight: 500;
}

.car-detail__actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.car-detail__actions .btn-rnx {
  justify-content: center;
}

/* Detail layout variants ---------------------------------------------------- */

.car-detail--wide .car-detail__gallery {
  margin-bottom: 50px;
}

.car-detail--split .car-detail__aside {
  background: var(--rnx-bg-soft);
  border-color: transparent;
}

.car-detail--dark .car-detail__aside {
  background: var(--rnx-bg-dark);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.7);
}

.car-detail--dark .car-detail__price strong,
.car-detail--dark .spec-list strong {
  color: var(--rnx-white);
}

.car-detail--dark .car-detail__price,
.car-detail--dark .spec-list li {
  border-color: var(--rnx-rule-dark);
}

@media (max-width: 991px) {
  .car-row {
    grid-template-columns: 1fr;
  }

  .car-row__side {
    text-align: left;
  }

  .car-detail__aside {
    margin-top: 40px;
  }
}

/* ---- Offer pricing -------------------------------------------------------- */

/* The struck-through figure is the rate this car was previously advertised at.
   It is deliberately quieter than the live price: the point is the number you
   pay, not the theatre of the discount. */
.car-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.car-price__was {
  color: var(--rnx-body);
  opacity: 0.55;
  font-size: 14px;
  font-weight: 400;
  text-decoration-thickness: 1px;
}

.car-price__now {
  color: var(--rnx-accent);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
}

.car-price__unit {
  font-size: 12px;
  letter-spacing: var(--rnx-tracking-ui);
  text-transform: uppercase;
  opacity: 0.7;
}

/* The saving, beside the price. Amber on a wash of the same amber rather
   than the solid ink of the card flag: on the detail page this sits next to
   the rate itself, and a black pill there outweighed the price it modifies. */
.car-price__off {
  padding: 3px 9px;
  border-radius: var(--rnx-radius);
  background: rgba(245, 183, 84, 0.16);
  color: var(--rnx-accent-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--rnx-tracking-ui);
  text-transform: uppercase;
  white-space: nowrap;
}

/* On the detail page the price sits on a solid amber panel, where an amber
   pill on an amber ground is all but invisible. Same shape, inverted: ink on
   a wash of ink. The margin-left the panel gives every span is dropped, or
   the flex gap doubles up in front of it. */
.car-detail__price .car-price__off {
  margin-left: 0;
  background: rgba(27, 27, 27, 0.13);
  color: var(--rnx-ink);
}

/* Corner flag on the card photo. The card is static by default, so it has to
   become the positioning context — the flag is its only absolute child, so
   nothing else moves. */
.car-card {
  position: relative;
}

.car-flag {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 18px;
  padding: 6px 12px;
  border-radius: var(--rnx-radius);
  background: var(--rnx-ink);
  color: var(--rnx-white);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--rnx-tracking-ui);
  text-transform: uppercase;
}

/* Rate table and spec list: keep the old figure present but subordinate. */
.rate-table s,
.spec-list s {
  opacity: 0.5;
  font-weight: 400;
  text-decoration-thickness: 1px;
}
