/* ==========================================================================
   Car Listings Styles
   ========================================================================== */

.car-archive {
	padding: 40px 0;
}

.car-archive-header {
	text-align: center;
	margin-bottom: 50px;
}

.car-archive-header h1 {
	font-size: 36px;
	font-weight: 600;
	margin-bottom: 20px;
	color: #163f93;
}

.car-archive-header .archive-description {
	font-size: 18px;
	color: #666;
	max-width: 600px;
	margin: 0 auto;
}

.car-archive-filters {
	background: #f8f9fa;
	padding: 30px;
	border-radius: 12px;
	margin-bottom: 40px;
}

.car-listings-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.car-item {
	background: #fff;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	position: relative;
}

.car-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.car-item-inner {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.car-item-image {
	position: relative;
	overflow: hidden;
	height: 200px;
}
.car-item-image a {
	display: block;
	width: 100%;
	height: 100%;
}
.car-item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.car-item:hover .car-item-image img {
	transform: scale(1.05);
}

.car-featured-badge {
	position: absolute;
	top: 15px;
	left: 15px;
	background: #ff6b6b;
	color: white;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	z-index: 2;
}

.car-condition-badge {
	position: absolute;
	top: 15px;
	right: 15px;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	color: white;
	z-index: 2;
}

.car-condition-badge.Aziendale {
	background: #28a745;
}

.car-condition-badge.Usato {
	background: #6c757d;
}

.car-condition-badge.Km0 {
	background: #2DDC6C;
}

.car-condition-badge.rental {
	background: #ffc107;
	color: #212529;
}

.car-item-content {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.car-item-content .car-item-brand {
	margin-bottom: 0px;
}

.car-item-content .car-item-brand a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.car-item-content .car-item-title {
	line-height: 1.3;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.car-item-content hr {
	border-bottom: 2px solid #163F93;
	opacity: 1;
	width: 100%;
}

.car-item-title a:hover {
	color: #163f93;
}

.car-item-title .favourite-this-car {
	font-size: 20px;
	width: 35px;
	height: 35px;
	border: 1px solid rgb(199, 199, 199);
	color: #666;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50px;
	flex: 0 0 35px;
	transition: 0.2s ease-in-out;
	margin-left: 20px;
}
.car-item-title .favourite-this-car svg {
	width: 20px;
	height: 20px;
}
.car-item-title .favourite-this-car:hover {
	background: #163f93;
	border: 1px solid #163f93;
}
.car-item-title .favourite-this-car:hover svg {
	stroke: #fff;
}

.car-item-price {
	margin-bottom: 0px;
	color: #333;
	line-height: 1.2;
}

.car-item-price strong {
	display: block;
	font-size: 1.3em;
}

.car-item-meta {
	display: flex;
	flex-wrap: wrap;
	background: #F2F2F2;
	justify-content: space-between;
}

.car-item-meta .car-meta-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
	width: 30%;
	font-size: 13px;
	color: #2E2E2E;
}

.car-item-meta .car-meta-item i {
	color: #2E2E2E;
	width: 16px;
}

.car-item-excerpt {
	color: #666;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 20px;
	flex: 1;
}

.car-item-details {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 25px;
}

.car-item-details span {
	background: #f8f9fa;
	padding: 4px 10px;
	border-radius: 15px;
	font-size: 12px;
	color: #666;
	font-weight: 500;
}

.car-item-actions {
	display: flex;
	gap: 10px;
	margin-top: auto;
}

.car-view-details {
	flex: 1;
	text-align: center;
	padding: 12px 20px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.car-contact-dealer {
	padding: 12px 15px;
	border: 1px solid #ddd;
	background: white;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	color: #666;
}

.car-contact-dealer:hover {
	background: #f8f9fa;
	border-color: #163f93;
	color: #163f93;
}

.car-archive-pagination {
	display: flex;
	justify-content: center;
	margin-top: 50px;
}

.car-archive-no-results {
	text-align: center;
	padding: 60px 20px;
	grid-column: span 3;
}

.car-archive-no-results h3 {
	font-size: 24px;
	color: #666;
	margin-bottom: 15px;
}

.car-archive-no-results p {
	color: #999;
	font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
	.car-listings-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.car-archive-no-results {
		grid-column: span 1;
	}

	.car-archive-header h1 {
		font-size: 28px;
	}

	.car-item-meta {
		gap: 10px;
	}

	.car-item-actions {
		flex-direction: column;
	}

	.car-contact-dealer {
		text-align: center;
	}
}

@media (max-width: 480px) {
	.car-archive {
		padding: 20px 0;
	}

	.car-item-content {
		padding: 20px;
	}

	.car-item-image {
		height: 200px;
	}
}
