/**
 * CLW Product Section - Front-end Stylesheet
 * Pixel-perfect implementation for vehicle cards with Quick Specs
 */

/* =========================================================
   CONTAINER & SECTION HEADER
   ========================================================= */
.clw-product-section-wrapper {
	width: 100%;
	font-family: 'Inter', system-ui, -apple-system, sans-serif;
	box-sizing: border-box;
}

.clw-product-section-wrapper *,
.clw-product-section-wrapper *::before,
.clw-product-section-wrapper *::after {
	box-sizing: border-box;
}

.clw-sec-header {
	margin-bottom: 34px;
	text-align: center;
}

.clw-sec-badge-wrap {
	margin-bottom: 12px;
}

.clw-sec-badge {
	display: inline-block;
	background-color: #fee2e2;
	color: #dc2626;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 6px 16px;
	border-radius: 9999px;
}

.clw-sec-title {
	font-size: 32px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 12px 0;
	line-height: 1.25;
	letter-spacing: -0.025em;
}

.clw-sec-desc {
	font-size: 14.5px;
	color: #64748b;
	line-height: 1.6;
	max-width: 680px;
	margin: 0 auto;
}

/* =========================================================
   PRODUCT GRID
   ========================================================= */
.clw-prod-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	column-gap: 24px;
	row-gap: 32px;
}

/* Fallback Responsive Breakpoints if Elementor styles aren't loaded */
@media (max-width: 1024px) {
	.clw-prod-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 20px;
		row-gap: 24px;
	}
}

@media (max-width: 640px) {
	.clw-prod-grid {
		grid-template-columns: 1fr;
		row-gap: 20px;
	}
	.clw-sec-title {
		font-size: 25px;
	}
}

/* =========================================================
   PRODUCT CARD
   ========================================================= */
.clw-card {
	background-color: #ffffff;
	border-radius: 16px;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
	position: relative;
}

.clw-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
	border-color: #cbd5e1;
}

/* =========================================================
   IMAGE & BADGES
   ========================================================= */
.clw-card-img-wrap {
	position: relative;
	width: 100%;
	height: 205px;
	overflow: hidden;
	background-color: #f1f5f9;
}

.clw-card-img-link {
	display: block;
	width: 100%;
	height: 100%;
}

.clw-card-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.clw-card:hover .clw-card-img {
	transform: scale(1.05);
}

/* Top Badge */
.clw-badge-top {
	position: absolute;
	top: 12px;
	left: 12px;
	font-size: 10.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: #ffffff;
	padding: 5px 12px;
	border-radius: 9999px;
	z-index: 2;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
	pointer-events: none;
	line-height: 1.2;
}

.clw-badge-blue {
	background-color: #0284c7;
}

.clw-badge-green {
	background-color: #16a34a;
}

.clw-badge-red {
	background-color: #dc2626;
}

.clw-badge-orange {
	background-color: #ea580c;
}

