/*
 * Car page hero extras: photo gallery, compact rating card and quick actions.
 * Scoped to builder widget classes; no global restyling.
 */

.autonameh-car-photo-gallery {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
}

.autonameh-car-photo-gallery__main {
	margin: 0;
	background: #eaf4ff;
	border: 1px solid #dce5f0;
	border-radius: 16px;
	overflow: hidden;
	aspect-ratio: 16 / 9;
}

.autonameh-car-photo-gallery__main a {
	display: block;
	width: 100%;
	height: 100%;
}

.autonameh-car-photo-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.autonameh-car-photo-gallery__thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 8px;
}

/*
 * Buttons are normalised by the Elementor global kit
 * (`.elementor-kit-N button`) which adds padding and a solid background. These
 * higher-specificity rules keep the thumbnail a bare image frame. Do not lower
 * the selector specificity back to a single class.
 */
.autonameh-car-photo-gallery .autonameh-car-photo-gallery__thumb {
	display: block;
	padding: 0;
	background: #eaf4ff;
	border: 1px solid #dce5f0;
	border-radius: 10px;
	overflow: hidden;
	cursor: pointer;
	aspect-ratio: 16 / 10;
	line-height: 0;
}

.autonameh-car-photo-gallery .autonameh-car-photo-gallery__thumb.is-active {
	border-color: #1078f0;
	box-shadow: 0 0 0 2px rgba(16, 120, 240, 0.25);
}

.autonameh-car-photo-gallery__thumb-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.autonameh-car-photo-gallery.is-placeholder .autonameh-car-photo-gallery__main,
.autonameh-car-photo-gallery.is-placeholder .autonameh-car-photo-gallery__thumb-image {
	background: linear-gradient(135deg, #d9e8f8, #f1f6fc 48%, #c8daee);
}

.autonameh-car-photo-gallery.is-placeholder .autonameh-car-photo-gallery__main {
	display: grid;
	place-items: center;
	color: #43516a;
	font-weight: 700;
}

.autonameh-car-rating-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	text-decoration: none;
}

.autonameh-car-rating-card:hover,
.autonameh-car-rating-card:focus-visible {
	text-decoration: none;
}

.autonameh-car-rating-card__score {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background: #eaf4ff;
	color: #0b56b3;
	flex: none;
}

.autonameh-car-rating-card__score strong {
	font-family: Estedad, Vazirmatn, sans-serif;
	font-size: 24px;
	line-height: 1;
}

.autonameh-car-rating-card__score small {
	font-size: 11px;
	color: #657084;
}

.autonameh-car-rating-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.autonameh-car-rating-card__body strong {
	color: #172033;
	font-size: 16px;
}

.autonameh-car-rating-card__body span {
	color: #657084;
	font-size: 12px;
}

.autonameh-car-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 4px;
}

.autonameh-car a.autonameh-car-action {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 8px 18px;
	border: 1px solid #dce5f0;
	border-radius: 999px;
	background: #fff;
	color: #0b56b3;
	font-size: 15px;
	line-height: 1.6;
	font-weight: 700;
	text-decoration: none;
}

.autonameh-car a.autonameh-car-action:hover,
.autonameh-car a.autonameh-car-action:focus-visible {
	background: #eaf4ff;
	border-color: #1078f0;
	color: #0b56b3;
	text-decoration: none;
}

@media (max-width: 767px) {
	.autonameh-car-photo-gallery__thumbs {
		gap: 6px;
	}

	.autonameh-car-hero-actions {
		gap: 8px;
	}

	.autonameh-car a.autonameh-car-action {
		flex: 0 1 auto;
		justify-content: center;
		font-size: 14px;
		min-height: 40px;
		padding: 7px 14px;
	}

	.autonameh-hero-col--info > .e-con-inner > .elementor-widget-autonameh_car_price {
		order: -1;
	}
}

/* Hero two-column container (Elementor). The container width control is not
   emitted for these containers, so the split is set through Elementor's own
   --width variable; below desktop the columns stack. Specificity must beat the
   base `.e-con` rule, which is loaded after this stylesheet. */
@media (min-width: 1025px) {
	.autonameh-hero-row > .e-con-inner {
		flex-wrap: nowrap !important;
		align-items: flex-start;
	}

	.autonameh-hero-col--gallery {
		--width: calc(54% - 16px) !important;
	}

	.autonameh-hero-col--info {
		--width: calc(46% - 16px) !important;
	}
}
