/* Neighbourcar shared styles — based on v3-garage */
:root {
  --ink: #1a1612;
  --brown: #3d342b;
  --clay: #e63f28;
  --clay-dark: #c2341f;
  --cream: #f0ebe3;
  --warm: #e8dfd3;
  --mute: #6b6258;
  --line: #ebebeb;
  --white: #fff;
  --nc-topbar-h: 59px;
  --radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Noto Sans TC", sans-serif;
  color: var(--ink);
  line-height: 1.6;
}
img {
  display: block;
  max-width: 100%;
  width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 4vw;
  background: var(--ink);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 12;
}
.logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.logo span {
  color: var(--clay);
}
.site-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.topbar .site-logo img {
  height: 2.8rem;
}
.site-logo img {
  display: block;
  height: 1.85rem;
  width: auto;
}
.site-logo--hero {
  display: block;
  margin-bottom: 0.85rem;
  animation: up 0.7s ease both;
}
.site-logo--hero img {
  height: clamp(2.6rem, 7vw, 4rem);
  width: auto;
}
.site-logo--on-light {
  background: var(--ink);
  padding: 0.45rem 0.7rem;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.88rem;
}
.topbar-actions a:hover {
  color: var(--clay);
}

/* Hero — compact, inventory-forward */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--brown);
  color: var(--cream);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: drift 16s ease-out forwards;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(26, 22, 18, 0.88) 0%,
    rgba(26, 22, 18, 0.5) 50%,
    rgba(26, 22, 18, 0.28) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 3rem 4vw 3.5rem;
  max-width: 640px;
}
.hero h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 0.55rem;
  animation: up 0.7s 0.08s ease both;
}
.hero p {
  opacity: 0.82;
  margin-bottom: 1.4rem;
  max-width: 28rem;
  animation: up 0.7s 0.14s ease both;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  font-weight: 700;
  font-size: 0.92rem;
  background: var(--clay);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s;
  animation: up 0.7s 0.2s ease both;
}
.btn:hover {
  background: var(--clay-dark);
  transform: translateY(-2px);
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(240, 235, 227, 0.5);
  color: var(--cream);
  margin-left: 0.5rem;
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
}

.is-hidden {
  display: none !important;
}

