/* ==========================================================================
   Yokohama Trading — Home v2
   Compact, high-density inventory-first homepage.
   All classes are prefixed with .hx- so no other page is affected.
   ========================================================================== */

:root {
  --hx-red: #db2d2e;
  --hx-red-dark: #b02021;
  --hx-red-soft: #fdecec;
  --hx-ink: #14181f;
  --hx-ink-2: #2b323c;
  --hx-slate: #6b7480;
  --hx-line: #e6e9ef;
  --hx-bg: #f4f6f9;
  --hx-card: #ffffff;
  --hx-green: #25d366;
  --hx-shadow-sm: 0 1px 2px rgba(20, 24, 31, .06), 0 2px 8px rgba(20, 24, 31, .05);
  --hx-shadow-md: 0 6px 22px rgba(20, 24, 31, .10);
  --hx-shadow-lg: 0 18px 46px rgba(20, 24, 31, .16);
  --hx-radius: 12px;
  --hx-radius-sm: 8px;
  --hx-min: 205px;
  /* card min width — driven by density toggle */
}

/* ---------- Layout primitives ---------- */
.hx-page {
  background: var(--hx-bg);
}

.hx-container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 1300px) {
  .hx-container {
    max-width: 1290px;
  }
}

@media (min-width: 1400px) {
  .hx-container {
    max-width: 1340px;
  }
}

@media (min-width: 1700px) {
  .hx-container {
    max-width: 1600px;
  }
}

.hx-section {
  padding: 38px 0;
  position: relative;
  /* the mega-menu markup floats an uncleared <section>; without this any
     block-formatting-context section below it collapses to zero width */
  clear: both;
}

.hx-section--tight {
  padding: 26px 0;
}

/* browse rails sit right under the hero — keep them as shallow as possible
   so the first row of cars is as close to the fold as it can get */
.hx-section--rails {
  padding: 24px 0 20px;
}

.hx-section--light {
  background: #ffffff;
}

.hx-section--gray {
  background: var(--hx-bg);
}

.hx-section--dark {
  background: #14181f;
  background-image: radial-gradient(1100px 460px at 12% -10%, rgba(219, 45, 46, .30), transparent 62%),
    radial-gradient(900px 420px at 92% 110%, rgba(219, 45, 46, .18), transparent 60%);
}

/* ---------- Section header (compact, left aligned) ---------- */
.hx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hx-head__titles {
  min-width: 0;
}

.hx-head--inline {
  margin-bottom: 12px;
  align-items: center;
}

.hx-head--inline h2 {
  font-size: 20px;
  text-transform: none;
}

.hx-head__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--hx-red);
  margin-bottom: 6px;
}

.hx-head__eyebrow:before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--hx-red);
  display: inline-block;
}

.hx-head h2 {
  font-family: Roboto, "Open Sans", sans-serif;
  font-size: 27px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--hx-ink);
  margin: 0;
  letter-spacing: -.01em;
}

.hx-head p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--hx-slate);
}

.hx-section--dark .hx-head h2 {
  color: #fff;
}

.hx-section--dark .hx-head p {
  color: rgba(255, 255, 255, .68);
}

.hx-head__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hx-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hx-ink-2);
  white-space: nowrap;
}

.hx-link:hover {
  color: var(--hx-red);
}

.hx-section--dark .hx-link {
  color: rgba(255, 255, 255, .82);
}

.hx-section--dark .hx-link:hover {
  color: #fff;
}

/* ---------- Buttons ---------- */
.hx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
  text-decoration: none !important;
  line-height: 1.1;
}

.hx-btn:hover {
  transform: translateY(-2px);
}

.hx-btn--red {
  background: var(--hx-red);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(219, 45, 46, .28);
}

.hx-btn--red:hover {
  background: var(--hx-red-dark);
  box-shadow: 0 12px 26px rgba(219, 45, 46, .36);
}

.hx-btn--ghost {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .38);
  color: #fff !important;
  backdrop-filter: blur(4px);
}

.hx-btn--ghost:hover {
  background: #fff;
  color: var(--hx-ink) !important;
  border-color: #fff;
}

