.inventory-row.is-loading,
.inventory-row.is-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
}

.public-vehicle-message {
  grid-column: 1 / -1;
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
}

.car-card .price.is-reserved,
.detail-panel .price.is-reserved,
.mobile-photo-title .price.is-reserved {
  color: var(--red);
  letter-spacing: .08em;
}

.car-card .tag.is-reserved {
  background: var(--red);
  color: #fff;
}

.page-home .car-card .car-photo {
  background: #151515;
}

.page-home .car-card .car-photo img {
  display: block;
  opacity: 1;
  filter: contrast(1.1) saturate(1.12) brightness(1.02);
  image-rendering: auto;
  transform: translateZ(0) scale(1.003);
  backface-visibility: hidden;
}

.quick-search .real-filter-control {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

.quick-search .real-filter-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 139, 61, .12);
}

.quick-search button.red-btn {
  border: 0;
  cursor: pointer;
}

.mobile-inventory-search-shell,
.mobile-filter-strip {
  display: none;
}

body[data-page="home"]:not(.public-filters-ready) .quick-search .search-grid,
body[data-page="home"]:not(.public-filters-ready) .advanced-search-wrap,
body[data-page="home"]:not(.public-filters-ready) .inventory-filter-summary {
  visibility: hidden;
}

.advanced-search-wrap {
  position: static;
  align-self: end;
  margin: 0;
}

