.small-listings-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.small-listing-item {
	max-width: 360px;
	min-height: 310px;
	height: auto;
	background-color: white;
	border-radius: 10px;
	cursor: pointer;
	position: relative;
}

.small-listing-item .vehicle-photo-wrapper {
	position: relative;
	width: 100%;
	height: 240px;
	border-radius: 10px 10px 0 0;
	overflow: hidden;
}

.small-listing-item .vehicle-photo-wrapper > .vehicle-photo {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: 50% 50%;
	background-color: white;
}

.small-listing-item .vehicle-photo-wrapper > .more-pictures,
.listing-item .listing-image-wrapper > .more-pictures {
	position: absolute;
	background-color: var(--sixty);
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: 0.3s ease;
}

.small-listing-item .vehicle-photo-wrapper > .more-pictures:hover,
.listing-item .listing-image-wrapper > .more-pictures:hover {
	opacity: 1;
	background-color: rgba(var(--sixty-rgb), 0.3);
}

.small-listing-item .vehicle-price {
	position: absolute;
	max-width: 180px;
	height: 32px;
	border-radius: 16px;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0.8;
}

.small-listing-item .vehicle-our-price {
	bottom: 8px;
	right: 8px;
	background-color: var(--thirty);
}

.small-listing-item .vehicle-retail-price {
	color: black;
	right: 0;
	align-items: end;
}

.small-listing-item .vehicle-price > p {
	padding: 16px;
	margin: 0;
}

.small-listing-item .vehicle-info {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	min-height: 64px;
}

.small-listing-item .vehicle-info > .vehicle-title {
	text-transform: uppercase;
	color: var(--sixty);
	margin-left: 10px;
	max-width: 55%;
}

.small-listing-item .vehicle-info > .vehicle-info-column {
	width: 184px;
	height: 56px;
}

.small-listing-item .vehicle-info > .vehicle-info-column > .vehicle-mileage {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	margin-right: 10px;
}

.small-listing-item .vehicle-info > .vehicle-info-column > .vehicle-mileage > p {
	color: var(--sixty);
	margin: 0;
}

.small-listing-item .vehicle-info-icon {
	width: 12px;
	height: 12px;
}

.small-listing-item .edit-button {
	position: absolute;
	right: 0;
	margin: 16px;
	width: 48px;
	height: 24px;
	z-index: 5;
	cursor: pointer;
	font-size: 0.8rem;
	display: none;
}

.small-listing-item:hover .edit-button {
	display: flex;
}

.listing-status {
	opacity: 0.7;
	text-transform: uppercase;
	margin-top: 32px;
	margin-bottom: 8px;
}

.more-button-wrapper {
	width: 100%;
	display: flex;
	justify-content: flex-end;
}

.more-vehicles-btn {
	text-transform: uppercase;
	background-color: var(--thirty);
	color: white;
	border: 0;
	border-radius: 50px;
	font-size: 1rem;
	width: 128px;
	height: 32px;
	margin-top: 8px;
	margin-bottom: 0;
	transition: 0.3s ease;
	cursor: pointer;
}

.more-vehicles-btn:hover {
	background-color: var(--ten)
}

a.small-listing-link, a.listing-link {
  text-decoration: none;
  color: inherit;        
  display: block;        
}


/* INVENTORY LISTINGS */
.listings-grid {
	margin-top: 16px;
	display: grid;
	grid-template-columns: 735px 735px;
	gap: 16px;
}

