/* Shop by Brand: /brands A-Z list ([product_brand_list], woocommerce/shortcodes/brands-a-z.php). LC-063. */

.lac-brands-a-z {
	max-width: 1100px;
	margin: 0 auto;
	text-align: left;
}

/* Letter jump links */
.lac-brands-a-z .brands_index {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0 0 30px;
	padding: 0;
	list-style: none;
}

.lac-brands-a-z .brands_index li {
	margin: 0;
}

.lac-brands-a-z .brands_index a,
.lac-brands-a-z .brands_index span {
	display: inline-block;
	min-width: 34px;
	padding: 6px 8px;
	border: 1px solid #ccc3b7;
	border-radius: 4px;
	background: #fff;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
}

.lac-brands-a-z .brands_index a {
	color: #DA241B;
}

.lac-brands-a-z .brands_index a:hover,
.lac-brands-a-z .brands_index a:focus {
	background: #DA241B;
	border-color: #DA241B;
	color: #fff;
}

.lac-brands-a-z .brands_index span {
	color: #ccc3b7;
}

/* Letter headings */
.lac-brands-a-z h3 {
	margin: 30px 0 12px;
	padding-bottom: 6px;
	border-bottom: 1px dashed #ccc3b7;
	text-transform: uppercase;
	scroll-margin-top: 140px; /* clear the sticky header when jumping */
}

/* Brands in each letter */
.lac-brands-a-z .brands {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lac-brands-a-z .brands li {
	margin: 0;
}

.lac-brands-a-z .brands a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	height: 100%;
	padding: 12px 16px;
	border: 1px solid #ccc3b7;
	border-radius: 4px;
	background: #fff;
	color: inherit;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lac-brands-a-z .brands a:hover,
.lac-brands-a-z .brands a:focus {
	border-color: #DA241B;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	color: #DA241B;
}

.lac-brands-a-z .brands li.has-logo a {
	min-height: 110px;
}

.lac-brands-a-z .brands li.has-logo img {
	max-width: 100%;
	max-height: 80px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.lac-brands-a-z a.top {
	display: inline-block;
	margin-top: 10px;
	font-size: 14px;
}

@media (max-width: 600px) {
	.lac-brands-a-z .brands {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	/* Two narrow cards per row: smaller, tighter text so names wrap between words, never mid-word. */
	.lac-brands-a-z .brands a {
		padding: 10px 8px;
		font-size: 13px;
		letter-spacing: 0.02em;
		line-height: 1.3;
		word-break: normal;
		overflow-wrap: normal;
		hyphens: manual;
	}
}