.hx-btn--dark {
  background: var(--hx-ink);
  color: #fff !important;
}

.hx-btn--dark:hover {
  background: #000;
}

.hx-section--dark .hx-btn--dark {
  background: #fff;
  color: var(--hx-ink) !important;
}

.hx-section--dark .hx-btn--dark:hover {
  background: var(--hx-red);
  color: #fff !important;
}

.hx-btn--block {
  width: 100%;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hx-hero {
  position: relative;
  overflow: hidden;
  background: #0d1016;
  isolation: isolate;
  /* see .hx-section — clears the floated mega-menu section above */
  clear: both;
  width: 100%;
}

.hx-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hx-hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s ease, transform 8s linear;
}

.hx-hero__slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hx-hero__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(102deg, rgba(10, 13, 18, .93) 0%, rgba(10, 13, 18, .80) 36%, rgba(10, 13, 18, .46) 66%, rgba(10, 13, 18, .66) 100%);
}

.hx-hero__glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(720px 340px at 8% 18%, rgba(219, 45, 46, .34), transparent 60%);
  pointer-events: none;
}

.hx-hero__inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 42px;
}

.hx-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 34px;
  align-items: center;
}

/* Hero copy */
.hx-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px 6px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.hx-hero__badge i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--hx-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.hx-hero h1 {
  font-family: Roboto, "Open Sans", sans-serif;
  font-size: 46px;
  line-height: 1.07;
  font-weight: 800;
  color: #fff;
  margin: 16px 0 12px;
  letter-spacing: -.022em;
}

.hx-hero h1 span {
  color: var(--hx-red);
  position: relative;
  white-space: nowrap;
}

.hx-hero__lead {
  color: rgba(255, 255, 255, .78);
  font-size: 14.5px;
  line-height: 1.62;
  max-width: 540px;
  margin: 0 0 20px;
}

.hx-hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hx-trust {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}

.hx-trust__item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.hx-trust__icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hx-red);
  font-size: 15px;
  flex: none;
}

.hx-trust__body {
  display: block;
  min-width: 0;
}

.hx-trust__num {
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  font-family: Roboto, sans-serif;
}

.hx-trust__label {
  display: block;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .58);
}

/* ---------- Hero search card ---------- */
.hx-search {
  background: rgba(255, 255, 255, .97);
  border-radius: 14px;
  box-shadow: var(--hx-shadow-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
}

.hx-search__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 18px;
  background: linear-gradient(100deg, var(--hx-red) 0%, #a81f20 100%);
  color: #fff;
}

.hx-search__head strong {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .015em;
  display: flex;
  align-items: center;
  gap: 9px;
}

.hx-search__count {
  font-size: 11.5px;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 4px 11px;
  font-weight: 600;
  white-space: nowrap;
}

.hx-search__body {
  padding: 16px 18px 18px;
}

.hx-search__row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 11px;
}

.hx-field {
  min-width: 0;
}

.hx-field > span,
.hx-field > label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--hx-slate);
  margin: 0 0 5px;
}

.hx-field select,
.hx-field .selectpicker {
  width: 100%;
  height: 40px;
  border: 1px solid var(--hx-line);
  border-radius: 8px;
  background: #f7f8fa;
  padding: 0 30px 0 11px;
  font-size: 13px;
  color: var(--hx-ink-2);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7480' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  text-overflow: ellipsis;
}

.hx-field select:hover {
  border-color: #cfd5de;
}

.hx-field select:focus {
  border-color: var(--hx-red);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(219, 45, 46, .12);
}

/* price range — the input has to sit directly before #slider-range in the DOM,
   so the label / value / track row is laid out with flex wrapping instead. */
.hx-price {
  padding-top: 3px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 10px;
}

.hx-price__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--hx-slate);
  margin: 0 0 9px;
  flex: 1 1 auto;
}

.hx-price input.amount {
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--hx-ink);
  text-align: right;
  width: auto;
  max-width: 62%;
  padding: 0;
  margin: 0 0 9px;
  flex: 0 1 auto;
  cursor: default;
}

.hx-price #slider-range,
.hx-price .hx-search__actions {
  flex: 0 0 100%;
}

