/* ─── AAH Car Specs & Prices — Frontend Styles ──────────────────────────────
   Prefix: aah-cs-
   Direction: RTL
   Font: Noto Kufi Arabic
   ─────────────────────────────────────────────────────────────────────────── */

:root {
	--aah-red:          #E31E24;
	--aah-red-hover:    #c4181d;
	--aah-dark:         #1a1a1a;
	--aah-bg:           #f4f4f4;
	--aah-card:         #ffffff;
	--aah-border:       #e8e8e8;
	--aah-text:         #333333;
	--aah-text-muted:   #777777;
	--aah-price-grad:   linear-gradient(135deg, #FFF5F5, #FFF9F9);
	--aah-radius:       14px;
	--aah-shadow:       0 2px 16px rgba(0,0,0,.08);
	--aah-shadow-hover: 0 6px 28px rgba(0,0,0,.13);
	--aah-transition:   0.2s ease;
}

/* ─── Grid ───────────────────────────────────────────────────────────────── */

.aah-cs-grid {
	display: grid;
	gap: 24px;
	direction: rtl;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
	padding: 0;
	margin: 0;
	list-style: none;
}

.aah-cs-cols-1 { grid-template-columns: 1fr; }
.aah-cs-cols-2 { grid-template-columns: repeat(2, 1fr); }
.aah-cs-cols-3 { grid-template-columns: repeat(3, 1fr); }
.aah-cs-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
	.aah-cs-cols-2,
	.aah-cs-cols-3,
	.aah-cs-cols-4 {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 769px) and (max-width: 1024px) {
	.aah-cs-cols-3,
	.aah-cs-cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}
}

.aah-cs-no-results {
	text-align: center;
	color: var(--aah-text-muted);
	padding: 32px;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
}

/* ─── Card ───────────────────────────────────────────────────────────────── */

.aah-cs-card {
	background: var(--aah-card);
	border-radius: var(--aah-radius);
	box-shadow: var(--aah-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow var(--aah-transition), transform var(--aah-transition);
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
}

.aah-cs-card:hover {
	box-shadow: var(--aah-shadow-hover);
	transform: translateY(-2px);
}

/* ─── Carousel ───────────────────────────────────────────────────────────── */

.aah-cs-carousel {
	position: relative;
	overflow: hidden;
	background: #f8f8f8;
	flex-shrink: 0;
	/* Fixed height — same for every card regardless of image ratio */
	height: 220px;
}

.aah-cs-carousel-track {
	display: flex;
	height: 100%;
	transition: transform 0.38s cubic-bezier(.4,0,.2,1);
}

.aah-cs-slide {
	min-width: 100%;
	height: 100%;
	flex-shrink: 0;
	background: #f8f8f8;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
}

.aah-cs-slide img {
	/* Scale to fit the box — never stretch, never crop */
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: auto;
}

.aah-cs-slide-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f4f4f4;
}

.aah-cs-slide-placeholder svg {
	width: 60%;
	height: 60%;
}

/* Badge */
.aah-cs-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--aah-red);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 20px;
	letter-spacing: 0.02em;
	z-index: 2;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
	line-height: 1.5;
}

/* Arrows */
.aah-cs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,.88);
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	color: var(--aah-dark);
	box-shadow: 0 1px 6px rgba(0,0,0,.18);
	transition: background var(--aah-transition);
}

.aah-cs-arrow:hover {
	background: rgba(255,255,255,1);
}

.aah-cs-arrow-prev { right: 8px; }
.aah-cs-arrow-next { left: 8px; }

/* Dots */
.aah-cs-dots {
	position: absolute;
	bottom: 8px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 5px;
	z-index: 3;
}

.aah-cs-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: rgba(255,255,255,.55);
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background var(--aah-transition), transform var(--aah-transition);
}

.aah-cs-dot.active {
	background: #fff;
	transform: scale(1.3);
}

/* Counter */
.aah-cs-counter {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(0,0,0,.45);
	color: #fff;
	font-size: 11px;
	padding: 3px 8px;
	border-radius: 12px;
	z-index: 2;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
}

/* ─── Title Area ─────────────────────────────────────────────────────────── */

.aah-cs-title-area {
	padding: 14px 16px 8px;
}

.aah-cs-name-ar {
	font-size: 17px;
	font-weight: 700;
	color: var(--aah-dark);
	margin: 0 0 3px;
	line-height: 1.4;
}

.aah-cs-name-en {
	font-size: 12px;
	color: var(--aah-text-muted);
	margin: 0;
	font-weight: 400;
}

/* ─── Trim Selector ──────────────────────────────────────────────────────── */

.aah-cs-trim-selector {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 6px;
	padding: 0 16px 10px;
}

