/* Total RV – Inventory listing and detail styles */

/* Mobile (<sm): three rows of cards, browse additional stock by swiping horizontally */
@media (max-width: 639px) {
  .inventory-grid-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: 0.5rem;
    scrollbar-gutter: stable;
  }

  @media (prefers-reduced-motion: no-preference) {
    .inventory-grid-scroll {
      scroll-behavior: smooth;
    }
  }

  #inventory-grid {
    display: grid !important;
    grid-template-columns: unset !important;
    grid-auto-flow: column;
    grid-template-rows: repeat(3, auto);
    grid-auto-columns: minmax(16rem, calc(100vw - 3.5rem));
    column-gap: 1.25rem;
    row-gap: 1.25rem;
    width: max-content;
    max-width: none;
    align-items: stretch;
  }

  #inventory-grid > .caravan-card:nth-child(3n + 1) {
    scroll-snap-align: start;
  }
}

.inventory-grid {
  display: grid;
  gap: var(--space-lg, 1.5rem);
}

@media (min-width: 48em) {
  .inventory-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.inventory-card {
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.inventory-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.inventory-card-link:hover {
  color: var(--color-primary, #0066cc);
}

.inventory-card-link img {
  width: 100%;
  height: auto;
  display: block;
}

.inventory-card-body {
  padding: var(--space-md, 1rem);
}

.inventory-card-body h2 {
  margin: 0 0 var(--space-sm, 0.5rem);
  font-size: 1.25rem;
  overflow-wrap: break-word;
  min-width: 0;
}

.inventory-description {
  margin-top: 1rem;
}

/* Land Rover–style card CTAs */
.card-cta-primary {
  font-family: "Manrope", sans-serif;
}
.card-cta-primary:hover {
  opacity: 0.95;
}
.card-cta-secondary {
  font-family: "Manrope", sans-serif;
  font-weight: 500;
  text-decoration: none;
  color: #111111;
  letter-spacing: 0.05em;
}
.card-cta-secondary:hover {
  opacity: 0.8;
}