.hx-search #slider-range.ui-slider {
  height: 5px;
  background: #e9ecf1;
  border: 0;
  border-radius: 999px;
  margin: 4px 6px 18px;
}

.hx-search #slider-range .ui-slider-range {
  background: var(--hx-red);
  border-radius: 999px;
}

.hx-search #slider-range .ui-slider-handle {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--hx-red);
  top: -6px;
  margin-left: -8px;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .15s ease;
}

.hx-search #slider-range .ui-slider-handle:hover,
.hx-search #slider-range .ui-slider-handle:focus {
  transform: scale(1.14);
}

.hx-search__actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.hx-search__adv {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--hx-slate);
  white-space: nowrap;
}

.hx-search__adv:hover {
  color: var(--hx-red);
}

/* ---------- Popular chips under hero ---------- */
.hx-pop {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 0 22px;
}

.hx-pop__label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  font-weight: 700;
}

.hx-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .88) !important;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}

.hx-chip:hover {
  background: var(--hx-red);
  border-color: var(--hx-red);
  color: #fff !important;
  transform: translateY(-2px);
}

/* ==========================================================================
   QUICK LINKS STRIP (keeps .quick-links markup for garage enhancement)
   ========================================================================== */
.hx-quick {
  position: relative;
  z-index: 5;
  margin-top: -26px;
  padding-bottom: 6px;
  clear: both;
}

/* neutralise the legacy .quick-links block (290px min-height, 80px icon circles) */
.hx-quick.quick-links {
  min-height: 0;
  margin-bottom: 0;
}

.hx-quick.quick-links .link a {
  background: transparent;
  border: 0;
  margin: 0;
}

.hx-quick.quick-links .link a i {
  width: auto;
  height: auto;
  line-height: 1;
  margin: 0;
  border: 0;
  border-radius: 0;
  font-size: 18px;
}

.hx-quick.quick-links .link a:hover h6 {
  padding-top: 0;
  color: #fff;
}

.hx-quick .quick-links-inner {
  background: #fff;
  border-radius: var(--hx-radius);
  box-shadow: var(--hx-shadow-md);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--hx-line);
}

.hx-quick .link a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 8px;
  color: var(--hx-ink-2);
  border-right: 1px solid var(--hx-line);
  transition: background .2s ease, color .2s ease;
  height: 100%;
  text-align: left;
}

.hx-quick .link:last-child a {
  border-right: 0;
}

.hx-quick .link a i {
  font-size: 18px;
  color: var(--hx-red);
  transition: transform .25s ease;
  flex: none;
}

.hx-quick .link a h6 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  color: inherit;
  line-height: 1.25;
  letter-spacing: .005em;
}

.hx-quick .link a:hover {
  background: var(--hx-red);
  color: #fff;
}

.hx-quick .link a:hover i {
  color: #fff;
  transform: scale(1.15);
}

/* ==========================================================================
   BROWSE PANELS (makes / body types)
   ========================================================================== */
.hx-browse {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hx-browse__panel {
  background: #fff;
  border: 1px solid var(--hx-line);
  border-radius: 14px;
  padding: 16px 18px 18px;
}

.hx-browse__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--hx-line);
}

.hx-browse__head h2 {
  font-family: Roboto, "Open Sans", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hx-ink);
  margin: 0;
  letter-spacing: -.01em;
}

/* wrapping item grid — columns size themselves, so nothing scrolls sideways */
.hx-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 2px 6px;
}

.hx-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 9px;
  border-radius: 7px;
  min-width: 0;
  cursor: pointer;
  color: var(--hx-ink-2) !important;
  transition: background .16s ease, color .16s ease;
}

.hx-tile:hover {
  background: rgba(219, 45, 46, .07);
  color: var(--hx-red) !important;
}

.hx-tile i {
  flex: 0 0 auto;
  width: 15px;
  font-size: 13px;
  text-align: center;
  color: var(--hx-slate);
  transition: color .16s ease;
}

.hx-tile:hover i {
  color: var(--hx-red);
}

/* make badges: muted at rest so 20-odd brand colours do not shout, full
   colour on hover */
