/* --------------------------------------------------------------------------
   Modern Brands Page Styling
   -------------------------------------------------------------------------- */
.brands-page {
	padding: 10px 0 60px;
}

/* Featured Brands Grid (19 brands from main site) */
.brands-section--featured {
	margin-bottom: 30px;
}

.brands-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

/* Brand Card */
.brand-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 24px 20px 18px;
	text-decoration: none !important;
	color: inherit;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	box-shadow: 0 2px 8px -2px rgba(15, 23, 42, 0.04);
	min-height: 220px;
	box-sizing: border-box;
}

.brand-card:hover {
	border-color: #0e75bb;
	transform: translateY(-4px);
	box-shadow: 0 14px 28px -6px rgba(14, 117, 187, 0.16), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

.brand-card__logo-wrap {
	height: 160px;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 0;
	background: #ffffff;
	border-radius: 12px;
	padding: 8px 12px;
	box-sizing: border-box;
}

.brand-card__img {
	max-height: 140px;
	max-width: 95%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.25s ease;
	display: block;
	margin: 0 auto;
}

.brand-card:hover .brand-card__img {
	transform: scale(1.08);
}

.brand-card__initial {
	width: 90px;
	height: 90px;
	border-radius: 20px;
	background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
	color: #0e75bb;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	font-weight: 700;
	border: 1px solid #CBD5E1;
}

.brand-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	margin-top: 8px;
}

.brand-card__title {
	display: none !important;
}
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.brand-card:hover .brand-card__title {
	color: #0e75bb;
}

.brand-card__badge {
	display: inline-block;
	padding: 4px 14px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 20px;
	background: #EFF6FF;
	color: #0e75bb;
	letter-spacing: 0.01em;
	transition: all 0.2s ease;
}

.brand-card:hover .brand-card__badge {
	background: #0e75bb;
	color: #ffffff;
}

/* Toggle Button for All Brands */
.brands-toggle-wrap {
	display: flex;
	justify-content: center;
	margin: 35px 0;
}

.brands-toggle-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: #ffffff;
	border: 1.5px solid #CBD5E1;
	border-radius: 30px;
	padding: 14px 32px;
	font-size: 15px;
	font-weight: 600;
	color: #0e75bb;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
	transition: all 0.25s ease;
	outline: none;
}

.brands-toggle-btn:hover {
	background: #0e75bb;
	color: #ffffff;
	border-color: #0e75bb;
	box-shadow: 0 6px 20px rgba(14, 117, 187, 0.25);
	transform: translateY(-2px);
}

.brands-toggle-btn.is-active {
	background: #F1F5F9;
	color: #475569;
	border-color: #CBD5E1;
	box-shadow: none;
}

.brands-toggle-btn.is-active:hover {
	background: #E2E8F0;
	color: #0F172A;
}

.brands-toggle-btn__icon {
	transition: transform 0.25s ease;
}

.brands-toggle-btn.is-active .brands-toggle-btn__icon {
	transform: rotate(180deg);
}

/* Collapsible All Brands Section */
.brands-collapsible {
	margin-top: 20px;
	animation: brandsFadeIn 0.35s ease;
}

@keyframes brandsFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Toolbar */
.brands-toolbar {
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 20px 24px;
	margin-bottom: 35px;
	box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}

.brands-toolbar__search {
	margin-bottom: 18px;
}

.brands-search {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 580px;
}

.brands-search__icon {
	position: absolute;
	left: 16px;
	color: #94A3B8;
	pointer-events: none;
}

.brands-search__input {
	width: 100%;
	height: 48px;
	background: #F8FAFC;
	border: 1px solid #CBD5E1 !important;
	border-radius: 12px !important;
	padding: 0 44px 0 46px !important;
	font-size: 15px !important;
	color: #0F172A !important;
	outline: none !important;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.brands-search__input:focus {
	background: #ffffff !important;
	border-color: #0e75bb !important;
	box-shadow: 0 0 0 4px rgba(14, 117, 187, 0.12) !important;
}

.brands-search__clear {
	position: absolute;
	right: 12px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: #E2E8F0;
	border: none;
	color: #64748B;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background 0.15s ease;
}

.brands-search__clear:hover {
	background: #CBD5E1;
	color: #0F172A;
}

/* Alphabet Filter Nav */
.brands-toolbar__letters {
	overflow-x: auto;
	scrollbar-width: thin;
	padding-bottom: 4px;
}

.brands-toolbar__letters::-webkit-scrollbar {
	height: 4px;
}

.brands-toolbar__letters::-webkit-scrollbar-thumb {
	background: #CBD5E1;
	border-radius: 4px;
}

.brands-letters-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
}

