/* Brand directory page: [product_brand_thumbnails] logo grid and [product_brand_list] A–Z list. */

.absa-brands-dir .entry-content > p:first-child { color: var(--absa-muted, #707070); font-size: 15px; }

/* Logo grid: WooCommerce floats and percentage widths replaced by a grid of equal cards. */
.absa-brands-dir ul.brand-thumbnails { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 24px 0 40px; padding: 0; list-style: none; }
.absa-brands-dir ul.brand-thumbnails::before,
.absa-brands-dir ul.brand-thumbnails::after { content: none; }
.absa-brands-dir ul.brand-thumbnails li { float: none; clear: none; width: auto !important; margin: 0 !important; padding: 0; }
.absa-brands-dir ul.brand-thumbnails li a { display: flex; align-items: center; justify-content: center; height: 104px; padding: 16px 20px; border: 1px solid var(--absa-border, #e5e5e5); border-radius: var(--absa-radius, 16px); background: #fff; transition: border-color .15s, box-shadow .15s; }
.absa-brands-dir ul.brand-thumbnails li a:hover { border-color: #c7c7c7; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
/* WooCommerce prints width/height 600×600 and lazy logos use sizes="auto", so a fixed box keeps every logo the same size. */
.absa-brands-dir ul.brand-thumbnails li img { width: 100%; max-width: 100%; height: 52px; object-fit: contain; }

/* A–Z list. */
.absa-brands-dir #brands_a_z { margin-bottom: 40px; }
.absa-brands-dir ul.brands_index { display: flex; flex-wrap: wrap; gap: 6px; overflow: visible; margin: 16px 0 24px; padding: 0; list-style: none; }
.absa-brands-dir ul.brands_index li { float: none; margin: 0; }
.absa-brands-dir ul.brands_index li a,
.absa-brands-dir ul.brands_index li span { float: none; display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--absa-border, #e5e5e5); border-radius: 999px; background: var(--absa-chip, #f7f7f7); color: var(--absa-text, #191919); font-size: 14px; font-weight: 600; line-height: 1; text-decoration: none; text-transform: uppercase; }
.absa-brands-dir ul.brands_index li a:hover,
.absa-brands-dir ul.brands_index li a.active { padding: 0 10px; border-width: 1px; border-color: var(--absa-text, #191919); background: var(--absa-text, #191919); color: #fff; }
.absa-brands-dir ul.brands_index li span { color: #c7c7c7; }

.absa-brands-dir #brands_a_z h3 { margin: 0; padding: 16px 0 8px; border-top: 1px solid var(--absa-border, #e5e5e5); font-size: 20px; line-height: 28px; text-transform: uppercase; scroll-margin-top: 140px; }
.absa-brands-dir #brands_a_z h3:target { text-decoration: none; color: var(--absa-link, #0968f6); }
.absa-brands-dir #brands_a_z ul.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px 16px; margin: 0 0 16px; padding: 0; list-style: none; }
.absa-brands-dir #brands_a_z ul.brands li { margin: 0; }
.absa-brands-dir #brands_a_z ul.brands a { display: block; padding: 6px 0; color: var(--absa-text, #191919); font-size: 15px; font-weight: 600; text-decoration: none; }
.absa-brands-dir #brands_a_z ul.brands a:hover { color: var(--absa-link, #0968f6); text-decoration: underline; }
/* The per-letter "↑ Top" links add noise to a short list; the index stays reachable by scrolling. */
.absa-brands-dir div#brands_a_z a.top { display: none; }

@media (max-width: 999px) {
	.absa-brands-dir ul.brand-thumbnails { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 689px) {
	.absa-brands-dir ul.brand-thumbnails { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 32px; }
	.absa-brands-dir ul.brand-thumbnails li a { height: 80px; padding: 12px 16px; border-radius: 12px; }
	.absa-brands-dir ul.brand-thumbnails li img { height: 40px; }
	.absa-brands-dir ul.brands_index li a,
	.absa-brands-dir ul.brands_index li span { min-width: 32px; height: 32px; font-size: 13px; }
	.absa-brands-dir #brands_a_z ul.brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