/* Search panel */
.search-panel {
  background: #555555;
  border-bottom: 1px solid #444;
  color: #fff;
  padding: 1.25rem 4vw 1.35rem;
  position: sticky;
  top: calc(var(--nc-topbar-h) - 1px);
  z-index: 11;
  overflow: visible;
}
.search-panel--detail {
  z-index: 11;
  box-shadow: 0 8px 20px rgba(26, 22, 18, 0.18);
}
.search-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  overflow: visible;
}
.search-to-garage {
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}
.search-to-garage:hover {
  text-decoration: underline;
}
.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 30;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 32px rgba(26, 22, 18, 0.12);
  max-height: min(420px, 60vh);
  overflow: auto;
}
.search-results.is-hidden,
.search-results[hidden] {
  display: none;
}
.search-result-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--line);
  color: inherit;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: var(--cream);
}
.search-result-item img {
  width: 88px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--warm);
}
.search-result-item h3 {
  font-size: 0.92rem;
  line-height: 1.3;
  margin-bottom: 0.2rem;
}
.search-result-item p {
  font-size: 0.78rem;
  color: var(--mute);
}
.search-result-item .price {
  font-size: 1rem;
  white-space: nowrap;
}
.search-results-foot {
  padding: 0.75rem 0.9rem;
  border-top: 1px solid var(--line);
  background: var(--cream);
  font-size: 0.86rem;
}
.search-results-foot a {
  font-weight: 700;
  color: var(--clay);
}
.search-results-empty {
  padding: 1.1rem 0.9rem;
  color: var(--mute);
  font-size: 0.9rem;
  text-align: center;
}
.search-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.search-form input[type="search"] {
  flex: 1;
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.95rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.search-form input[type="search"]:focus {
  border-color: var(--clay);
}
.search-form input[type="search"]::placeholder {
  color: #9a9086;
}
.search-form button[type="submit"] {
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.35rem;
  background: var(--clay);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.search-form button[type="submit"]:hover {
  background: var(--clay-dark);
}

.filters-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  max-width: 4.8rem;
  margin: 0;
  padding: 0.15rem 0.2rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}
.filters-toggle-label {
  display: block;
}
.filters-toggle:hover,
.filters-toggle:focus-visible {
  background: transparent;
  border: none;
  color: #fff;
  outline: none;
}
.filters-toggle-icon {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.08rem);
  transition: transform 0.2s ease;
}
.filters-toggle[aria-expanded="true"] .filters-toggle-icon {
  transform: rotate(-135deg) translateY(-0.08rem);
}
.filters-toggle.has-active {
  border: none;
  background: transparent;
  color: #f0c9b0;
}
.attr-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 0.6rem 0.85rem;
  width: 100%;
  overflow: visible;
}
.attr-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mute);
}
.search-panel .attr-filters label {
  color: #fff;
  font-weight: 400;
}
.search-panel .search-form input[type="search"],
.search-panel .attr-filters select,
.search-panel .attr-filters input[type="number"],
.search-panel .range-trigger {
  color: #9a9086;
  background-color: var(--white);
  font-weight: 400;
}
.search-panel .attr-filters select option {
  color: #9a9086;
  background: var(--white);
  font-weight: 400;
}
.search-panel .search-form button[type="submit"] {
  font-weight: 400;
}
.attr-filters select,
.attr-filters input[type="number"],
.range-trigger {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.84rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
  min-width: 7rem;
}
.attr-filters select,
.range-trigger {
  padding-right: 1.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6258' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  appearance: none;
  cursor: pointer;
}
.attr-filters select:hover,
.attr-filters select:focus,
.attr-filters input[type="number"]:hover,
.attr-filters input[type="number"]:focus,
.range-trigger:hover,
.range-trigger:focus,
.range-filter.is-open .range-trigger {
  border-color: var(--clay);
}
.attr-filters select.is-filtered,
.attr-filters input[type="number"].is-filtered,
.range-filter.is-filtered .range-trigger {
  border-color: var(--clay);
}
.filter-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mute);
}
.search-panel .filter-label {
  color: #fff;
  font-weight: 400;
}
.range-filter {
  position: relative;
  min-width: 7rem;
}
.range-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 2.2rem;
  text-align: left;
  color: inherit;
}
.range-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 8.5rem;
}
.range-dropdown {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  z-index: 30;
  min-width: 16.5rem;
  padding: 0.85rem 0.85rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.16);
}
.range-dropdown[hidden] {
  display: none !important;
}
.range-slider {
  position: relative;
  height: 1.6rem;
  margin: 0.15rem 0 0.85rem;
}
.range-slider-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 999px;
  background: #e6e0d7;
  pointer-events: none;
}
.range-slider-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  right: 0%;
  border-radius: inherit;
  background: var(--clay);
}
.range-slider input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}
.range-slider .range-slider-min {
  z-index: 3;
}
.range-slider .range-slider-max {
  z-index: 4;
}
.range-slider input[type="range"].is-active {
  z-index: 5;
}
.range-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: none;
}
.range-slider input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
  border: none;
}
.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid var(--clay);
  background: #fff;
  box-shadow: 0 1px 4px rgba(26, 22, 18, 0.18);
  cursor: grab;
  pointer-events: auto;
}
.range-slider input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--clay);
  background: #fff;
  box-shadow: 0 1px 4px rgba(26, 22, 18, 0.18);
  cursor: grab;
  pointer-events: auto;
}
.range-slider input[type="range"]:active::-webkit-slider-thumb,
.range-slider input[type="range"]:active::-moz-range-thumb {
  cursor: grabbing;
}
.range-inputs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.range-inputs input[type="number"] {
  width: 5rem;
  min-width: 0;
  flex: 1 1 auto;
  border-radius: var(--radius);
}
.range-sep {
  color: #9a9086;
  font-size: 0.85rem;
  line-height: 1;
}
.range-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
}
.range-actions button {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7f3ec;
  color: #3f3a34;
  font: inherit;
  font-size: 0.8rem;
  padding: 0.4rem 0.5rem;
  cursor: pointer;
}
.range-actions .range-apply {
  background: var(--clay);
  border-color: var(--clay);
  color: #fff;
}
.search-panel-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.filter-count {
  font-size: 0.88rem;
  color: var(--mute);
}
.search-panel .filter-count {
  color: #fff;
  font-weight: 400;
}
.filter-empty {
  display: none;
  text-align: center;
  color: var(--mute);
  padding: 2rem 0 0.5rem;
  grid-column: 1 / -1;
}
.filter-empty.is-visible {
  display: block;
}
@media (max-width: 600px) {
  .filters-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 0.15rem;
  }
  .filters-toggle-icon {
    transform: rotate(45deg) translateY(-0.05rem);
  }
  .filters-toggle[aria-expanded="true"] .filters-toggle-icon {
    transform: rotate(-135deg) translateY(-0.02rem);
  }
  .attr-filters {
    display: none;
  }
  .search-panel.is-filters-open .attr-filters {
    display: flex;
  }
  .attr-filters label,
  .attr-filters .range-filter {
    flex: 1 1 calc(50% - 0.6rem);
    min-width: 0;
  }
  .attr-filters select,
  .range-trigger {
    width: 100%;
    min-width: 0;
  }
  .range-dropdown {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
  }
}