.advanced-search-toggle {
  display: inline-flex;
  width: 142px;
  min-height: 40px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid #b8862e;
  border-radius: 9px;
  background: linear-gradient(180deg, #d7aa55, #ad751d);
  color: #fff;
  box-shadow: 0 8px 18px rgba(128, 82, 17, .18);
  font-weight: 850;
  cursor: pointer;
}

.advanced-search-toggle i {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.advanced-search-toggle[aria-expanded="true"] i {
  transform: translateY(2px) rotate(225deg);
}

.advanced-search-panel {
  position: static;
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
  z-index: 20;
  margin-top: 9px;
  padding: 14px;
  border: 1px solid #dfc18b;
  border-radius: 12px;
  background: #fffaf0;
  box-shadow: 0 12px 28px rgba(99, 67, 20, .1);
}

.advanced-search-panel[hidden] {
  display: none !important;
}

@media (min-width: 921px) {
  body[data-page="home"] .quick-search.page-home .search-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .field {
    order: 1;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .advanced-search-panel {
    order: 2;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .price-custom-field {
    order: 1;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .monthly-custom-field {
    order: 1;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
    display: flex;
    align-items: end;
    gap: 8px;
    order: 1;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row > .red-btn {
    flex: .85 1 0;
    width: auto;
    min-width: 0;
    min-height: 40px;
    padding: 0 8px;
    font-size: 14px;
    font-weight: 850;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row > .advanced-search-wrap {
    flex: 1.15 1 0;
    min-width: 0;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row .advanced-search-toggle {
    width: 100%;
    min-width: 0;
    gap: 6px;
    padding: 0 6px;
    font-size: 13px;
  }
}

body[data-page="home"] .quick-search.page-home .monthly-custom-range {
  display: flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f3f0eb;
}

body[data-page="home"] .quick-search.page-home .monthly-custom-range input {
  flex: 1 1 42px;
  min-width: 0;
  height: 30px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
  box-shadow: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

body[data-page="home"] .quick-search.page-home .monthly-custom-range input::-webkit-inner-spin-button,
body[data-page="home"] .quick-search.page-home .monthly-custom-range input::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

body[data-page="home"] .quick-search.page-home .monthly-custom-range span,
body[data-page="home"] .quick-search.page-home .monthly-custom-range small {
  flex: 0 0 auto;
  color: #7e7163;
  font-weight: 850;
}

.advanced-search-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.advanced-search-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #171c24;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 900;
}

.advanced-search-grid select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d8c3a7;
  border-radius: 7px;
  background: #fff;
  color: #858a92;
  font-size: 14px;
  font-weight: 450;
  box-shadow: none;
  outline: none;
}

.advanced-search-grid select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 139, 61, .12);
}

.advanced-search-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.advanced-search-actions button {
  min-height: 36px;
  padding: 0 15px;
  border: 1px solid #d8c4a4;
  border-radius: 8px;
  background: #fff;
  color: #514331;
  font-weight: 800;
  cursor: pointer;
}

.advanced-search-actions button.apply {
  border-color: #b67d24;
  background: #b98630;
  color: #fff;
}

.inventory-filter-summary {
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 10px;
  min-height: 52px;
  margin-bottom: 16px;
  padding: 9px 14px;
  border-radius: 11px;
  background: #f8f5ef;
}

.inventory-filter-summary > strong {
  flex: 0 0 auto;
  color: #333;
  font-weight: 500;
}

.inventory-filter-summary > strong b {
  color: #c5162e;
}

.active-filter-chips {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 7px;
}

.active-filter-chips > span {
  color: #8a8177;
  font-size: 12px;
}

.active-filter-chips button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 2px 10px;
  border: 1px solid #ddd1bf;
  border-radius: 999px;
  background: #fff;
  color: #71685d;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.inventory-sort-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  margin-left: auto;
}

.inventory-sort-actions button {
  min-height: 28px;
  padding: 2px 11px;
  border: 1px solid #d8cab5;
  border-radius: 999px;
  background: #fff;
  color: #776c60;
  font-size: 12px;
  cursor: pointer;
}

.inventory-sort-actions button.active {
  border-color: #bd872e;
  background: #fff5df;
  color: #9a6519;
  font-weight: 800;
}

@media (max-width: 920px) {
  body[data-page="home"] .quick-search.page-home {
    position: relative;
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
    padding: 10px 4px 12px !important;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  body[data-page="home"] .quick-search.page-home .search-head {
    display: none;
  }

  body[data-page="home"] .quick-search.page-home .search-grid {
    display: block;
  }

  body[data-page="home"] .quick-search.page-home .mobile-inventory-search-shell {
    position: relative;
    z-index: 24;
    display: flex;
    width: 100%;
    height: 46px;
    margin: -1px 0 12px;
    align-items: stretch;
    overflow: hidden;
    border: 1.5px solid #c88d27;
    border-radius: 12px;
    background: linear-gradient(180deg, #fff 0%, #fffefb 100%);
    box-shadow:
      inset 0 0 0 1px rgba(255, 244, 213, .92),
      0 0 0 2px rgba(211, 158, 57, .24),
      0 4px 8px rgba(128, 82, 15, .24),
      0 10px 20px rgba(64, 43, 14, .15);
    transform: translateY(-3px);
  }

  .mobile-inventory-search {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 0 10px 0 14px;
  }

  .mobile-inventory-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: #15233a !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 10.75px !important;
    font-weight: 450;
    outline: 0;
  }

  .mobile-inventory-search input::placeholder {
    color: #9298a2;
    opacity: 1;
  }

  .mobile-search-icon,
  .mobile-sliders-icon {
    display: block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: currentColor;
  }

  .mobile-search-icon {
    color: #b17a1d;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 3a7.5 7.5 0 1 0 4.69 13.35l4.73 4.73 1.16-1.16-4.73-4.73A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10.5 3a7.5 7.5 0 1 0 4.69 13.35l4.73 4.73 1.16-1.16-4.73-4.73A7.5 7.5 0 0 0 10.5 3Zm0 2a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .mobile-advanced-search-toggle {
    display: inline-flex;
    flex: 0 0 78px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 9px;
    border: 0;
    border-left: 1px solid #ece7de;
    color: #13243f;
    background: #fff;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
  }

  .mobile-sliders-icon {
    width: 18px;
    height: 18px;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h7v2H4V6Zm11 0h5v2h-5V6Zm-3-2h2v6h-2V4ZM4 16h3v2H4v-2Zm7 0h9v2h-9v-2Zm-3-2h2v6H8v-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h7v2H4V6Zm11 0h5v2h-5V6Zm-3-2h2v6h-2V4ZM4 16h3v2H4v-2Zm7 0h9v2h-9v-2Zm-3-2h2v6H8v-6Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  body[data-page="home"] .quick-search.page-home .mobile-filter-strip {
    display: grid;
    grid-template-columns: .98fr .98fr .98fr 1.08fr 1.24fr;
    gap: 4px;
    width: 100%;
    margin: 0;
  }

  .mobile-filter-pill {
    position: relative;
    display: flex;
    min-width: 0;
    height: 34px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d7dce4;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(21, 35, 54, .08);
  }

  .mobile-filter-pill::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid #536075;
    border-bottom: 1.5px solid #536075;
    transform: translateY(-68%) rotate(45deg);
    pointer-events: none;
  }

  .mobile-filter-icon {
    position: absolute;
    left: 6px;
    top: 50%;
    z-index: 1;
    width: 14px;
    height: 14px;
    color: #14243d;
    background: currentColor;
    transform: translateY(-50%);
    pointer-events: none;
  }

  .mobile-filter-pill[data-filter-icon="brand"] .mobile-filter-icon {
    -webkit-mask: var(--icon-car) center / contain no-repeat;
    mask: var(--icon-car) center / contain no-repeat;
  }

  .mobile-filter-pill[data-filter-icon="year"] .mobile-filter-icon {
    -webkit-mask: var(--icon-calendar) center / contain no-repeat;
    mask: var(--icon-calendar) center / contain no-repeat;
  }

  .mobile-filter-pill[data-filter-icon="color"] .mobile-filter-icon {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.6S5.5 10.2 5.5 15.2a6.5 6.5 0 0 0 13 0C18.5 10.2 12 2.6 12 2.6Zm0 3.2c1.9 2.5 4.5 6.5 4.5 9.4a4.5 4.5 0 1 1-9 0c0-2.9 2.6-6.9 4.5-9.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2.6S5.5 10.2 5.5 15.2a6.5 6.5 0 0 0 13 0C18.5 10.2 12 2.6 12 2.6Zm0 3.2c1.9 2.5 4.5 6.5 4.5 9.4a4.5 4.5 0 1 1-9 0c0-2.9 2.6-6.9 4.5-9.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
  }

  .mobile-filter-pill[data-filter-icon="mileage"] .mobile-filter-icon {
    -webkit-mask: var(--icon-gauge) center / contain no-repeat;
    mask: var(--icon-gauge) center / contain no-repeat;
  }

  .mobile-filter-pill[data-filter-icon="displacement"] .mobile-filter-icon {
    -webkit-mask: var(--icon-engine) center / contain no-repeat;
    mask: var(--icon-engine) center / contain no-repeat;
  }

  .mobile-filter-pill select {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 15px 0 23px;
    border: 0;
    border-radius: inherit;
    color: #15233a;
    background: transparent;
    font-size: 11.5px;
    line-height: 1;
    font-weight: 850;
    appearance: none;
    outline: 0;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .field,
  body[data-page="home"] .quick-search.page-home .search-action-row {
    display: none !important;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .advanced-search-panel {
    display: block;
    margin-top: 10px;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .advanced-search-panel[hidden] {
    display: none !important;
  }

  body[data-page="home"] .advanced-search-panel label:has(select[name="color"]),
  body[data-page="home"] .advanced-search-panel label:has(select[name="displacement"]) {
    display: none;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .field {
    order: 1;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .advanced-search-panel {
    order: 2;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .price-custom-field {
    order: 3;
  }

  body[data-page="home"] .quick-search.page-home .search-grid > .monthly-custom-field {
    grid-column: 1 / -1;
    order: 3;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    order: 4;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row > .advanced-search-wrap {
    grid-column: 1 !important;
    width: 100%;
  }

  body[data-page="home"] .quick-search.page-home .search-action-row > button.red-btn {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
    height: 40px;
    padding: 0 8px;
  }

  .advanced-search-toggle {
    width: 100%;
    min-width: 0;
    justify-content: space-between;
    padding: 0 12px;
  }

  .advanced-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inventory-filter-summary {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
  }

  .inventory-sort-actions {
    margin-left: 0;
  }
}

.vehicle-photo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #ece9e3;
  color: var(--muted);
}

@media (max-width: 920px) {
  .inventory-row.is-loading,
  .inventory-row.is-empty {
    min-height: 160px;
  }
}
