/**
 * YITH brand archives + brands index — align with Buldog / Electro Elementor archives.
 */

/* Brands index: YITH thumbnail grid as card tiles (override inline % widths). */
.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul::after {
	display: none;
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul li {
	width: auto !important;
	float: none;
	margin: 0;
	padding: 0;
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul li a {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	height: 100%;
	padding: 14px 10px;
	border: 1px solid #dcdcdc;
	border-radius: 10px;
	background: #fff;
	text-align: center;
	text-decoration: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul li a:hover,
.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul li a:focus {
	border-color: #c0c0c0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul li a img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 50px;
	margin: 0 auto 8px;
	object-fit: contain;
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .brand-info {
	width: 100%;
	font-size: 0.875rem;
	line-height: 1.35;
	color: #333;
}

.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .brand-info .woocommerce-product-rating {
	margin-top: 4px;
}

@media (max-width: 767px) {
	.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 8px;
	}

	.elementor-widget-yith_wcbr_brand_thumbnail .yith-wcbr-brand-thumbnail .yith-wcbr-thumbnail-list ul li a {
		padding: 10px 8px;
	}
}

/* Single brand archive: product tiles already show brand context — hide redundant YITH loop logos. */
.tax-yith_product_brand .buldog-wc-loop-item--elementor .elementor-widget-yith_wcbr_product_brand,
.tax-yith_product_brand li.product .yith-wcbr-brands-logo {
	display: none !important;
}
