/* Reliant Diesel Engine Filter — v4.0.0 */

.rdef-wrap {
	--rdef-cols: 3;
	max-width: 1200px;
	margin: 0 auto;
	font-family: inherit;
	color: inherit;
	text-align: left;
}

.rdef-filter-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: flex-end;
	padding: 20px;
	margin-bottom: 20px;
	background: #f6f7f8;
	border: 1px solid #e0e2e5;
	border-radius: 8px;
}

.rdef-filter-group {
	display: flex;
	flex-direction: column;
	flex: 1 1 220px;
	min-width: 180px;
	gap: 6px;
}

.rdef-label {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #333;
}

.rdef-select-wrap {
	position: relative;
}

.rdef-select {
	width: 100%;
	appearance: none;
	-webkit-appearance: none;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 10px 36px 10px 12px;
	font-size: 15px;
	line-height: 1.3;
	cursor: pointer;
}

.rdef-select:disabled {
	background: #eee;
	cursor: not-allowed;
	color: #888;
}

.rdef-select-wrap::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid #666;
	border-bottom: 2px solid #666;
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}

.rdef-status {
	min-height: 20px;
	margin-bottom: 12px;
	font-size: 14px;
	color: #555;
}

.rdef-status .rdef-count {
	font-weight: 700;
	color: #111;
}

.rdef-empty,
.rdef-error {
	padding: 24px;
	text-align: center;
	background: #f6f7f8;
	border: 1px dashed #ccc;
	border-radius: 8px;
	color: #555;
}

.rdef-error {
	background: #fdf0f0;
	border-color: #e0a0a0;
	color: #a33;
}

/* Product grid */

.rdef-grid {
	display: grid;
	grid-template-columns: repeat(var(--rdef-cols, 3), 1fr);
	gap: 20px;
}

.rdef-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.rdef-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.rdef-card-img {
	display: block;
	background: #fafafa;
}

.rdef-card-img img {
	width: 100%;
	height: auto;
	display: block;
}

.rdef-card-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 14px;
	flex: 1;
}

.rdef-card-title {
	font-size: 15px;
	font-weight: 600;
	color: #111;
	text-decoration: none;
	line-height: 1.35;
}

.rdef-card-title:hover {
	text-decoration: underline;
}

.rdef-card-tags {
	font-size: 12px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.rdef-card-price {
	font-size: 15px;
	font-weight: 700;
	color: #222;
	margin-top: auto;
}

.rdef-btn {
	display: inline-block;
	margin-top: 6px;
	padding: 9px 14px;
	text-align: center;
	background: #1d2939;
	color: #fff !important;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.15s ease;
}

.rdef-btn:hover {
	background: #0f1724;
}

/* Loading dots */

.rdef-loading {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.rdef-loading span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #999;
	animation: rdef-pulse 1s infinite ease-in-out;
}

.rdef-loading span:nth-child(2) { animation-delay: 0.15s; }
.rdef-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes rdef-pulse {
	0%, 80%, 100% { opacity: 0.25; }
	40% { opacity: 1; }
}

/* Responsive */

@media (max-width: 1024px) {
	.rdef-grid {
		grid-template-columns: repeat(min(2, var(--rdef-cols, 3)), 1fr);
	}
}

@media (max-width: 768px) {
	.rdef-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}
	.rdef-filter-group {
		flex: 1 1 auto;
	}
	.rdef-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.rdef-grid {
		grid-template-columns: 1fr;
	}
	.rdef-select {
		padding: 12px 36px 12px 12px;
		font-size: 16px; /* avoid iOS zoom on focus */
	}
}
