/* WooCommerce brands grid shortcode. */
.wc-brands-grid__wrapper {
	width: 100%;
}

.wc-brands-grid__toolbar {
	margin: 0 0 24px;
}

.wc-brands-grid__search-label {
	color: #202833;
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.wc-brands-grid__search-control {
	align-items: center;
	display: flex;
}
.wc-brands-grid__search-control input {
    margin: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.wc-brands-grid__search {
	background: var(--white, #fff);
	border-color: var(--white, #fff);
	border-radius: 4px 0 0 4px;
	box-sizing: border-box;
	color: #202833;
	display: block;
	flex: 1;
	font-size: 1rem;
	height: 42px;
	line-height: 1.4;
	min-width: 0;
	margin: 0;
	padding: 10px 12px;
	width: 100%;
}

.wc-brands-grid__search-icon {
	background-color: var(--primary, #8f1f1e);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'%3E%3Ccircle cx='11.35' cy='11.35' r='6' fill='none' stroke='%23fff' stroke-width='1.5'/%3E%3Cline x1='15.59' y1='15.59' x2='20.65' y2='20.65' stroke='%23fff' stroke-width='1.5'/%3E%3C/svg%3E");
	background-position: center;
	background-repeat: no-repeat;
	background-size: 26px 26px;
	border-radius: 0 4px 4px 0;
	display: block;
	flex-shrink: 0;
	height: 42px;
	width: 42px;
}

.wc-brands-grid__search:focus-visible {
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.2);
	outline: 0;
}

.wc-brands-grid__no-results {
	color: #5d6672;
	margin: 0 0 24px;
}

.wc-brands-grid__item[hidden],
.wc-brands-grid__no-results[hidden] {
	display: none;
}

.wc-brands-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.wc-brands-grid--columns-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.wc-brands-grid--columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wc-brands-grid--columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wc-brands-grid--columns-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wc-brands-grid--columns-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wc-brands-grid--columns-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.wc-brands-grid__item {
	list-style: none;
	margin: 0;
	min-width: 0;
}

.wc-brands-grid__card {
	align-items: center;
	background: #fff;
	border: 1px solid #e3e5e8;
	border-radius: 6px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: center;
	min-height: 190px;
	padding: 24px 16px 20px;
	text-align: center;
	text-decoration: none;
	transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.wc-brands-grid__card:hover {
	border-color: #c5cbd3;
	box-shadow: 0 8px 22px rgba(24, 33, 45, 0.1);
	transform: translateY(-2px);
}

.wc-brands-grid__card:focus-visible {
	border-color: #1d4ed8;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.25);
	outline: 0;
}

.wc-brands-grid__logo {
	align-items: center;
	display: flex;
	height: 92px;
	justify-content: center;
	margin-bottom: 16px;
	width: 100%;
	display: none;
}

.wc-brands-grid__image {
	display: block;
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: 100%;
}

.wc-brands-grid__logo-fallback {
	color: #5d6672;
	display: block;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.wc-brands-grid__title {
	color: #202833;
	display: block;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.35;
}

@media (max-width: 959px) {
	.wc-brands-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	.wc-brands-grid {
		gap: 14px;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.wc-brands-grid__card {
		min-height: 160px;
		padding: 18px 12px 16px;
	}

	.wc-brands-grid__logo {
		height: 72px;
		margin-bottom: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wc-brands-grid__card {
		transition: none;
	}
}