/* Content width */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Garage grid */
.garage {
  padding: 2.5rem 4vw 3rem;
}
.garage-hot {
  padding-top: 2.75rem;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid var(--line);
}
.garage-regular {
  padding-top: 2.75rem;
  padding-bottom: 4rem;
}
.garage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.garage-head h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.garage-head p {
  width: 100%;
  margin-top: -0.65rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  color: var(--mute);
}
.garage-head a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--clay);
}

.grid {
  display: grid;
  gap: 1.25rem;
}
.grid-hot {
  grid-template-columns: repeat(3, 1fr);
}
.grid-regular {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1000px) {
  .grid-hot,
  .grid-regular {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .grid-hot,
  .grid-regular {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(26, 22, 18, 0.1);
}
.card-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--warm);
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-img img {
  transform: scale(1.05);
}
.card-body {
  padding: 1.15rem 1.2rem 1.35rem;
}
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.35rem;
}
.card-body h3 {
  font-size: 1.02rem;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}
.vehicle-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  list-style: none;
}
.vehicle-specs li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--mute);
}
.vehicle-specs svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  stroke: var(--clay);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.meta {
  font-size: 0.82rem;
  color: var(--mute);
  margin-bottom: 0.85rem;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 0.75rem;
}
.price {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.1;
  color: var(--clay);
}
.price small {
  font-family: "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--mute);
  display: block;
  margin-top: 0.15rem;
}
.vehicle-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--clay);
  background: #f3f3f3;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.28rem 0.5rem;
  white-space: nowrap;
}
.link-more {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--clay);
}

/* Brands */
.brands {
  padding: 2rem 4vw 3.5rem;
  border-top: 1px solid var(--line);
}
.brands h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}
.brand-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.brand-chip {
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 500;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.brand-chip:hover {
  border-color: var(--clay);
  color: var(--clay);
}

.garage-more {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}
.garage-more .btn {
  animation: none;
  min-width: 12rem;
}

/* Floating WhatsApp */
.wa-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 1.1rem 0.7rem 0.75rem;
  background: #25d366;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(26, 22, 18, 0.22);
  transition:
    transform 0.2s,
    background 0.2s;
}
.wa-float:hover {
  background: #1ebe57;
  transform: translateY(-2px);
}
.wa-float svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: currentColor;
}
@media (max-width: 600px) {
  .wa-float span {
    display: none;
  }
  .wa-float {
    padding: 0.75rem;
    border-radius: 50%;
  }
}

/* CTA */
.cta {
  text-align: center;
  padding: 3.5rem 4vw;
  background: var(--clay);
  color: var(--white);
}
.cta h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  margin-bottom: 0.5rem;
}
.cta p {
  opacity: 0.9;
  margin-bottom: 1.25rem;
}
.cta .btn {
  background: var(--ink);
  animation: none;
}

footer {
  padding: 2.5rem 4vw;
  font-size: 0.85rem;
  background: var(--ink);
  color: rgba(240, 235, 227, 0.78);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem 2rem;
}
footer .site-logo img {
  height: 3.1rem;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(240, 235, 227, 0.28);
  border-radius: var(--radius);
  color: var(--cream);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.footer-social a:hover {
  background: rgba(230, 63, 40, 0.18);
  border-color: var(--clay);
  color: #fff;
}
.footer-social svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
  text-align: right;
}
.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(240, 235, 227, 0.9);
  transition: color 0.2s;
}
.footer-contact:hover {
  color: #fff;
}
.footer-contact svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  fill: currentColor;
}
.footer-copy {
  margin-top: 0.2rem;
  opacity: 0.72;
}
@media (max-width: 700px) {
  footer .wrap {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-meta {
    align-items: flex-start;
    text-align: left;
  }
}

@keyframes drift {
  from {
    transform: scale(1.05) translateX(1%);
  }
  to {
    transform: scale(1) translateX(0);
  }
}
@keyframes up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== Vehicle detail (Carro-inspired layout) ========== */
.page-detail {
  padding: 1.25rem 4vw 5.5rem;
}

.detail-crumb {
  font-size: 0.85rem;
  color: var(--mute);
  margin-bottom: 1.15rem;
}
.detail-crumb a {
  color: var(--clay);
  font-weight: 700;
}
.detail-crumb a:hover {
  text-decoration: underline;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 1.5rem 2rem;
  align-items: start;
  margin-bottom: 1.75rem;
}
@media (max-width: 960px) {
  .detail-hero {
    grid-template-columns: 1fr;
  }
}

.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.detail-main-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.detail-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-all-photos {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  background: rgba(26, 22, 18, 0.82);
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  z-index: 2;
}
.detail-all-photos:hover {
  background: rgba(26, 22, 18, 0.95);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.photo-lightbox[hidden] {
  display: none !important;
}
.photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, 0.88);
}
.photo-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 4.5rem);
  object-fit: contain;
  border-radius: var(--radius);
  background: #111;
}
.photo-lightbox-close {
  position: absolute;
  top: -0.35rem;
  right: -0.15rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: none;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}