/* Chassis / Ribbon Badge (Bottom Right on Image) */
.clw-badge-chassis {
	position: absolute;
	bottom: 10px;
	right: 10px;
	background-color: rgba(15, 23, 42, 0.85);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 9px;
	border-radius: 6px;
	z-index: 2;
	pointer-events: none;
	line-height: 1.2;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* =========================================================
   CARD BODY
   ========================================================= */
.clw-card-body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Title */
.clw-card-title {
	font-size: 16.5px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 8px 0;
	line-height: 1.35;
	letter-spacing: -0.015em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.clw-card-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.clw-card-title a:hover {
	color: #2563eb;
}

/* Excerpt / Short description */
.clw-card-excerpt {
	font-size: 13px;
	color: #64748b;
	line-height: 1.45;
	margin: 0 0 14px 0;
	min-height: 38px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* =========================================================
   QUICK SPECS BOX (2x2 Grid with Icons & Main Values)
   ========================================================= */
.clw-specs-box {
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 16px;
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.clw-card:hover .clw-specs-box {
	border-color: #cbd5e1;
	background-color: #f8fafc;
}

.clw-specs-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px 12px;
}

.clw-spec-item {
	display: flex;
	align-items: center;
	gap: 8px;
	overflow: hidden;
	min-width: 0;
	padding: 2px 0;
}

.clw-spec-icon-box {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	min-width: 26px;
	border-radius: 7px;
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 11px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	flex-shrink: 0;
}

.clw-card:hover .clw-spec-icon-box {
	background-color: #eff6ff;
	border-color: #bfdbfe;
	color: #2563eb;
	transform: scale(1.06);
}

.clw-spec-val {
	font-size: 12.5px;
	font-weight: 600;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

/* =========================================================
   PRICE ROW & DISCOUNT BADGE
   ========================================================= */
.clw-card-price-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 16px;
	padding: 2px 0 0 0;
	gap: 10px;
}

.clw-price-discount-tag {
	display: inline-flex;
	align-items: center;
	font-size: 11px;
	font-weight: 700;
	color: #C11920;
	background-color: #fee2e2;
	padding: 2px 6px;
	border-radius: 4px;
	line-height: 1.1;
	letter-spacing: 0.02em;
	border: 1px solid rgba(193, 25, 32, 0.2);
}

.clw-price-wrap {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.clw-price-regular {
	font-size: 13px;
	font-weight: 500;
	color: #94a3b8;
	text-decoration: line-through;
	white-space: nowrap;
}

.clw-price-val {
	font-size: 18px;
	font-weight: 800;
	color: #C11920;
	letter-spacing: -0.025em;
	white-space: nowrap;
	line-height: 1;
}

.clw-price-val.clw-has-sale {
	color: #C11920;
}

/* =========================================================
   BUTTON
   ========================================================= */
.clw-card-btn-wrap {
	margin-top: auto;
}

.clw-btn-quote {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 11px 16px;
	background-color: #C11920;
	color: #ffffff;
	font-size: 13.5px;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 4px rgba(193, 25, 32, 0.15);
	user-select: none;
}

.clw-btn-icon {
	margin-right: 8px;
	font-size: 13px;
	transform: rotate(-10deg);
	transition: transform 0.2s ease;
}

.clw-btn-quote:hover {
	background-color: #a5141a;
	color: #ffffff;
	box-shadow: 0 6px 16px rgba(193, 25, 32, 0.3);
	transform: translateY(-1px);
}

.clw-btn-quote:hover .clw-btn-icon {
	transform: rotate(0deg) scale(1.12);
}

.clw-btn-quote:active {
	transform: translateY(0);
}

/* Empty State */
.clw-no-products {
	padding: 40px;
	text-align: center;
	background: #f8fafc;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	color: #64748b;
	font-size: 15px;
}

/* =========================================================
   QUOTATION POPUP MODAL
   ========================================================= */
.clw-modal-backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.clw-modal-backdrop.clw-modal-open {
	opacity: 1;
	visibility: visible;
}

.clw-modal-dialog {
	background-color: #ffffff;
	width: 100%;
	max-width: 520px;
	border-radius: 18px;
	box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
	overflow: hidden;
	position: relative;
	transform: translateY(20px) scale(0.96);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.clw-modal-backdrop.clw-modal-open .clw-modal-dialog {
	transform: translateY(0) scale(1);
}

.clw-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: #f1f5f9;
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 20px;
	line-height: 1;
	color: #64748b;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	z-index: 10;
}

.clw-modal-close:hover {
	background-color: #e2e8f0;
	color: #0f172a;
}

.clw-modal-header {
	padding: 24px 24px 16px;
	border-bottom: 1px solid #f1f5f9;
}

.clw-modal-pill {
	display: inline-block;
	background: #fee2e2;
	color: #dc2626;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.07em;
	padding: 4px 10px;
	border-radius: 9999px;
	margin-bottom: 8px;
}

.clw-modal-title {
	font-size: 20px;
	font-weight: 800;
	color: #0f172a;
	margin: 0 0 4px 0;
	line-height: 1.25;
}

.clw-modal-subtitle {
	font-size: 12.5px;
	color: #64748b;
	margin: 0;
}

.clw-modal-body {
	padding: 18px 24px 24px;
	overflow-y: auto;
}

/* Vehicle preview inside modal */
.clw-modal-vehicle-strip {
	display: flex;
	align-items: center;
	gap: 14px;
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 10px 14px;
	margin-bottom: 18px;
}

.clw-modal-prod-img {
	width: 60px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
	background: #e2e8f0;
	flex-shrink: 0;
}

.clw-modal-prod-info {
	overflow: hidden;
	flex-grow: 1;
}

.clw-modal-prod-title {
	font-size: 14px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 4px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.clw-modal-prod-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 11.5px;
}

.clw-modal-prod-chassis {
	background: #e2e8f0;
	color: #334155;
	padding: 2px 7px;
	border-radius: 4px;
	font-weight: 600;
}

.clw-modal-prod-price {
	color: #dc2626;
	font-weight: 700;
}

/* Form controls */
.clw-quotation-form .clw-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 480px) {
	.clw-quotation-form .clw-grid-2 {
		grid-template-columns: 1fr;
		gap: 0;
	}
}

.clw-form-group {
	margin-bottom: 13px;
}

.clw-form-group label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 5px;
}

.clw-form-group input,
.clw-form-group textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 13px;
	color: #0f172a;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	background: #ffffff;
}

.clw-form-group input:focus,
.clw-form-group textarea:focus {
	outline: none;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.clw-quote-submit-btn {
	width: 100%;
	padding: 12px 18px;
	background-color: #0f172a;
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	transition: all 0.2s ease;
	margin-top: 6px;
}

.clw-quote-submit-btn:hover {
	background-color: #1e293b;
	box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.clw-quote-submit-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.clw-form-alert {
	margin-top: 14px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 12.5px;
	line-height: 1.4;
}

.clw-form-alert.clw-alert-success {
	background-color: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.clw-form-alert.clw-alert-error {
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}
