/*
 * Color/font values are aliased from Elementor's Global Colors & Global Fonts
 * (Site Settings > Global Colors / Global Fonts) with static fallbacks in case
 * Elementor isn't active. Edit the aliases below to remap roles, or point a
 * var() straight at a custom global color's own --e-global-color-<id>.
 */
.blp-brand-list-wrapper {
	--blp-color-heading:  var(--e-global-color-secondary, #1a1a1a);
	--blp-color-body:     var(--e-global-color-text, #555555);
	--blp-color-accent:   var(--e-global-color-primary, #4054b2);
	--blp-color-border:   var(--e-global-color-secondary, #e2e2e2);
	--blp-font-heading:   var(--e-global-typography-primary-font-family, inherit);
	--blp-font-body:      var(--e-global-typography-text-font-family, inherit);
	--blp-logo-height:    220px;
}

.blp-brand-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 12px;
	margin-bottom: 24px;
}

.blp-toolbar-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.blp-toolbar-field label {
	font-size: 0.75em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--blp-color-heading);
	font-family: var(--blp-font-body);
}

.blp-brand-toolbar input[type="search"],
.blp-brand-toolbar select {
	padding: 8px 12px;
	border: 1px solid var(--blp-color-border);
	border-radius: 6px;
	font-family: var(--blp-font-body);
	background: #fff;
	color: var(--blp-color-body);
}

.blp-toolbar-search {
	flex: 1 1 220px;
	min-width: 200px;
}

.blp-toolbar-search input[type="search"] {
	width: 100%;
	box-sizing: border-box;
}

.blp-brand-empty-message {
	width: 100%;
	color: var(--blp-color-body);
	font-style: italic;
}

.blp-brand-card[hidden],
.blp-category-group[hidden] {
	display: none;
}

.blp-category-title {
	margin: 32px 0 16px;
	color: var(--blp-color-heading);
	font-family: var(--blp-font-heading);
	padding-bottom: 8px;
	border-bottom: 2px solid var(--blp-color-accent);
}

.blp-brand-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	margin: 0 0 24px;
}

.blp-brand-grid.blp-columns-1 { grid-template-columns: repeat(1, 1fr); }
.blp-brand-grid.blp-columns-2 { grid-template-columns: repeat(2, 1fr); }
.blp-brand-grid.blp-columns-3 { grid-template-columns: repeat(3, 1fr); }
.blp-brand-grid.blp-columns-4 { grid-template-columns: repeat(4, 1fr); }
.blp-brand-grid.blp-columns-5 { grid-template-columns: repeat(5, 1fr); }
.blp-brand-grid.blp-columns-6 { grid-template-columns: repeat(6, 1fr); }

@media (max-width: 900px) {
	.blp-brand-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 600px) {
	.blp-brand-grid {
		grid-template-columns: 1fr !important;
	}
}

.blp-brand-card {
	border: 1px solid var(--blp-color-border);
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	background: transparent;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	/* Flex/grid items default to min-width:auto, which lets long unbroken
	   text (e.g. a long business name in the logo placeholder) force this
	   card -- and the whole grid -- wider than its column. */
	min-width: 0;
	max-width: 100%;
}

.blp-brand-card * {
	overflow-wrap: break-word;
	word-break: break-word;
	min-width: 0;
}

.blp-brand-card:hover {
	border-color: var(--blp-color-accent);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.blp-brand-logo {
	--blp-logo-scale: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.blp-brand-logo img {
	max-width: 100%;
	max-height: calc(var(--blp-logo-height) * var(--blp-logo-scale));
	width: auto;
	height: auto;
	object-fit: contain;
	margin-bottom: 12px;
}

/* Text-based stand-in for brands with no logo image, sized like a real one. */
.blp-logo-placeholder {
	width: 100%;
	height: calc(var(--blp-logo-height) * var(--blp-logo-scale));
	max-height: calc(var(--blp-logo-height) * var(--blp-logo-scale));
	box-sizing: border-box;
	padding: 12px;
	margin-bottom: 12px;
	border: 1px dashed var(--blp-color-border);
	border-radius: 6px;
	color: var(--blp-color-heading);
	font-family: var(--blp-font-heading);
	font-weight: 700;
	font-size: 1.15em;
	line-height: 1.3;
	text-align: center;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-box-pack: center;
	-webkit-line-clamp: 3;
}

.blp-brand-name {
	margin: 0 0 8px;
	font-size: 1.1em;
	color: var(--blp-color-heading);
	font-family: var(--blp-font-heading);
}

.blp-brand-name a {
	text-decoration: none;
	color: inherit;
	transition: color 0.2s ease;
}

.blp-brand-card:hover .blp-brand-name a {
	color: var(--blp-color-accent);
}

.blp-brand-description {
	font-size: 0.9em;
	color: var(--blp-color-body);
	font-family: var(--blp-font-body);
	margin: 0 0 8px;
}

.blp-brand-address {
	font-size: 0.85em;
	color: var(--blp-color-body);
	font-family: var(--blp-font-body);
	margin: 0 0 8px;
}

.blp-brand-address a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--blp-color-border);
	transition: color 0.2s ease;
}

.blp-brand-address a:hover {
	color: var(--blp-color-accent);
	text-decoration-color: currentColor;
}

.blp-brand-hours {
	width: 100%;
	font-size: 0.85em;
	font-family: var(--blp-font-body);
	margin-top: 8px;
}

.blp-brand-hours th {
	text-align: left;
	font-weight: 600;
	padding: 2px 8px 2px 0;
	color: var(--blp-color-heading);
}

.blp-brand-hours td {
	text-align: right;
	padding: 2px 0;
	color: var(--blp-color-body);
}

/*
 * Brand ticker/marquee -- [blp_brand_ticker]. Two identical copies of the
 * logo sequence sit side by side; animating the track by exactly -50% loops
 * seamlessly back to the start.
 */
.blp-ticker-wrapper {
	--blp-color-heading: var(--e-global-color-secondary, #1a1a1a);
	--blp-color-border:  var(--e-global-color-secondary, #e2e2e2);
	--blp-font-heading:  var(--e-global-typography-primary-font-family, inherit);
	overflow: hidden;
	width: 100%;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.blp-ticker-track {
	display: flex;
	width: max-content;
	animation: blp-ticker-scroll-left var(--blp-ticker-duration, 30s) linear infinite;
}

.blp-ticker-track.blp-ticker-right {
	animation-name: blp-ticker-scroll-right;
}

.blp-ticker-wrapper.blp-ticker-pause-hover:hover .blp-ticker-track {
	animation-play-state: paused;
}

.blp-ticker-set {
	display: flex;
	align-items: center;
	gap: var(--blp-ticker-gap, 48px);
	padding-right: var(--blp-ticker-gap, 48px);
}

.blp-ticker-item img {
	display: block;
	height: var(--blp-ticker-logo-height, 60px);
	width: auto;
	max-width: none;
	object-fit: contain;
}

.blp-ticker-item .blp-logo-placeholder {
	height: var(--blp-ticker-logo-height, 60px);
	max-height: var(--blp-ticker-logo-height, 60px);
	width: auto;
	min-width: 140px;
	max-width: 260px;
	margin-bottom: 0;
	padding: 0 14px;
	font-size: 0.85em;
	-webkit-line-clamp: 2;
	overflow-wrap: break-word;
	word-break: break-word;
}

@keyframes blp-ticker-scroll-left {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@keyframes blp-ticker-scroll-right {
	from { transform: translateX(-50%); }
	to   { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
	.blp-ticker-track {
		animation: none;
	}
}

/*
 * Brand carousel -- [blp_brand_carousel]. A scroll-snap track with dot
 * navigation and prev/next arrows; cards reuse .blp-brand-card so they match
 * the grid's aesthetic (Elementor Global Colors/Fonts, transparent background).
 */
.blp-carousel-wrapper {
	--blp-color-heading:  var(--e-global-color-secondary, #1a1a1a);
	--blp-color-body:     var(--e-global-color-text, #555555);
	--blp-color-accent:   var(--e-global-color-primary, #4054b2);
	--blp-color-border:   var(--e-global-color-secondary, #e2e2e2);
	--blp-font-heading:   var(--e-global-typography-primary-font-family, inherit);
	--blp-font-body:      var(--e-global-typography-text-font-family, inherit);
	--blp-logo-height:    120px;
	position: relative;
	padding: 0 44px;
}

.blp-carousel-track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	gap: 24px;
	scrollbar-width: none;
}

.blp-carousel-track::-webkit-scrollbar {
	display: none;
}

.blp-carousel-item.blp-brand-card {
	flex: 0 0 calc((100% - (var(--blp-carousel-cols, 5) - 1) * 24px) / var(--blp-carousel-cols, 5));
	scroll-snap-align: start;
}

@media (max-width: 900px) {
	.blp-carousel-item.blp-brand-card {
		flex-basis: calc((100% - 2 * 24px) / 3);
	}
}

@media (max-width: 600px) {
	.blp-carousel-item.blp-brand-card {
		flex-basis: 100%;
	}
}

.blp-carousel-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 1px solid var(--blp-color-border);
	background: #fff;
	color: var(--blp-color-heading);
	font-size: 1.2em;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.blp-carousel-arrow:hover {
	border-color: var(--blp-color-accent);
	color: var(--blp-color-accent);
}

.blp-carousel-prev { left: 0; }
.blp-carousel-next { right: 0; }

.blp-carousel-dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
}

.blp-carousel-dots button {
	width: 8px;
	height: 8px;
	padding: 0;
	border-radius: 50%;
	border: none;
	background: var(--blp-color-border);
	cursor: pointer;
	transition: background 0.2s ease;
}

.blp-carousel-dots button.blp-carousel-dot-active {
	background: var(--blp-color-accent);
}

.blp-carousel-visit-link {
	display: inline-block;
	margin-top: 8px;
	font-size: 0.75em;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--blp-color-accent);
	text-decoration: underline;
	font-family: var(--blp-font-body);
}
