/**
 * Car Showcase for Elementor - Card Styles
 */

/* Grid Container */
.cse-car-grid-container {
	width: 100%;
	box-sizing: border-box;
}

.cse-car-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--cse-cols, 2), minmax(0, 1fr));
	column-gap: var(--cse-col-gap, 24px);
	row-gap: var(--cse-row-gap, 28px);
	width: 100% !important;
	box-sizing: border-box;
	align-items: stretch;
}

/* Explicit Grid Column Classes */
.cse-car-grid.cse-grid-cols-1 {
	grid-template-columns: minmax(0, 1fr) !important;
}

.cse-car-grid.cse-grid-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.cse-car-grid.cse-grid-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.cse-car-grid.cse-grid-cols-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

/* Wrapper */
.cse-car-card-wrapper {
	width: 100%;
	height: 100%;
	display: flex;
	box-sizing: border-box;
}

/* Base Card */
.cse-car-card {
	position: relative;
	box-sizing: border-box;
	background: #ffffff;
	border-radius: 18px;
	padding: 24px;
	box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
	border: 1px solid #f0f2f5;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	max-width: 100%;
	margin: 0 auto;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.cse-car-card:hover {
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.09);
}

/* Header */
.cse-car-header {
	margin-bottom: 16px;
}

/* Manufacturer Badge */
.cse-car-manufacturer-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 3px 10px;
	border-radius: 20px;
	background: #f1f5f9;
	color: #334155;
	margin-bottom: 8px;
}

/* Model Title */
.cse-car-model {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.35;
	color: #0f172a;
	margin: 0 0 8px 0;
	word-wrap: break-word;
}

/* Meta Information */
.cse-car-meta-box {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cse-car-meta {
	font-size: 13px;
	line-height: 1.4;
	color: #64748b;
}

.cse-car-meta-primary {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.cse-car-meta-km {
	color: #475569;
	font-weight: 500;
}

.cse-car-meta-sep {
	color: #cbd5e1;
	user-select: none;
}

.cse-car-meta-period {
	color: #64748b;
	font-size: 13px;
}

/* Media / Image Container */
.cse-car-media {
	position: relative;
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	background-color: #f1f5f9;
	margin-bottom: 18px;
	line-height: 0;
}

.cse-car-media.cse-has-gallery {
	cursor: pointer;
}

.cse-car-media.cse-has-gallery:focus-visible {
	outline: 2px solid #1753c5;
	outline-offset: 2px;
}

.cse-car-media-img {
	width: 100%;
	height: 240px;
	object-fit: cover;
	display: block;
	border-radius: 12px;
	transition: transform 0.35s ease;
}

.cse-car-media.cse-has-gallery:hover .cse-car-media-img {
	transform: scale(1.03);
}

/* Gallery Count Badge */
.cse-car-gallery-badge {
	position: absolute;
	bottom: 12px;
	right: 12px;
	background: rgba(15, 23, 42, 0.78);
	color: #ffffff;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 5px 12px;
	border-radius: 30px;
	font-size: 12px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1;
	pointer-events: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	transition: background 0.2s ease;
}

.cse-badge-icon {
	display: inline-block;
	vertical-align: middle;
}

/* Price Box */
.cse-car-pricing-box {
	margin-top: auto;
	padding-top: 6px;
}

/* Price Comparison Grid */
.cse-price-comparison-grid {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
	width: 100%;
}

.cse-price-col {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}

/* Price Labels */
.cse-price-label {
	font-size: 13px;
	line-height: 1.35;
	color: #334155;
	margin-bottom: 8px;
	min-height: 36px;
}

.cse-price-purchase .cse-price-label {
	font-weight: 500;
	color: #1e293b;
}

/* Price Number & Unit wrapper */
.cse-price-num-wrap {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex-wrap: wrap;
}

/* Assessment Price */
.cse-price-assessment .cse-price-value {
	font-size: 32px;
	font-weight: 800;
	line-height: 1;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.cse-price-assessment .cse-price-unit {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1;
}

/* Directional Arrow */
.cse-price-arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1753c5;
	padding: 0 4px;
	flex-shrink: 0;
	margin-top: 20px; /* Aligns with price numbers */
}

.cse-price-arrow svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
	display: block;
}

/* Purchase / King's Price */
.cse-price-purchase .cse-price-value {
	font-size: 36px;
	font-weight: 900;
	line-height: 1;
	color: #1753c5;
	letter-spacing: -0.03em;
}

.cse-price-purchase .cse-price-unit {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1;
}

/* Single Price Box Mode */
.cse-price-single-box {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cse-price-single-box .cse-price-value {
	font-size: 32px;
	font-weight: 800;
	color: #1753c5;
	line-height: 1;
}

.cse-price-single-box .cse-price-unit {
	font-size: 14px;
	font-weight: 600;
	color: #64748b;
}

/* Responsive adjustments */
@media (max-width: 480px) {
	.cse-car-card {
		padding: 18px;
		border-radius: 14px;
	}

	.cse-car-model {
		font-size: 18px;
	}

	.cse-car-media-img {
		height: 200px;
	}

	.cse-price-label {
		font-size: 12px;
		min-height: auto;
	}

	.cse-price-assessment .cse-price-value {
		font-size: 26px;
	}

	.cse-price-purchase .cse-price-value {
		font-size: 28px;
	}

	.cse-price-arrow svg {
		width: 16px;
		height: 16px;
	}

	.cse-price-assessment .cse-price-unit,
	.cse-price-purchase .cse-price-unit {
		font-size: 12px;
	}
}
