/* =====================================================
   Elahe Brands – Frontend styles (v1.1.1)
   High specificity + resets to fight theme conflicts
   ===================================================== */

.elahe-brands-wrapper {
	display: flex !important;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	box-sizing: border-box;
	color: #111827;
	line-height: 1.5;
	direction: ltr; /* force LTR layout for brands UI */
}

.elahe-brands-wrapper *,
.elahe-brands-wrapper *::before,
.elahe-brands-wrapper *::after {
	box-sizing: border-box;
}

/* ---------- Sidebar ---------- */
.elahe-brands-wrapper .elahe-brands-sidebar {
	flex: 0 0 200px;
	min-width: 180px;
}

.elahe-brands-wrapper .elahe-brands-nav {
	display: flex !important;
	flex-direction: column !important;
	gap: 4px;
	background: #ffffff;
	border-radius: 12px;
	padding: 12px 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	border: 1px solid #f3f4f6;
}

.elahe-brands-wrapper .elahe-nav-item {
	display: block !important;
	padding: 12px 16px !important;
	border-radius: 8px !important;
	color: #374151 !important;
	text-decoration: none !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	transition: all 0.15s ease;
	line-height: 1.4 !important;
	margin: 0 !important;
}

.elahe-brands-wrapper .elahe-nav-item:hover {
	background: #f3f4f6 !important;
	color: #111827 !important;
}

.elahe-brands-wrapper .elahe-nav-item.active {
	background: #1d4ed8 !important;
	color: #ffffff !important;
}

/* ---------- Main content ---------- */
.elahe-brands-wrapper .elahe-brands-main {
	flex: 1;
	min-width: 0;
}

/* Filters bar */
.elahe-brands-wrapper .elahe-brands-filters {
	background: #ffffff;
	border-radius: 12px;
	padding: 16px 20px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	border: 1px solid #f3f4f6;
}

.elahe-brands-wrapper .elahe-filter-row {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 6px;
	margin-bottom: 12px;
}

.elahe-brands-wrapper .elahe-filter-row:last-child {
	margin-bottom: 0;
}

.elahe-brands-wrapper .elahe-filter-label {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: #374151 !important;
	margin-right: 8px;
	min-width: 70px;
	display: inline-block;
}

/* Search input */
.elahe-brands-wrapper .elahe-search-row {
	margin-bottom: 16px;
}

.elahe-brands-wrapper .elahe-search-wrap {
	position: relative;
	flex: 1;
	max-width: 320px;
	display: block;
}

.elahe-brands-wrapper .elahe-brands-search-input {
	width: 100% !important;
	height: 40px !important;
	padding: 0 40px 0 14px !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 8px !important;
	font-size: 14px !important;
	color: #111827 !important;
	background: #ffffff !important;
	outline: none !important;
	box-shadow: none !important;
	margin: 0 !important;
	line-height: 1.4 !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.elahe-brands-wrapper .elahe-brands-search-input::placeholder {
	color: #9ca3af !important;
}

.elahe-brands-wrapper .elahe-brands-search-input:focus {
	border-color: #93c5fd !important;
	box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15) !important;
}

.elahe-brands-wrapper .elahe-search-icon {
	position: absolute !important;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 14px;
	pointer-events: none;
	opacity: 0.5;
	line-height: 1;
	z-index: 2;
}

/* Origin & Alphabet buttons – heavy reset against theme button styles */
.elahe-brands-wrapper .elahe-origin-btn,
.elahe-brands-wrapper .elahe-letter-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-width: 32px !important;
	height: 32px !important;
	padding: 0 10px !important;
	margin: 0 !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 6px !important;
	background: #ffffff !important;
	background-color: #ffffff !important;
	color: #4b5563 !important;
	font-size: 13px !important;
	font-weight: 500 !important;
	font-family: inherit !important;
	cursor: pointer !important;
	transition: all 0.15s ease;
	line-height: 1 !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	text-shadow: none !important;
	outline: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.elahe-brands-wrapper .elahe-origin-btn:hover,
.elahe-brands-wrapper .elahe-letter-btn:hover {
	border-color: #93c5fd !important;
	color: #1d4ed8 !important;
	background: #eff6ff !important;
	background-color: #eff6ff !important;
}

.elahe-brands-wrapper .elahe-origin-btn.active,
.elahe-brands-wrapper .elahe-letter-btn.active {
	background: #1d4ed8 !important;
	background-color: #1d4ed8 !important;
	border-color: #1d4ed8 !important;
	color: #ffffff !important;
}

.elahe-brands-wrapper .elahe-origin-btn.active:hover,
.elahe-brands-wrapper .elahe-letter-btn.active:hover {
	background: #1e40af !important;
	background-color: #1e40af !important;
	border-color: #1e40af !important;
	color: #ffffff !important;
}

/* ---------- Brand cards grid ---------- */
.elahe-brands-wrapper .elahe-brands-grid {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

@media (max-width: 1100px) {
	.elahe-brands-wrapper .elahe-brands-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 800px) {
	.elahe-brands-wrapper {
		flex-direction: column !important;
	}
	.elahe-brands-wrapper .elahe-brands-sidebar {
		flex: none;
		width: 100%;
	}
	.elahe-brands-wrapper .elahe-brands-nav {
		flex-direction: row !important;
		flex-wrap: wrap !important;
	}
	.elahe-brands-wrapper .elahe-brands-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.elahe-brands-wrapper .elahe-brands-grid {
		grid-template-columns: 1fr;
	}
}

/* Individual card */
.elahe-brands-wrapper .elahe-brand-card {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	background: #ffffff !important;
	border-radius: 12px !important;
	padding: 28px 16px 20px !important;
	text-decoration: none !important;
	color: inherit !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
	border: 1px solid #f3f4f6 !important;
	transition: all 0.2s ease;
	min-height: 160px;
	cursor: pointer;
	margin: 0 !important;
}

.elahe-brands-wrapper .elahe-brand-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1) !important;
	border-color: #dbeafe !important;
	transform: translateY(-2px);
	text-decoration: none !important;
}

.elahe-brands-wrapper .elahe-brand-logo {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	height: 56px;
	margin-bottom: 14px;
	width: 100%;
}

.elahe-brands-wrapper .elahe-brand-logo img {
	max-height: 52px !important;
	max-width: 140px !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
	border: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

.elahe-brands-wrapper .elahe-brand-placeholder {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 64px;
	height: 40px;
	background: #eff6ff !important;
	color: #1d4ed8 !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	border-radius: 6px;
}

.elahe-brands-wrapper .elahe-brand-name {
	font-size: 13px !important;
	font-weight: 600 !important;
	color: #1d4ed8 !important;
	text-align: center !important;
	line-height: 1.3 !important;
	margin-bottom: 4px !important;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.elahe-brands-wrapper .elahe-brand-fullname {
	font-size: 12px !important;
	color: #6b7280 !important;
	text-align: center !important;
	line-height: 1.3 !important;
	text-transform: uppercase;
	margin: 0 !important;
}

/* Empty state */
.elahe-brands-wrapper .elahe-no-brands,
.elahe-brands-wrapper .elahe-brands-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 48px 20px;
	color: #9ca3af !important;
	font-size: 15px !important;
	background: #ffffff;
	border-radius: 12px;
}

/* Hidden by JS filter */
.elahe-brands-wrapper .elahe-brand-card.is-hidden {
	display: none !important;
}