.hx-tile__logo {
  flex: 0 0 auto;
  width: 22px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hx-tile__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .7;
  transition: filter .16s ease, opacity .16s ease;
}

.hx-tile:hover .hx-tile__logo img {
  filter: none;
  opacity: 1;
}

/* logo file missing / not yet added for this brand */
.hx-tile__logo.is-empty:before {
  content: "\f1b9";
  font-family: FontAwesome;
  font-size: 12px;
  color: var(--hx-slate);
}

.hx-tile:hover .hx-tile__logo.is-empty:before {
  color: var(--hx-red);
}

.hx-tile strong {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   FILTER TABS + DENSITY TOGGLE
   ========================================================================== */
.hx-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}

.hx-tabs::-webkit-scrollbar {
  height: 4px;
}

.hx-tabs::-webkit-scrollbar-thumb {
  background: #d3d8e0;
  border-radius: 999px;
}

.hx-tab {
  flex: 0 0 auto;
  border: 1px solid var(--hx-line);
  background: #fff;
  color: var(--hx-ink-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}

.hx-tab:hover {
  border-color: #b9c0cb;
  color: var(--hx-ink);
}

.hx-tab.is-active {
  background: var(--hx-red);
  border-color: var(--hx-red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(219, 45, 46, .26);
}

.hx-density {
  display: inline-flex;
  background: #eef0f4;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.hx-density button {
  border: 0;
  background: transparent;
  border-radius: 6px;
  width: 32px;
  height: 28px;
  color: var(--hx-slate);
  cursor: pointer;
  font-size: 12px;
  transition: all .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hx-density button.is-active {
  background: #fff;
  color: var(--hx-red);
  box-shadow: var(--hx-shadow-sm);
}

.hx-section--dark .hx-density {
  background: rgba(255, 255, 255, .10);
}

.hx-section--dark .hx-density button {
  color: rgba(255, 255, 255, .65);
}

.hx-section--dark .hx-density button.is-active {
  background: rgba(255, 255, 255, .95);
  color: var(--hx-red);
}

/* ==========================================================================
   CAR GRID + COMPACT CARD
   ========================================================================== */
.hx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--hx-min), 1fr));
  gap: 14px;
}

[data-density="compact"] {
  --hx-min: 196px;
}

[data-density="cozy"] {
  --hx-min: 252px;
}

.hx-card {
  position: relative;
  background: var(--hx-card);
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  animation: hxFadeUp .45s both;
}

.hx-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hx-shadow-md);
  border-color: #d7dce4;
}

@keyframes hxFadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* image */
.hx-card__media-wrap {
  position: relative;
  overflow: hidden;
}

.hx-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eceff3;
}

.hx-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.hx-card:hover .hx-card__media img {
  transform: scale(1.07);
}

.hx-card__shade {
  position: absolute;
  inset: auto 0 0 0;
  height: 52%;
  background: linear-gradient(to top, rgba(10, 13, 18, .62), transparent);
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}

.hx-card:hover .hx-card__shade {
  opacity: 1;
}

.hx-card__view {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -46%);
  background: rgba(255, 255, 255, .96);
  color: var(--hx-ink) !important;
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}

.hx-card:hover .hx-card__view {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* badges */
.hx-card__badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  z-index: 3;
}

.hx-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  backdrop-filter: blur(3px);
  line-height: 1.5;
}

.hx-badge--year {
  background: rgba(20, 24, 31, .78);
}

.hx-badge--deal {
  background: var(--hx-red);
  box-shadow: 0 3px 10px rgba(219, 45, 46, .4);
}

.hx-badge--feature {
  background: #f0a202;
  color: #221800;
}

.hx-badge--stock {
  background: rgba(37, 211, 102, .92);
}

/* favorite / share group override for compact cards */
.hx-card .favorite-share-group {
  top: 8px !important;
  right: 8px !important;
  gap: 6px !important;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .22s ease, transform .22s ease;
}

.hx-card:hover .favorite-share-group,
.hx-card .favorite-share-group:focus-within {
  opacity: 1;
  transform: none;
}

.hx-card .favorite-share-group .favorite-toggle.is-active {
  opacity: 1;
}