.photo-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(26, 22, 18, 0.72);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.photo-lightbox-prev {
  left: 0.25rem;
}
.photo-lightbox-next {
  right: 0.25rem;
}
.photo-lightbox-nav:hover {
  background: var(--clay);
  border-color: var(--clay);
}
.photo-lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: -0.15rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(26, 22, 18, 0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}
body.lightbox-open {
  overflow: hidden;
}
@media (max-width: 700px) {
  .photo-lightbox {
    padding: 0.75rem;
  }
  .photo-lightbox-prev {
    left: 0;
  }
  .photo-lightbox-next {
    right: 0;
  }
}
.detail-thumbs-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.detail-thumbs {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: thin;
}
.detail-thumbs button {
  flex: 0 0 auto;
  width: 88px;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius);
  background: var(--warm);
  overflow: hidden;
  cursor: pointer;
}
.detail-thumbs button.is-active,
.detail-thumbs button:hover {
  border-color: var(--clay);
}
.detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-nav-btn {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
}
.detail-nav-btn:hover {
  border-color: var(--clay);
  color: var(--clay);
}

.detail-buy {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.4rem;
  top: calc(var(--nc-sticky-search, 4.5rem) + 0.35rem);
}
@media (max-width: 960px) {
  .detail-buy {
    position: static;
  }
}
.detail-buy-price {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
  color: var(--clay);
}
.detail-buy-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.detail-cert {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--clay);
  background: #f3f3f3;
  border: 1px solid var(--line);
  padding: 0.3rem 0.55rem;
  border-radius: var(--radius);
}
.detail-buy h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 0.9rem;
}
.detail-buy .vehicle-specs {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}
.detail-inspect-link {
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--clay);
  margin-bottom: 1.1rem;
}
.detail-inspect-link:hover {
  text-decoration: underline;
}
.detail-buy-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.85rem;
}
.detail-buy-actions .btn {
  animation: none;
  width: 100%;
}
.detail-buy-actions .btn-wa {
  background: #25d366;
}
.detail-buy-actions .btn-wa:hover {
  background: #1ebe57;
}
.detail-buy-actions .btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.detail-buy-actions .btn-ghost:hover {
  border-color: var(--clay);
  color: var(--clay);
  background: transparent;
  transform: none;
}
.detail-sku {
  font-size: 0.78rem;
  color: var(--mute);
}

.detail-trust {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  padding: 1.25rem;
  background: #555555;
  color: #fff;
  margin-bottom: 0;
  border-radius: var(--radius);
}
@media (max-width: 900px) {
  .detail-trust {
    grid-template-columns: 1fr 1fr;
  }
}
.detail-trust-head {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
}
.detail-trust-head h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}
.detail-trust-head p {
  font-size: 0.88rem;
  opacity: 0.78;
}
.detail-trust-item {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tabs {
  position: sticky;
  top: var(--nc-sticky-search, 0px);
  z-index: 6;
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  background: rgba(240, 235, 227, 0.96);
  border-bottom: 1px solid var(--line);
  margin: 0 -4vw;
  padding: 0 4vw;
  backdrop-filter: blur(6px);
  display: none;
}
.detail-tabs a {
  flex: 0 0 auto;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mute);
  border-bottom: 2px solid transparent;
}
.detail-tabs a:hover,
.detail-tabs a.is-active {
  color: var(--ink);
  border-bottom-color: var(--clay);
}