.brands-letter-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	background: #F1F5F9;
	border: 1px solid transparent !important;
	border-radius: 8px !important;
	font-size: 14px;
	font-weight: 600;
	color: #475569;
	cursor: pointer;
	transition: all 0.18s ease;
	user-select: none;
	outline: none;
	box-sizing: border-box;
}

.brands-letter-pill:hover {
	background: #E2E8F0;
	color: #0F172A;
	transform: translateY(-1px);
}

.brands-letter-pill.is-active {
	background: #0e75bb !important;
	color: #ffffff !important;
	border-color: #0e75bb !important;
	box-shadow: 0 2px 8px rgba(14, 117, 187, 0.3) !important;
}

/* Alphabetical Directory */
.brands-alphabet-list {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.brands-letter-group {
	scroll-margin-top: 30px;
}

.brands-letter-group__header {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 16px;
}

.brands-letter-group__badge {
	font-size: 18px;
	font-weight: 700;
	color: #0e75bb;
	background: #EFF6FF;
	border: 1px solid rgba(14, 117, 187, 0.2);
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.brands-letter-group__line {
	flex: 1;
	height: 1px;
	background: #E2E8F0;
}

.brands-letter-group__count {
	font-size: 13px;
	font-weight: 500;
	color: #94A3B8;
	flex-shrink: 0;
}

.brands-letter-group__items {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}

/* Brand List Card */
.brand-list-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 12px;
	padding: 10px 16px;
	text-decoration: none !important;
	color: inherit;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.brand-list-card:hover {
	border-color: #0e75bb;
	background: #F8FAFC;
	transform: translateX(3px);
	box-shadow: 0 4px 12px rgba(14, 117, 187, 0.08);
}

.brand-list-card__thumb {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: #ffffff;
	border: 1px solid #F1F5F9;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	padding: 3px;
	box-sizing: border-box;
}

.brand-list-card__thumb img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.brand-list-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 8px;
	background: #F1F5F9;
	color: #64748B;
	font-size: 16px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.brand-list-card__info {
	flex: 1;
	min-width: 0;
}

.brand-list-card__name {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1E293B;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	transition: color 0.15s ease;
}

.brand-list-card:hover .brand-list-card__name {
	color: #0e75bb;
}

.brand-list-card__count {
	display: block;
	font-size: 12px;
	color: #64748B;
	margin-top: 2px;
}

.brand-list-card__arrow {
	color: #CBD5E1;
	flex-shrink: 0;
	transition: all 0.15s ease;
}

.brand-list-card:hover .brand-list-card__arrow {
	color: #0e75bb;
	transform: translateX(2px);
}

/* Not Found Block */
.brands-not-found {
	text-align: center;
	padding: 50px 20px;
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	margin: 20px 0 40px;
}

.brands-not-found__icon {
	margin-bottom: 16px;
}

.brands-not-found__text {
	font-size: 16px;
	color: #64748B;
	margin-bottom: 16px;
}

.brands-not-found__btn {
	display: inline-block;
	background: #0e75bb;
	color: #ffffff;
	border: none;
	padding: 10px 24px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.brands-not-found__btn:hover {
	background: #095990;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
	.brands-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

@media (max-width: 991px) {
	.brands-toolbar {
		padding: 16px;
	}
	.brands-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 16px;
	}
	.brand-card {
		padding: 18px 14px 14px;
		min-height: 180px;
	}
	.brand-card__logo-wrap {
		height: 130px;
	}
	.brand-card__img {
		max-height: 115px;
	}
	.brands-letter-group__items {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	}
}

@media (max-width: 650px) {
	.brands-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
	.brand-card {
		padding: 14px 10px 12px;
		min-height: 150px;
		border-radius: 12px;
	}
	.brand-card__logo-wrap {
		height: 105px;
	}
	.brand-card__img {
		max-height: 90px;
	}
	.brand-card__badge {
		font-size: 11px;
		padding: 2px 8px;
	}
	.brands-toggle-btn {
		width: 100%;
		padding: 12px 20px;
		font-size: 14px;
	}
	.brands-letter-group__items {
		grid-template-columns: 1fr;
	}
}


/* --------------------------------------------------------------------------
   Brand Page Hero (Визитка бренда)
   -------------------------------------------------------------------------- */
.brand-hero {
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 20px;
	padding: 28px 32px;
	margin-bottom: 30px;
	box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.04);
	box-sizing: border-box;
}

.brand-hero__top {
	display: flex;
	gap: 28px;
	align-items: flex-start;
}

.brand-hero__logo-box {
	width: 170px;
	height: 120px;
	flex-shrink: 0;
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 12px 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
	box-sizing: border-box;
}

.brand-hero__logo-img {
	max-height: 95px;
	max-width: 140px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

.brand-hero__logo-initial {
	width: 68px;
	height: 68px;
	border-radius: 16px;
	background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
	color: #0e75bb;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 700;
	border: 1px solid #CBD5E1;
}

.brand-hero__main {
	flex: 1;
	min-width: 0;
}

.brand-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 12px;
}

.brand-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	font-size: 13px;
	font-weight: 600;
	border-radius: 20px;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.brand-hero__badge--back {
	background: #F1F5F9;
	color: #475569;
}

.brand-hero__badge--back:hover {
	background: #E2E8F0;
	color: #0F172A;
	transform: translateX(-2px);
}

.brand-hero__badge--counter {
	background: #EFF6FF;
	color: #0e75bb;
}

.brand-hero__badge--official {
	background: #F0FDF4;
	color: #16A34A;
}

.brand-hero__title {
	font-size: 28px;
	font-weight: 700;
	color: #0F172A;
	margin: 0 0 12px;
	line-height: 1.25;
}

.brand-hero__desc {
	margin-top: 10px;
}

.brand-hero__desc-text {
	font-size: 14px;
	line-height: 1.65;
	color: #475569;
	transition: max-height 0.35s ease;
}

.brand-hero__desc-text.is-clamped {
	max-height: 68px;
	overflow: hidden;
	position: relative;
}

.brand-hero__desc-text.is-clamped::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 38px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #FFFFFF 100%);
	pointer-events: none;
}

.brand-hero__more-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	color: #0e75bb;
	font-size: 13px;
	font-weight: 600;
	padding: 6px 0 0;
	cursor: pointer;
	margin-top: 4px;
	outline: none;
	transition: color 0.15s ease;
}