.hx-card .favorite-share-group .favorite-toggle,
.hx-card .favorite-share-group .share-toggle {
  width: 30px !important;
  height: 30px !important;
  font-size: 12px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .18) !important;
}

/* keep an active favorite always visible */
.hx-card .favorite-share-group:has(.favorite-toggle.is-active) {
  opacity: 1;
  transform: none;
}

/* body */
.hx-card__body {
  padding: 10px 11px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.hx-card__title {
  margin: 0 0 7px;
  font-size: 13px;
  line-height: 1.36;
  font-weight: 700;
  min-height: 35px;
}

.hx-card__title a {
  color: var(--hx-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hx-card__title a:hover {
  color: var(--hx-red);
}

.hx-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 5px;
  margin: 0 0 9px;
  padding: 0;
  list-style: none;
}

.hx-specs li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--hx-slate);
  background: #f3f5f8;
  border-radius: 5px;
  padding: 3px 6px;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hx-specs li i {
  font-size: 10.5px;
  color: #9aa3af;
}

.hx-card__foot {
  margin-top: auto;
  padding: 0 0 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.hx-price-tag {
  display: block;
  min-width: 0;
}

.hx-price-tag small {
  display: block;
  font-size: 9.5px;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #9aa3af;
  font-weight: 700;
  line-height: 1.4;
}

.hx-price-tag strong {
  display: block;
  font-family: Roboto, sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: var(--hx-red);
  line-height: 1.15;
  letter-spacing: -.015em;
  white-space: nowrap;
}

/* compare button (markup comes from api.js) */
.hx-card .car-compare-action {
  flex: none;
}

.hx-card .compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--hx-line);
  background: #fff;
  color: var(--hx-slate);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}

.hx-card .compare-toggle:hover:not(:disabled) {
  border-color: var(--hx-red);
  color: var(--hx-red);
}

.hx-card .compare-toggle.is-selected {
  background: var(--hx-red);
  border-color: var(--hx-red);
  color: #fff;
}

.hx-card .compare-toggle:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* action bar */
.hx-card__bar {
  display: flex;
  border-top: 1px solid var(--hx-line);
}

.hx-card__bar > * {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  border: 0;
  background: #fff;
  color: var(--hx-slate) !important;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
  border-right: 1px solid var(--hx-line);
  /* size by label width, then share leftover space evenly, so the
     longest label ("WhatsApp") is never clipped */
  flex: 1 1 auto;
  min-width: 0;
}

.hx-card__bar > *:last-child {
  border-right: 0;
}

.hx-card__bar i {
  font-size: 12px;
}

.hx-card__bar .hx-act--wa:hover {
  background: var(--hx-green);
  color: #fff !important;
}

.hx-card__bar .hx-act--view:hover {
  background: var(--hx-ink);
  color: #fff !important;
}

.hx-card__bar .hx-act--ask:hover {
  background: var(--hx-red);
  color: #fff !important;
}

/* dark section cards keep white surface */
.hx-section--dark .hx-card {
  border-color: rgba(255, 255, 255, .08);
}

/* ---------- Skeletons / states ---------- */
.hx-skel {
  border-radius: var(--hx-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--hx-line);
}

.hx-skel__img {
  aspect-ratio: 4 / 3;
}

.hx-skel__line {
  height: 10px;
  border-radius: 4px;
  margin: 10px 11px;
}

.hx-skel__line--sm {
  width: 55%;
}

.hx-shimmer {
  background: linear-gradient(90deg, #eef1f5 25%, #e3e7ed 37%, #eef1f5 63%);
  background-size: 400% 100%;
  animation: hxShimmer 1.3s ease-in-out infinite;
}

@keyframes hxShimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0 50%;
  }
}

.hx-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  background: #fff;
  border: 1px dashed var(--hx-line);
  border-radius: var(--hx-radius);
  color: var(--hx-slate);
}

.hx-empty i {
  font-size: 30px;
  color: #c6ccd6;
  display: block;
  margin-bottom: 10px;
}

.hx-empty strong {
  display: block;
  color: var(--hx-ink);
  font-size: 15px;
  margin-bottom: 5px;
}

