/* inventory.css — Inventory listing page + Vehicle detail page */

/* ── Shared page wrapper ── */
.inv-page {
  background: var(--bg-primary);
  min-height: 100vh;
}

/* ── Page header / breadcrumb ── */
.inv-header {
  padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-md);
  background: var(--bg-mid);
  border-bottom: 3px solid var(--accent-red);
}

.inv-breadcrumb {
  font-family: var(--font-sub);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-sm);
}

.inv-breadcrumb a {
  color: var(--accent-red);
  transition: color var(--transition);
}

.inv-breadcrumb a:hover {
  color: var(--text);
}

.inv-breadcrumb span {
  margin: 0 0.5rem;
  opacity: 0.4;
}

.inv-header__title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 7vw, 5rem);
  text-transform: uppercase;
  color: var(--text);
  line-height: 0.95;
}

.inv-header__sub {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: var(--space-sm);
  max-width: 52ch;
  line-height: 1.6;
}

/* ── Filter pills ── */
.inv-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: var(--space-md) var(--space-md);
  background: var(--bg-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  max-width: var(--container-max);
  margin: 0 auto;
}

.inv-filter-pill {
  font-family: var(--font-sub);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.55rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.inv-filter-pill:hover,
.inv-filter-pill.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: var(--text);
}

/* ── Inventory grid ── */
.inv-grid-wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
}

.inv-count {
  font-family: var(--font-sub);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-md);
}

.inv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

@media (max-width: 640px) {
  .inv-grid { grid-template-columns: 1fr; gap: var(--space-sm); }
  .inv-grid-wrap { padding: var(--space-md) var(--space-sm); }
}

/* ── Inventory card (larger than home carousel cards) ── */
.inv-card {
  background: var(--bg-mid);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  position: relative;
}

.inv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
}

.inv-card__img-wrap {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.inv-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.inv-card:hover .inv-card__img {
  transform: scale(1.05);
}

.inv-card__price {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  background: var(--accent-red);
  color: var(--text);
  font-family: var(--font-sub);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  letter-spacing: 0.04em;
}

.inv-card__badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  background: var(--accent-gold);
  color: #111;
  font-family: var(--font-sub);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
}

.inv-card__body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.inv-card__stk {
  font-family: var(--font-body);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inv-card__title {
  font-family: var(--font-sub);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  letter-spacing: 0.02em;
}

.inv-card__cat {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
}

.inv-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--space-sm);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  margin-top: auto;
}

.inv-card__view {
  font-family: var(--font-sub);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-red);
}

.inv-card__status {
  font-family: var(--font-sub);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #4caf50;
}

/* ── Vehicle detail page ── */
.veh-hero {
  position: relative;
  background: var(--bg-mid);
  padding-top: var(--nav-height);
}

.veh-hero__img-wrap {
  position: relative;
  overflow: hidden;
  height: min(55vh, 520px);
}

.veh-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.veh-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16,14,14,0.92) 0%, rgba(16,14,14,0.2) 60%, transparent 100%);
}

.veh-hero__info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md) var(--space-lg);
  z-index: 2;
}

@media (max-width: 768px) {
  .veh-hero__img-wrap { height: 56vw; min-height: 240px; }
  .veh-hero__info { padding: var(--space-sm) var(--space-sm); }
}

.veh-hero__badge {
  display: inline-block;
  background: var(--accent-gold);
  color: #111;
  font-family: var(--font-sub);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  margin-bottom: 0.6rem;
}

.veh-hero__price {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--accent-red);
  line-height: 1;
}

.veh-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: var(--text);
  text-transform: uppercase;
  line-height: 1;
}

.veh-hero__stk {
  font-family: var(--font-sub);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* ── Vehicle detail body ── */
.veh-body {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md);
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 960px) {
  .veh-body {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-sm);
  }
}

/* ── Gallery thumbnails (4-up grid, "+N more" on last slot) ── */
.veh-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: var(--space-md);
}

.veh-gallery__item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  background: var(--bg-mid);
}

.veh-gallery__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.7;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}

.veh-gallery__item:hover .veh-gallery__thumb {
  transform: scale(1.06);
  opacity: 1;
}

.veh-gallery__more {
  position: absolute;
  inset: 0;
  background: rgba(16, 14, 14, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sub);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* ── Fullscreen lightbox ── */
.veh-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}

.veh-lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.veh-lightbox__close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, border-color 0.2s;
}

.veh-lightbox__close:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.veh-lightbox__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.veh-lightbox__img-wrap {
  flex: 1;
  width: 100%;
  max-width: min(92vw, 1100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.5rem var(--space-md) 0.5rem;
}

.veh-lightbox__img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

.veh-lightbox__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(16, 14, 14, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, border-color 0.2s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.veh-lightbox__arrow:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.veh-lightbox__arrow:disabled {
  opacity: 0.18;
  pointer-events: none;
}

.veh-lightbox__arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.veh-lightbox__arrow--prev { left: var(--space-md); }
.veh-lightbox__arrow--next { right: var(--space-md); }

@media (max-width: 600px) {
  .veh-lightbox__arrow--prev { left: 0.4rem; }
  .veh-lightbox__arrow--next { right: 0.4rem; }
  .veh-lightbox__arrow { width: 38px; height: 38px; }
}

.veh-lightbox__counter {
  font-family: var(--font-sub);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.6rem 0 0.5rem;
}

.veh-lightbox__strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0 var(--space-md) var(--space-md);
  max-width: min(92vw, 1100px);
  width: 100%;
  scrollbar-width: none;
}

.veh-lightbox__strip::-webkit-scrollbar { display: none; }

.lb-strip__thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  flex-shrink: 0;
  opacity: 0.4;
  cursor: pointer;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}

.lb-strip__thumb:hover,
.lb-strip__thumb.active {
  opacity: 1;
  border-color: var(--accent-red);
}

/* ── Description ── */
.veh-desc__heading {
  font-family: var(--font-sub);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-red);
  margin-bottom: 0.75rem;
}

.veh-desc__text {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 68ch;
}

/* ── Specs table ── */
.veh-specs {
  margin-top: var(--space-lg);
}

.veh-specs__heading {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2rem);
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-sm);
  border-bottom: 2px solid var(--accent-red);
  padding-bottom: 0.5rem;
}

.veh-specs__table {
  width: 100%;
  border-collapse: collapse;
}

.veh-specs__table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.veh-specs__table td {
  padding: 0.75rem 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.4;
}

.veh-specs__table td:first-child {
  font-family: var(--font-sub);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  width: 45%;
  padding-right: var(--space-sm);
}

.veh-specs__table td:last-child {
  color: var(--text);
}

/* ── Inquiry sidebar ── */
.veh-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
}

.veh-sidebar__card {
  background: var(--bg-mid);
  padding: var(--space-md);
  border-top: 3px solid var(--accent-red);
}

.veh-sidebar__price {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--accent-red);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.veh-sidebar__title {
  font-family: var(--font-sub);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.veh-sidebar__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: var(--space-sm) 0;
}

.veh-sidebar__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.veh-sidebar__btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  padding: 1rem;
  font-size: 1rem;
}

.veh-sidebar__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-sub);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--transition);
  margin-bottom: var(--space-md);
}

.veh-sidebar__back:hover {
  color: var(--accent-red);
}

/* ── Related vehicles ── */
.veh-related {
  background: var(--bg-mid);
  padding: var(--space-lg) 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.veh-related__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.veh-related__heading {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.veh-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .veh-related__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .veh-related__grid { grid-template-columns: 1fr; }
}