.brand-hero__more-btn:hover {
	color: #095990;
}

.brand-hero__more-btn-icon {
	transition: transform 0.2s ease;
}

.brand-hero__more-btn.is-active .brand-hero__more-btn-icon {
	transform: rotate(180deg);
}

/* Empty Catalog State */
.brand-empty-catalog {
	text-align: center;
	background: #ffffff;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 50px 24px;
	margin: 20px 0 40px;
}

.brand-empty-catalog__icon {
	margin-bottom: 16px;
}

.brand-empty-catalog__title {
	font-size: 18px;
	font-weight: 600;
	color: #0F172A;
	margin: 0 0 8px;
}

.brand-empty-catalog__text {
	font-size: 14px;
	color: #64748B;
	max-width: 480px;
	margin: 0 auto 20px;
	line-height: 1.5;
}

.brand-empty-catalog__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #0e75bb;
	color: #ffffff !important;
	border-radius: 10px;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.2s ease;
}

.brand-empty-catalog__btn:hover {
	background: #095990;
}

/* Responsive */
@media (max-width: 767px) {
	.brand-hero {
		padding: 20px 16px;
		border-radius: 16px;
	}
	.brand-hero__top {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 16px;
	}
	.brand-hero__meta {
		justify-content: center;
	}
	.brand-hero__title {
		font-size: 22px;
	}
	.brand-hero__logo-box {
		width: 140px;
		height: 100px;
	}
	.brand-hero__logo-img {
		max-height: 80px;
		max-width: 120px;
	}
}