.hx-section--dark .hx-empty {
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .7);
}

.hx-section--dark .hx-empty strong {
  color: #fff;
}

.hx-more {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* ==========================================================================
   STATS BAND
   ========================================================================== */
.hx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hx-stat {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--hx-radius);
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all .22s ease;
}

.hx-stat:hover {
  background: rgba(255, 255, 255, .09);
  transform: translateY(-3px);
}

.hx-stat__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(219, 45, 46, .16);
  color: var(--hx-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  flex: none;
}

.hx-stat__body {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.hx-stat__num {
  display: block;
  font-family: Roboto, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  white-space: nowrap;
}

.hx-stat__label {
  display: block;
  font-size: 11.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   USP / HOW IT WORKS
   ========================================================================== */
.hx-usp {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.hx-usp__item {
  background: #fff;
  border: 1px solid var(--hx-line);
  border-radius: var(--hx-radius);
  padding: 20px 18px;
  position: relative;
  overflow: hidden;
  transition: all .22s ease;
}

.hx-usp__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--hx-shadow-md);
  border-color: transparent;
}

.hx-usp__item:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: var(--hx-red);
  transition: width .35s ease;
}

.hx-usp__item:hover:before {
  width: 100%;
}

.hx-usp__step {
  position: absolute;
  right: 14px;
  top: 10px;
  font-family: Roboto, sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #f1f3f7;
  line-height: 1;
}

.hx-usp__icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--hx-red-soft);
  color: var(--hx-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 12px;
}

.hx-usp__item h6 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--hx-ink);
  margin: 0 0 6px;
}

.hx-usp__item p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--hx-slate);
  margin: 0;
}

/* ==========================================================================
   TRACKING + TESTIMONIALS + CTA
   ========================================================================== */
.hx-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hx-track a {
  background: #fff;
  border: 1px solid var(--hx-line);
  border-radius: 10px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  transition: all .22s ease;
  filter: grayscale(1);
  opacity: .72;
}

.hx-track a:hover {
  filter: none;
  opacity: 1;
  border-color: var(--hx-red);
  transform: translateY(-3px);
  box-shadow: var(--hx-shadow-sm);
}

.hx-track img {
  max-width: 100%;
  max-height: 46px;
  object-fit: contain;
}

.hx-quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.hx-quote {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: var(--hx-radius);
  padding: 20px;
  transition: all .22s ease;
}

.hx-quote:hover {
  background: rgba(255, 255, 255, .09);
  transform: translateY(-3px);
}

.hx-quote__stars {
  color: #f5b301;
  font-size: 12px;
  margin-bottom: 9px;
  letter-spacing: 1px;
}

.hx-quote p {
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 15px;
}

.hx-quote__who {
  display: flex;
  align-items: center;
  gap: 11px;
}

.hx-quote__who img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, .2);
}

.hx-quote__body {
  display: block;
  min-width: 0;
}

.hx-quote__who strong {
  display: block;
  color: #fff;
  font-size: 13px;
}

.hx-quote__who .hx-quote__body span {
  display: block;
  font-size: 11px;
  color: rgba(255, 255, 255, .5);
  letter-spacing: .05em;
  text-transform: uppercase;
}