.listing-item {
	border-radius: 20px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background-color: rgba(255, 255, 255, 0.03);
	overflow: hidden;
	color: white;
	width: 735px;
	min-height: 240px;
	height: auto;
	position: relative;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.listing-item:hover {
	transform: translateY(-4px);
	border-color: rgba(255, 255, 255, 0.32);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.listing-details-items {
	display: flex;
	gap: 8px;
	height: 100%;
}

.listing-item .listing-image-wrapper {
	position: relative;
	width: 370px;
	/* A height of its own, so the photo is cropped to the card rather than
	   the card stretched to the photo. The wrapper had a width and no
	   height, so the image fell back to its natural aspect and one portrait
	   cover made its card half as tall again as the one beside it - which is
	   how a single sideways photo broke a whole row. A height rather than an
	   aspect-ratio because these boxes are not all exactly the same width,
	   and a ratio would put their heights a few pixels apart. */
	height: 278px;
	flex-shrink: 0;
	overflow: hidden;
}

.listing-item .listing-image {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: cover;
	object-position: 50% 50%;
}

.listing-item .listing-price-wrapper > span {
	font-size: 1rem;
	font-weight: 600;
}

.listing-item .listing-info {
	position: relative;
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px;
}

.listing-item .listing-info-header {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 8px 12px;
}

.listing-item .listing-title {
	font-weight: 600;
	display: block;
	font-size: 1.05rem;
	line-height: 1.35;
}

.listing-item .listing-price-wrapper {
	flex-shrink: 0;
	background-color: var(--thirty);
	color: white;
	padding: 6px 14px;
	border-radius: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}

.listing-item .listing-retail-price-wrapper {
	margin-top: -8px;
}

.listing-item .listing-retail-price {
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.85rem;
	text-decoration: line-through;
}

.listing-item .vehicle-details {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
	margin-top: auto;
}

.listing-item .detail-item {
	display: flex;
	column-gap: 10px;
	justify-items: start;
	align-items: center;
	padding: 8px 12px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 10px;
	background-color: rgba(255, 255, 255, 0.03);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.listing-item:hover .detail-item {
	border-color: rgba(255, 255, 255, 0.2);
}

.listing-item .detail-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	flex-shrink: 0;
}

.listing-item .detail-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
	text-transform: uppercase;
	font-size: 0.833rem;
	overflow-wrap: break-word;
}

.listing-item .detail-text > .label {
	opacity: 0.5;
	text-transform: uppercase;
	font-size: 0.833rem;
}

.listing-item .edit-button {
	position: absolute;
	top: 16px;
	left: 16px;
	width: 48px;
	height: 24px;
	font-size: 0.8rem;
	display: none;
}

.listing-item:hover .edit-button {
	display: flex;
}

.load-more-btn-wrapper {
	display: flex;
	padding: 32px;
	justify-content: center;
}

.load-more-btn {
	background-color: var(--thirty);
	height: 32px;
	width: 240px;
	text-transform: uppercase;
	border: none;
	border-radius: 50px;
	color: white;
	transition: 0.3s ease;
	cursor: pointer;
	font-size: 1rem;
}

.load-more-btn:hover {
	background-color: var(--ten);
}

.listing-status-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: white;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.listing-status-dot {
	width: 6px;
	height: 6px;
	flex-shrink: 0;
	border-radius: 50%;
	background-color: currentColor;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

/* Staff-only flag on a Carfax that has not picked up our service record yet.
   Sits bottom-left so it clears the id badge above it and the status badge
   opposite. */
.listing-carfax-badge {
	position: absolute;
	bottom: 12px;
	left: 12px;
	z-index: 5;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 10px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: white;
	background-color: var(--red);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.listing-id-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 5;
	display: inline-flex;
	text-align: center;
	align-items: center;
	gap: 5px;
	font-weight: bold;
	padding: 5px 10px;
	border-radius: 999px;
	font-size: 0.8rem;
	color: black;
	background-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 1600px) {
	.listing-retail-price {
		display: none;
	}

	.listing-item .listing-image-wrapper {
		width: 300px;
		height: 225px;
	}

	.listing-item {
		width: 100%;
		min-height: 220px;
	}

	.listings-grid {
		grid-template-columns: auto auto;
	}
}

@media (max-width: 1200px) {
	.listings-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 900px) {
	.small-listings-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.small-listing-item {
		max-width: none;
	}
}

@media (max-width: 560px) {
	.small-listings-grid {
		display: grid;
		grid-template-columns: auto;
		gap: 16px;
	}

	.small-listing-item {
		width: 100%;
		justify-content: space-between;
	}

	.listing-item .listing-image-wrapper {
		width: 100%;
		height: 256px;
	}

	.listing-details-items {
		gap: 0;
	}

	.listing-info {
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		height: auto;
		min-height: 200px;
	}

	.listings-grid {
		grid-template-columns: 1fr;
	}

	.listing-item {
		height: auto;
		width: 100%;
	}

	.listing-details-items {
		flex-direction: column;
	}
}
