/**
 * Styles for Supchat Car Dealer Frontend (Otomoto Horizontal Style & Live Filters)
 */

.car-dealer-container {
	width: 100%;
	margin: 20px auto;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.car-dealer-container *,
.car-dealer-container *::before,
.car-dealer-container *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   Filter Bar (Pasek Filtrów)
   ========================================================================== */
.car-filter-bar {
	background: #ffffff;
	border-radius: 12px;
	padding: 20px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
	border: 1px solid #e2e8f0;
	margin-bottom: 25px;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.filter-group-main {
	position: relative;
	width: 100%;
}

.search-bar-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.filter-group-main input {
	width: 100%;
	padding: 12px 12px 12px 42px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 15px;
	color: #0f172a;
	transition: all 0.3s ease;
	outline: none;
	background: #f8fafc;
}

.filter-group-main input:focus {
	border-color: #2271b1;
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

.filter-group-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.filter-field select,
.filter-field input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 14px;
	color: #334155;
	background: #ffffff;
	transition: all 0.3s ease;
	outline: none;
}

.filter-field select:focus,
.filter-field input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.15);
}

/* ==========================================================================
   Horizontal Car List Rows
   ========================================================================== */
.car-rows-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.car-row {
	display: flex;
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
	border: 1px solid #e2e8f0;
	transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.car-row:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
	border-color: rgba(34, 113, 177, 0.25);
}

/* 1. Left image column */
.car-row-image-container {
	position: relative;
	width: 280px;
	min-width: 280px;
	height: 190px;
	overflow: hidden;
	background: #f1f5f9;
}

.car-row-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

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

.car-row-placeholder {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #94a3b8;
}

.placeholder-car-icon {
	font-size: 40px;
	width: 40px;
	height: 40px;
	margin-bottom: 5px;
	opacity: 0.6;
}

.placeholder-text {
	font-size: 12px;
}

.car-row-year-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: rgba(15, 23, 42, 0.8);
	backdrop-filter: blur(4px);
	color: #ffffff;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	z-index: 2;
}

/* 2. Center details column */
.car-row-info {
	flex-grow: 1;
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.car-row-title {
	font-size: 20px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 10px 0;
	line-height: 1.25;
}

.car-row-model-text {
	font-size: 14px;
	font-weight: 400;
	color: #64748b;
	margin-left: 5px;
}

/* Specs pills tags */
.car-row-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.spec-tag {
	background: #f1f5f9;
	color: #475569;
	padding: 5px 10px;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 6px;
}

.spec-tag .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	color: #64748b;
}

.car-row-description {
	font-size: 13.5px;
	line-height: 1.5;
	color: #64748b;
	margin: 0;
}

/* 3. Right price and CTA column */
.car-row-sidebar {
	width: 220px;
	min-width: 220px;
	padding: 20px 24px;
	border-left: 1px solid #f1f5f9;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-end;
}

.car-row-price-container {
	text-align: right;
	display: flex;
	flex-direction: column;
}

.price-val {
	font-size: 24px;
	font-weight: 800;
	color: #2271b1;
	line-height: 1.1;
	letter-spacing: -0.5px;
}

.price-type {
	font-size: 11px;
	color: #94a3b8;
	margin-top: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.car-row-cta {
	width: 100%;
}

.cta-button-call {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 10px;
	background: #f8fafc;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	color: #334155;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.cta-button-call:hover {
	background: #2271b1;
	border-color: #2271b1;
	color: #ffffff;
}

.cta-button-call .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ==========================================================================
   No Results & Empty states
   ========================================================================== */
.car-dealer-no-results {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 30px;
	text-align: center;
	color: #64748b;
}

.car-dealer-no-results .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	color: #94a3b8;
	margin-bottom: 8px;
}

.car-dealer-no-results p {
	margin: 0;
	font-size: 14px;
}

.car-dealer-no-cars {
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	padding: 50px;
	text-align: center;
	color: #64748b;
}

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */
@media (max-width: 860px) {
	.car-row {
		flex-direction: column;
	}
	
	.car-row-image-container {
		width: 100%;
		height: 240px;
	}
	
	.car-row-sidebar {
		width: 100%;
		border-left: none;
		border-top: 1px solid #f1f5f9;
		flex-direction: row;
		align-items: center;
		padding: 15px 24px;
	}
	
	.car-row-price-container {
		text-align: left;
	}
	
	.car-row-cta {
		width: auto;
		min-width: 120px;
	}
}

@media (max-width: 640px) {
	.car-filter-bar {
		padding: 15px;
	}
	
	.filter-group-grid {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.car-row-sidebar {
		flex-direction: column;
		align-items: flex-start;
		gap: 15px;
	}
	
	.car-row-cta {
		width: 100%;
	}
}