.hx-cta {
  background: linear-gradient(100deg, var(--hx-red) 0%, #96191a 100%);
  border-radius: 14px;
  padding: 28px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  box-shadow: 0 16px 40px rgba(219, 45, 46, .26);
  position: relative;
  overflow: hidden;
}

.hx-cta:after {
  content: "\f1b9";
  font-family: FontAwesome;
  position: absolute;
  right: 28px;
  bottom: -22px;
  font-size: 120px;
  color: rgba(255, 255, 255, .09);
  line-height: 1;
  pointer-events: none;
}

.hx-cta h3 {
  color: #fff;
  font-family: Roboto, sans-serif;
  font-size: 23px;
  font-weight: 800;
  margin: 0 0 5px;
  letter-spacing: -.01em;
}

.hx-cta p {
  color: rgba(255, 255, 255, .84);
  margin: 0;
  font-size: 13.5px;
  max-width: 620px;
}

.hx-cta__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hx-btn--white {
  background: #fff;
  color: var(--hx-red) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}

.hx-btn--white:hover {
  background: var(--hx-ink);
  color: #fff !important;
}

.hx-btn--wa {
  background: var(--hx-green);
  color: #fff !important;
}

.hx-btn--wa:hover {
  background: #17a74f;
}

/* ==========================================================================
   HEADER TWEAKS (home only)
   ========================================================================== */
.hx-page .topbar {
  padding: 6px 0;
  font-size: 12.5px;
}

.hx-page .topbar ul li {
  margin-bottom: 0;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1199px) {
  .hx-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 26px;
  }

  .hx-hero h1 {
    font-size: 38px;
  }

  .hx-quick .quick-links-inner {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hx-quick .link:nth-child(3) a {
    border-right: 0;
  }

  .hx-quick .link:nth-child(-n+3) a {
    border-bottom: 1px solid var(--hx-line);
  }
}

@media (max-width: 991px) {
  .hx-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hx-hero__inner {
    padding: 34px 0 40px;
  }

  .hx-hero h1 {
    font-size: 33px;
  }

  .hx-hero__lead {
    font-size: 13.5px;
  }

  .hx-search {
    max-width: 640px;
  }

  .hx-stats,
  .hx-usp {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hx-quotes {
    grid-template-columns: minmax(0, 1fr);
  }

  .hx-browse {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .hx-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hx-section {
    padding: 32px 0;
  }

  .hx-head h2 {
    font-size: 23px;
  }
}

@media (max-width: 767px) {
  [data-density="compact"],
  [data-density="cozy"] {
    --hx-min: 156px;
  }

  .hx-browse__panel {
    padding: 14px 14px 16px;
  }

  .hx-rail {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }

  .hx-grid {
    gap: 10px;
  }

  .hx-hero h1 {
    font-size: 28px;
    margin: 12px 0 10px;
  }

  .hx-hero__inner {
    padding: 26px 0 32px;
  }

  .hx-trust {
    gap: 14px;
  }

  .hx-trust__item {
    flex: 1 1 44%;
  }

  .hx-search__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hx-search__body {
    padding: 14px 13px 15px;
  }

  .hx-quick {
    margin-top: -18px;
  }

  .hx-quick .quick-links-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hx-quick .link a {
    padding: 13px 8px;
    border-right: 1px solid var(--hx-line);
    border-bottom: 1px solid var(--hx-line);
  }

  .hx-quick .link:nth-child(2n) a {
    border-right: 0;
  }

  .hx-card__title {
    font-size: 12.5px;
    min-height: 34px;
  }

  .hx-price-tag strong {
    font-size: 15px;
  }

  /* keep price + compare on one line inside narrow cards */
  .hx-card .compare-toggle {
    padding: 5px 7px;
  }

  .hx-card .compare-toggle__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .hx-trust__label {
    font-size: 9.5px;
    letter-spacing: .04em;
  }

  .hx-trust__num {
    font-size: 15px;
  }

  /* compact topbar: keep the contact essentials only */
  .hx-page .topbar .topbar-left li:nth-child(2),
  .hx-page .topbar .topbar-right li:nth-child(n+3) {
    display: none;
  }

  .hx-quick .link:nth-last-child(-n+2) a {
    border-bottom: 0;
  }

  .hx-card__bar > * {
    font-size: 0;
    gap: 0;
    padding: 9px 4px;
  }

  .hx-card__bar i {
    font-size: 14px;
  }

  .hx-cta {
    padding: 22px 20px;
  }

  .hx-cta h3 {
    font-size: 19px;
  }

  .hx-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hx-price input.amount {
    font-size: 12px;
  }

  /* touch devices: always show favourite/share */
  .hx-card .favorite-share-group {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 479px) {
  .hx-stats,
  .hx-usp {
    grid-template-columns: minmax(0, 1fr);
  }

  .hx-search__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hx-hero__cta .hx-btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hx-card,
  .hx-hero__slide,
  .hx-shimmer {
    animation: none !important;
    transition: none !important;
  }
}
