/*
  Trang danh sách xe cho thuê (/cho-thue-xe, danh mục con, trang khu vực / dịch vụ thuê).
  Chỉ chứa phần theme EGA chưa có — bố cục cơ bản dùng lớp tiện ích sẵn có (flex, grid, gap-*, rounded-*, text-*, line-clamp-*, btn btn--primary).
  Dùng biến theme (theme.css): --color-primary #F26522, --color-border, --color-neutral-*, --rounded-*. 1rem = 10px.
  Gồm:
    1. Hàng chip "Tìm nhanh:" dưới bảng lọc nhanh (ProductFilterPanel/Default.cshtml)       .rp-quick, .rp-chip
    2. Banner ưu đãi (Core Zones/_RentalPromo.cshtml)                                       .rental-promo
    3. Dải cam kết (Core Zones/_RentalCommitments.cshtml)                                   .rental-commitments
    4. Lưới + thẻ xe (Catalog Shared/_RentalListing.cshtml, _RentalCarCard.cshtml)           .rp-grid, .rp-car
*/
:root {
  --rp-orange-soft: #EEF3FB;
  --rp-orange-line: #CFDCF0;
  --rp-text: #1b2433;
  --rp-muted: #6b7280;
  --rp-line: #e6eaf0;
  --rp-shadow: 0 .4rem 1.6rem rgba(11, 45, 102, .06);
  --rp-shadow-hover: 0 1rem 2.8rem rgba(11, 45, 102, .12);
}

/* Biểu tượng SVG (_MenuIcon) trong các khối của trang */
.rp-quick .menu-icon,
.rental-promo .menu-icon,
.rental-commitments .menu-icon,
.rp-car .menu-icon { display: block; width: 100%; height: 100%; }

