/**
 * Aalam Motors — Categories Grid widget styles (standalone plugin).
 *
 * Premium photo-icon category grid. CSS provides only structural
 * baseline; all cosmetic properties come from Elementor controls.
 *
 * Class prefix: acg- (separate from Cars Carousel acc-)
 */

/* =============================================================
 * RESET / SCOPE
 * ========================================================== */
.acg-categories-grid,
.acg-categories-grid * {
	box-sizing: border-box;
}

.acg-categories-grid {
	width: 100%;
}

/* =============================================================
 * GRID CONTAINER
 * ========================================================== */
.acg-cat-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 18px;
	width: 100%;
}

/* =============================================================
 * CARD
 * ========================================================== */
.acg-cat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 18px 14px 14px 14px;
	background-color: #F1F5F9;
	background-image: linear-gradient(180deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 60%);
	border: 1px solid #E2E8F0;
	border-radius: 18px;
	text-decoration: none;
	color: inherit;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	cursor: pointer;
	transition:
		background-color 0.25s ease,
		border-color 0.25s ease,
		box-shadow 0.25s ease,
		transform 0.25s ease;
	-webkit-tap-highlight-color: transparent;
}

.acg-cat-card:hover {
	background-color: #FFFFFF;
	border-color: #0B2545;
	box-shadow: 0 12px 28px rgba(11, 37, 69, 0.10);
	transform: translateY(-4px);
}

.acg-cat-card:focus-visible {
	outline: 2px solid #0B2545;
	outline-offset: 2px;
}

/* =============================================================
 * IMAGE
 * ========================================================== */
.acg-cat-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 65%;
	height: 65%;
	flex-shrink: 0;
	overflow: visible;
}

.acg-cat-image img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: 100%;
	height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 8px 12px rgba(11, 37, 69, 0.18));
	transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.acg-cat-card:hover .acg-cat-image img {
	transform: scale(1.06);
}

/* =============================================================
 * LABEL TEXT BLOCK
 * ========================================================== */
.acg-cat-text {
	margin-top: 10px;
	text-align: center;
	width: 100%;
}

.acg-cat-label {
	color: #0B2545;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	margin: 0;
}

.acg-cat-sublabel {
	color: #94A3B8;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.3;
	margin-top: 2px;
}

/* =============================================================
 * BADGE
 * ========================================================== */
.acg-cat-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 18px;
	padding: 3px 8px;
	background-color: #0B2545;
	color: #FFFFFF;
	border-radius: 999px;
	font-size: 9px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* =============================================================
 * EDITOR EMPTY STATE
 * ========================================================== */
.acg-empty {
	padding: 30px;
	text-align: center;
	color: #64748B;
	background: #F8FAFC;
	border: 2px dashed #CBD5E1;
	border-radius: 8px;
}

/* =============================================================
 * MOBILE — optional horizontal scroll
 * ========================================================== */
@media (max-width: 767px) {

	.acg-cat-grid--mobile-scroll {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: visible;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		touch-action: pan-x;
		padding: 4px 14px 4px 14px;
		margin: 0 -14px;
	}

	.acg-cat-grid--mobile-scroll::-webkit-scrollbar {
		display: none;
		width: 0;
		height: 0;
	}

	.acg-cat-grid--mobile-scroll > .acg-cat-card {
		flex: 0 0 auto;
		width: 110px;
		scroll-snap-align: start;
		aspect-ratio: 1 / 1;
	}

	.acg-cat-card {
		padding: 12px 10px 10px 10px;
		border-radius: 14px;
	}

	.acg-cat-image {
		width: 55%;
		height: 55%;
	}

	.acg-cat-label {
		font-size: 11px;
	}

	.acg-cat-sublabel {
		font-size: 10px;
	}
}

/* =============================================================
 * REDUCED MOTION
 * ========================================================== */
@media (prefers-reduced-motion: reduce) {
	.acg-cat-card,
	.acg-cat-image img {
		transition: none !important;
	}
	.acg-cat-card:hover {
		transform: none !important;
	}
	.acg-cat-card:hover .acg-cat-image img {
		transform: none !important;
	}
}