.detail-section {
  padding: 2.25rem 0 0.5rem;
  scroll-margin-top: calc(var(--nc-sticky-search, 4.5rem) + 0.5rem);
}
.detail-section > h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.65rem;
}
.detail-lead {
  color: var(--mute);
  max-width: 46rem;
  margin-bottom: 1.35rem;
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
@media (max-width: 900px) {
  .detail-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
.detail-stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
}
.detail-stat span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--mute);
  margin-bottom: 0.3rem;
}
.detail-stat strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.detail-block-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin: 0 0 0.85rem;
}

.detail-kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  margin-bottom: 1.75rem;
  overflow: hidden;
}
@media (max-width: 700px) {
  .detail-kv {
    grid-template-columns: 1fr;
  }
}
.detail-kv div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}
.detail-kv div:nth-child(odd) {
  border-right: 1px solid var(--line);
}
@media (max-width: 700px) {
  .detail-kv div:nth-child(odd) {
    border-right: none;
  }
}
.detail-kv span {
  color: var(--mute);
  font-size: 0.86rem;
}
.detail-kv strong {
  font-size: 0.9rem;
  text-align: right;
}

.detail-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (max-width: 800px) {
  .detail-features {
    grid-template-columns: 1fr;
  }
}
.detail-feature-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.15rem;
}
.detail-feature-group h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--ink);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--line);
}
.detail-feature-group h4 svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: var(--clay);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-feature-group ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
}
@media (max-width: 600px) {
  .detail-feature-group ul {
    grid-template-columns: 1fr;
  }
}
.detail-feature-group li {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1.35;
}
.detail-feature-group li svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 0.12rem;
  stroke: var(--clay);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-inspect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}
@media (max-width: 700px) {
  .detail-inspect-grid {
    grid-template-columns: 1fr;
  }
}
.detail-inspect-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 1.1rem;
}
.detail-inspect-card h3 {
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}
.detail-inspect-card p {
  font-size: 0.84rem;
  color: var(--mute);
}

.loan-box {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.25rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem;
}
@media (max-width: 800px) {
  .loan-box {
    grid-template-columns: 1fr;
  }
}
.loan-result {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.loan-result span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mute);
}
.loan-result strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.8rem;
  margin-top: 0.35rem;
  color: var(--clay);
}
.loan-fields {
  display: grid;
  gap: 0.75rem;
}
.loan-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mute);
}
.loan-fields input,
.loan-fields select {
  font-size: 0.92rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  background: var(--white);
  outline: none;
}
.loan-fields input:focus,
.loan-fields select:focus {
  border-color: var(--clay);
}
.loan-note {
  font-size: 0.78rem;
  color: var(--mute);
  margin-top: 0.85rem;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
@media (max-width: 1000px) {
  .similar-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .similar-grid {
    grid-template-columns: 1fr;
  }
}
.similar-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.similar-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(26, 22, 18, 0.08);
}
.similar-card .card-img {
  aspect-ratio: 16 / 9;
}
.similar-card .card-body {
  padding: 0.9rem 1rem 1.1rem;
}
.similar-card h3 {
  font-size: 0.92rem;
  margin: 0.35rem 0 0.55rem;
  line-height: 1.3;
}
.similar-card .price {
  font-size: 1.05rem;
}

.detail-stickybar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  padding: 0.75rem 4vw;
  display: none;
  backdrop-filter: blur(8px);
}
.detail-stickybar.is-visible {
  display: block;
}
.detail-stickybar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.detail-stickybar h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.98rem;
  line-height: 1.25;
}
.detail-stickybar .price {
  font-size: 1.05rem;
  margin-top: 0.15rem;
}
.detail-stickybar-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.detail-stickybar-actions .btn {
  animation: none;
  padding: 0.65rem 1rem;
  font-size: 0.86rem;
}
.detail-stickybar-actions .btn-wa {
  background: #25d366;
}
@media (max-width: 700px) {
  .detail-stickybar-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .detail-stickybar-actions .btn {
    flex: 1;
  }
}

.detail-missing {
  text-align: center;
  padding: 4rem 1rem;
}
.detail-missing h1 {
  font-family: "Space Grotesk", sans-serif;
  margin-bottom: 0.75rem;
}
.detail-missing p {
  color: var(--mute);
  margin-bottom: 1.25rem;
}

.card-link {
  display: block;
  color: inherit;
  height: 100%;
}

body.has-detail-sticky {
  padding-bottom: 0;
}
body.has-detail-sticky:has(#detail-stickybar.is-visible) {
  padding-bottom: 4rem;
}
body.has-detail-sticky .wa-float {
  display: none;
}
