/*
 * Elementor Shop Brands — mirrors the xsmokehub Brands page (Brands.tsx):
 * a search bar that live-filters brand cards — image with gradient overlay +
 * description pill, name + founded year, initial avatar, description tagline,
 * product count and "Browse →".
 * The Elementor controls override these defaults via generated CSS.
 */

/* ---- Wrapper ---- */
.esbr-brands {
	width: 100%;
}

/* ---- Search bar ---- */
.esbr-search {
	position: relative;
	max-width: 384px;
	margin-bottom: 40px;
}

.esbr-search-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 16px;
	height: 16px;
	color: #888888;
	pointer-events: none;
	z-index: 1;
}

.esbr-search-input {
	box-sizing: border-box;
	width: 100%;
	padding: 10px 16px 10px 42px;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background-color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: #222222;
	transition: border-color 0.2s ease;
}

/* Keep the left padding clear of the search icon even when a theme styles all
   inputs with its own padding (which would otherwise push text under the icon). */
.esbr-search .esbr-search-input {
	padding-left: 42px !important;
}

.esbr-search-input::placeholder {
	color: #bbbbbb;
}

.esbr-search-input:focus {
	outline: none;
	border-color: #222222;
}

/* ---- Grid ---- */
.esbr-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)); /* fallback; Elementor overrides */
	column-gap: 24px;
	row-gap: 24px;
}

/* ---- Brand card ---- */
.esbr-brand-card {
	box-sizing: border-box;
	display: block;
	background-color: #ffffff;
	border: 1px solid #e5e5e5;
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.esbr-brand-card:hover {
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
	border-color: #dcdcde;
}

/* Image: fixed height, hover zoom, gradient overlay + country pill */
.esbr-brand-image {
	position: relative;
	height: 176px;
	overflow: hidden;
	background-color: #f5f5f5;
}

.esbr-brand-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.esbr-brand-card:hover .esbr-brand-image img {
	transform: scale(1.05);
}

.esbr-brand-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-family: 'DM Serif Display', serif;
	font-size: 56px;
	line-height: 1;
	color: #222222;
}

.esbr-brand-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
	pointer-events: none;
}

.esbr-brand-country {
	position: absolute;
	bottom: 16px;
	left: 16px;
	display: inline-block;
	max-width: calc(100% - 32px);
	padding: 4px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	color: #ffffff;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.02em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Body */
.esbr-brand-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
}

.esbr-brand-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.esbr-brand-name {
	margin: 0 0 2px;
	font-family: 'Jost', sans-serif;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	color: #222222;
}

.esbr-brand-founded {
	margin: 0;
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.4;
	color: #888888;
}

.esbr-brand-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 999px;
	background-color: #f5f5f5;
	flex-shrink: 0;
	transition: background-color 0.2s ease;
}

.esbr-brand-card:hover .esbr-brand-avatar {
	background-color: #222222;
}

.esbr-brand-avatar span {
	font-family: 'Jost', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: #222222;
	transition: color 0.2s ease;
}

.esbr-brand-card:hover .esbr-brand-avatar span {
	color: #ffffff;
}

.esbr-brand-tagline {
	margin: 0 0 16px;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	font-weight: 400;
	font-style: italic;
	line-height: 1.5;
	color: #666666;
}

.esbr-brand-bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
}

.esbr-brand-count {
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 1;
	color: #888888;
}

.esbr-brand-browse {
	font-family: 'Jost', sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: #bbbbbb;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.esbr-brand-card:hover .esbr-brand-browse {
	color: #222222;
}

/* No results message */
.esbr-empty {
	text-align: center;
	margin: 40px 0 0;
	font-family: 'Jost', sans-serif;
	font-size: 14px;
	color: #888888;
}

/* ---- Responsive: tablet 2 columns, mobile 1 column ---- */
@media (max-width: 1024px) {
	.esbr-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	.esbr-grid {
		grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
	}
}