/* ===== 1. Hàng chip "Tìm nhanh:" ===== */
.rp-quick { margin-top: 1.6rem; }
.rp-quick + .rp-quick { margin-top: 1rem; }
.rp-quick__label { color: var(--rp-text); margin-right: .4rem; }
.rp-chip {
  min-height: 3.8rem;
  padding: .4rem 1.4rem .4rem .5rem;
  background: #fff;
  border: 1px solid var(--rp-line);
  color: var(--rp-text);
  line-height: 1.4;
  text-decoration: none;
  transition: border-color .2s, background-color .2s, color .2s;
}
/* Icon chip: khung tròn cố định 2.8rem, SVG 1.6rem căn giữa -> mọi icon cùng kích thước thị giác */
.rp-chip__icon {
  flex: 0 0 2.8rem; width: 2.8rem; height: 2.8rem; padding: .6rem; margin-right: .2rem;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--brand-navy-soft, #EEF3FB); color: var(--brand-orange, #F26522);
  transition: background-color .2s, color .2s;
}
.rp-chip__icon .menu-icon { width: 1.6rem; height: 1.6rem; stroke-width: 2; }
.rp-chip:hover .rp-chip__icon,
.rp-chip.is-active .rp-chip__icon { background: var(--brand-orange, #F26522); color: #fff; }
.rp-chip:hover { border-color: var(--color-primary); color: var(--color-primary); }
.rp-chip.is-active {
  border-color: var(--color-primary);
  background: var(--rp-orange-soft);
  color: var(--color-primary);
  font-weight: 600;
}

/* ===== Vùng banner + cam kết ===== */
.rp-zones > * + * { margin-top: 1.6rem; }

/* ===== 2. Banner ưu đãi ===== */
.rental-promo {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.6rem 2.4rem;
  border-radius: var(--rounded-lg);
  border: 1px solid var(--rp-orange-line);
  background: linear-gradient(90deg, #fff1de 0%, #fff8ef 55%, #fffdf9 100%);
  overflow: hidden;
}
.rental-promo + .rental-promo { margin-top: 1.2rem; }
.rental-promo__badge {
  flex: 0 0 5.2rem;
  width: 5.2rem;
  height: 5.2rem;
  padding: 1.3rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 .6rem 1.4rem rgba(var(--color-primary-rgb), .3);
}
.rental-promo__title {
  margin: 0;
  flex: 0 1 auto;
  font-family: var(--font-body-family);
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 800;
  color: var(--rp-text);
}
.rental-promo__title span { color: var(--color-primary); }
.rental-promo__text {
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  padding-left: 2rem;
  border-left: 1px solid var(--rp-orange-line);
  color: var(--rp-muted);
  font-size: 1.4rem;
  line-height: 1.5;
}
.rental-promo__image {
  flex: 0 0 auto;
  width: 18rem;
  max-height: 8.4rem;
  object-fit: contain;
  margin-left: auto;
}
.rental-promo__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 2rem;
  font-weight: 600;
  white-space: nowrap;
}
.rental-promo__text + .rental-promo__btn { margin-left: auto; }

/* ===== 3. Dải cam kết ===== */
.rental-commitments {
  display: grid;
  grid-template-columns: repeat(var(--rental-commit-cols, 4), minmax(0, 1fr));
  margin: 0;
  padding: 1.2rem 0;
  list-style: none;
}
.rental-commitments__item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: .4rem 2rem;
  border-left: 1px solid var(--rp-line);
}
.rental-commitments__item:first-child { border-left: 0; padding-left: 0; }
.rental-commitments__icon { flex: 0 0 3.2rem; width: 3.2rem; height: 3.2rem; color: var(--color-primary); }
.rental-commitments__icon img { width: 100%; height: 100%; object-fit: contain; }
.rental-commitments__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.rental-commitments__text b { font-size: 1.5rem; font-weight: 700; color: var(--rp-text); }
.rental-commitments__text small { margin-top: .2rem; font-size: 1.3rem; color: var(--rp-muted); }

/* ===== 4. Lưới + thẻ xe ===== */
.rp-listing { margin: 1.6rem 0 3.2rem; }
.rp-toolbar .heading { margin: 0; }
.rp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rp-car {
  border: 1px solid var(--rp-line);
  box-shadow: var(--rp-shadow);
  transition: box-shadow .2s, transform .2s;
}
.rp-car:hover { box-shadow: var(--rp-shadow-hover); transform: translateY(-2px); }
.rp-car__media { aspect-ratio: 16 / 10; background: var(--color-neutral-50); }
.rp-car__media img { transition: transform .4s ease; }
.rp-car:hover .rp-car__media img { transform: scale(1.04); }
.rp-car__sale {
  top: 1rem;
  right: 1rem;
  z-index: 1;
  padding: .4rem 1rem;
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 .4rem 1rem rgba(var(--color-primary-rgb), .3);
}
.rp-car__name { margin: 0; font-family: var(--font-body-family); font-size: 1.6rem; line-height: 1.4; }
.rp-car__name a { color: var(--rp-text); text-decoration: none; }
.rp-car__name a:hover { color: var(--color-primary); }
.rp-car__old { color: var(--color-neutral-200); }
.rp-car__current { font-size: 1.8rem; line-height: 1.3; }
.rp-car__unit { color: var(--rp-muted); margin-left: -.4rem; }
.rp-car__meta { margin: 0; padding: 0; list-style: none; }
.rp-car__meta li {
  padding: .3rem .8rem;
  background: #f5f6f8;
  color: var(--rp-muted);
  white-space: nowrap;
}
.rp-car__meta .menu-icon { width: 1.4rem; height: 1.4rem; flex: 0 0 1.4rem; }
.rp-car__note { margin: 0; color: var(--rp-muted); line-height: 1.5; }
.rp-car__foot { padding-top: .4rem; }
.rp-car__book { padding: .9rem 1.6rem; white-space: nowrap; }
.rp-car__book .menu-icon { width: 1.6rem; height: 1.6rem; flex: 0 0 1.6rem; }
.rp-car__detail { color: var(--color-primary); text-decoration: none; white-space: nowrap; }
.rp-car__detail:hover { text-decoration: underline; }

/* ===== Responsive ===== */
@media (max-width: 1199px) {
  .rp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rental-promo__image { width: 14rem; }
}

@media (max-width: 991px) {
  /* Banner: biểu tượng + tiêu đề một hàng, chữ / ảnh / nút xuống dưới */
  .rental-promo { flex-wrap: wrap; gap: 1.2rem 1.6rem; padding: 1.6rem; }
  .rental-promo__title { flex: 1 1 calc(100% - 7rem); font-size: 1.8rem; }
  .rental-promo__text { flex: 1 1 100%; order: 3; padding-left: 0; border-left: 0; }
  .rental-promo__image { order: 4; width: 12rem; margin-left: 0; }
  .rental-promo__btn { order: 5; margin-left: auto; }

  /* Cam kết 2 x 2 */
  .rental-commitments { grid-template-columns: repeat(min(var(--rental-commit-cols, 4), 2), minmax(0, 1fr)); row-gap: 1.6rem; }
  .rental-commitments__item:nth-child(2n + 1) { border-left: 0; padding-left: 0; }
}

@media (max-width: 767px) {
  .rp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem; }
  .rp-car__body { padding: 1.2rem; }
  .rp-car__foot { flex-wrap: wrap; }
  .rp-car__book { flex: 1 1 100%; justify-content: center; }
  .rp-car__detail { margin: 0 auto; }
  .rental-commitments__item { padding: .4rem 1.2rem; gap: 1rem; }
  .rental-commitments__icon { flex-basis: 2.8rem; width: 2.8rem; height: 2.8rem; }
  .rental-commitments__text b { font-size: 1.4rem; }
  .rental-commitments__text small { font-size: 1.2rem; }
}

@media (max-width: 575px) {
  /* Chip "Tìm nhanh" cuộn ngang một hàng thay vì xuống nhiều dòng */
  .rp-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
  .rp-quick::-webkit-scrollbar { display: none; }
  .rp-chip, .rp-quick__label { flex: 0 0 auto; white-space: nowrap; }
  .rental-promo__badge { flex-basis: 4.4rem; width: 4.4rem; height: 4.4rem; padding: 1.1rem; }
  .rental-promo__title { font-size: 1.6rem; }
  .rental-promo__btn { flex: 1 1 auto; justify-content: center; }
}

@media (max-width: 479px) {
  /* Điện thoại nhỏ: 1 thẻ / hàng cho ảnh và nút đủ lớn */
  .rp-grid { grid-template-columns: minmax(0, 1fr); }
  .rp-car__foot { flex-wrap: nowrap; }
  .rp-car__book { flex: 0 1 auto; }
  .rp-car__detail { margin: 0; }
}