.aah-cs-trim-btn {
	background: #f8f8f8;
	border: 1.5px solid var(--aah-border);
	border-radius: 8px;
	padding: 7px 6px;
	cursor: pointer;
	text-align: center;
	transition: background var(--aah-transition), border-color var(--aah-transition), color var(--aah-transition);
	display: flex;
	flex-direction: column;
	gap: 3px;
	align-items: center;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
}

.aah-cs-trim-btn:hover {
	border-color: var(--aah-red);
}

.aah-cs-trim-btn.active {
	background: var(--aah-red);
	border-color: var(--aah-red);
	color: #fff;
}

.aah-cs-trim-name {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}

.aah-cs-trim-price-tag {
	font-size: 10px;
	opacity: .75;
	line-height: 1.2;
}

.aah-cs-trim-btn.active .aah-cs-trim-price-tag {
	opacity: .88;
}

/* ─── Price Box ──────────────────────────────────────────────────────────── */

.aah-cs-price-box {
	margin: 4px 16px 12px;
	background: var(--aah-price-grad);
	border: 1.5px solid #ffd6d6;
	border-radius: 10px;
	padding: 12px 16px;
	text-align: center;
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 6px;
}

.aah-cs-price-amount {
	font-size: 24px;
	font-weight: 800;
	color: var(--aah-red);
	line-height: 1;
	letter-spacing: -0.02em;
	font-feature-settings: "tnum";
}

.aah-cs-price-currency {
	font-size: 14px;
	font-weight: 600;
	color: var(--aah-red);
	opacity: .75;
}

/* ─── Action Buttons ─────────────────────────────────────────────────────── */

.aah-cs-actions {
	display: flex;
	gap: 8px;
	padding: 0 16px 14px;
}

.aah-cs-btn-specs,
.aah-cs-btn-catalogue {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
	cursor: pointer;
	text-decoration: none;
	transition: background var(--aah-transition), color var(--aah-transition), border-color var(--aah-transition);
	line-height: 1.4;
}

.aah-cs-btn-specs {
	background: #f8f8f8;
	border: 1.5px solid var(--aah-border);
	color: var(--aah-dark);
}

.aah-cs-btn-specs:hover,
.aah-cs-btn-specs.active {
	background: var(--aah-red);
	border-color: var(--aah-red);
	color: #fff;
}

.aah-cs-btn-catalogue {
	background: var(--aah-dark);
	border: 1.5px solid var(--aah-dark);
	color: #fff;
}

.aah-cs-btn-catalogue:hover {
	background: #333;
	border-color: #333;
	color: #fff;
}

/* ─── Specs Panel ────────────────────────────────────────────────────────── */

.aah-cs-specs-panel {
	border-top: 1px solid var(--aah-border);
	padding: 4px 0 0;
	animation: aahFadeIn .22s ease forwards;
}

@keyframes aahFadeIn {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ─── Accordion ──────────────────────────────────────────────────────────── */

.aah-cs-accordion-section {
	border-bottom: 1px solid var(--aah-border);
}

.aah-cs-accordion-section:last-child {
	border-bottom: none;
}

.aah-cs-accordion-header {
	width: 100%;
	background: none;
	border: none;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	text-align: right;
	font-family: 'Noto Kufi Arabic', 'Tajawal', sans-serif;
	transition: background var(--aah-transition);
}

.aah-cs-accordion-header:hover {
	background: #fafafa;
}

.aah-cs-acc-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.aah-cs-acc-icon svg {
	width: 20px;
	height: 20px;
}

.aah-cs-acc-label {
	flex: 1;
	font-size: 13px;
	font-weight: 600;
	color: var(--aah-dark);
}

.aah-cs-acc-chevron {
	color: var(--aah-text-muted);
	font-size: 18px;
	line-height: 1;
	transition: transform var(--aah-transition);
	display: inline-block;
}

.aah-cs-accordion-header[aria-expanded="true"] .aah-cs-acc-chevron {
	transform: rotate(-90deg);
}

.aah-cs-accordion-body {
	padding: 0 16px 12px;
	animation: aahFadeIn .18s ease;
}

/* ─── Spec List ──────────────────────────────────────────────────────────── */

.aah-cs-spec-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.aah-cs-spec-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 7px 0;
	border-bottom: 1px solid #f3f3f3;
	gap: 8px;
}

.aah-cs-spec-row:last-child {
	border-bottom: none;
}

.aah-cs-spec-label {
	font-size: 12px;
	color: var(--aah-text-muted);
	flex: 1;
	line-height: 1.5;
}

.aah-cs-spec-value {
	font-size: 13px;
	font-weight: 600;
	color: var(--aah-dark);
	text-align: left;
	flex-shrink: 0;
}

.aah-cs-spec-check {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.aah-cs-spec-bool .aah-cs-spec-label {
	color: var(--aah-text);
}
