/**
 * Страница «Бренды» (page-brands.php, классы .sr-br*). Подключается только на /brands/.
 * Дизайн-код SoundRoom: заголовки Unbounded капсом, линии #E6E8EC, скругления 16–24, один синий акцент.
 */
body.sr-doc-body .sr-br { --br-line: #E6E8EC; --br-soft: #F7F8FA; --br-muted: #6B7280; --br-ease: cubic-bezier(.22, 1, .36, 1); padding-top: 20px; padding-bottom: 96px; }
.sr-br ul { margin: 0; padding: 0; list-style: none; }
.sr-br li { margin: 0; }
.sr-br p { margin: 0; }

/* --- Шапка --- */
.sr-br__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.sr-br__title { margin: 0 0 16px; font-family: var(--font-heading); font-weight: 800; font-size: clamp(40px, 7vw, 88px); line-height: .98; letter-spacing: -0.04em; text-transform: uppercase; color: var(--c-text); }
.sr-br__lead { max-width: 560px; font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: var(--br-muted); }
.sr-br__stats { display: flex; gap: 0; margin: 0; flex: 0 0 auto; }
.sr-br__stats > div { padding: 0 0 0 28px; margin-left: 28px; border-left: 1px solid var(--br-line); }
.sr-br__stats > div:first-child { margin-left: 0; padding-left: 0; border-left: 0; }
.sr-br__stats dt { font-family: var(--font-heading); font-weight: 800; font-size: clamp(32px, 3.6vw, 48px); line-height: 1; letter-spacing: -0.035em; color: var(--c-text); }
.sr-br__stats dd { margin: 8px 0 0; font-size: 14px; color: var(--br-muted); }

/* --- Поиск --- */
.sr-br__search { position: relative; display: block; margin-bottom: 64px; }
.sr-br__search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: #9CA3AF; pointer-events: none; }
.sr-br__search input {
	width: 100%;
	height: 60px;
	padding: 0 20px 0 52px;
	border: 1px solid var(--br-line);
	border-radius: 18px;
	background: #fff;
	font: 500 16px/1 var(--font-body);
	color: var(--c-text);
	box-shadow: none;
	outline: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.sr-br__search input:focus { border-color: var(--c-text); box-shadow: 0 0 0 4px rgba(15, 23, 42, .06); }
.sr-br__search input::placeholder { color: #9CA3AF; }

/* --- Заголовки секций --- */
.sr-br__sec { margin-bottom: 88px; }
.sr-br__h2 { margin: 0 0 28px; font-family: var(--font-heading); font-weight: 800; font-size: clamp(24px, 3vw, 40px); line-height: 1.05; letter-spacing: -0.03em; text-transform: uppercase; color: var(--c-text); }
.sr-br__h2 span { color: #C3C8D0; }

/* --- Карточки с логотипами --- */
.sr-br__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 16px; }
.sr-br__card > a {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--br-line);
	border-radius: 22px;
	background: #fff;
	color: var(--c-text) !important;
	text-decoration: none !important;
	transition: border-color .25s ease, transform .5s var(--br-ease), box-shadow .5s var(--br-ease);
}
.sr-br__card > a:hover { border-color: #CBD2DB; transform: translateY(-4px); box-shadow: 0 24px 44px -30px rgba(15, 23, 42, .45); }
.sr-br__logo { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--br-soft); transition: background-color .3s ease; }
.sr-br__card > a:hover .sr-br__logo { background: #EEF4FF; }
.sr-br__logo img { display: block; width: auto; height: auto; max-width: 56%; max-height: 50%; margin: 0; object-fit: contain; transition: transform .6s var(--br-ease); }
.sr-br__card > a:hover .sr-br__logo img { transform: scale(1.06); }
.sr-br__card-body { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 18px; }
.sr-br__card-name { font-size: 16px; font-weight: 600; line-height: 1.3; }
.sr-br__card-meta { font-size: 13px; color: var(--br-muted); }
.sr-br__card-go { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c-text); color: #fff; opacity: 0; transform: translate(-4px, 4px); transition: opacity .25s ease, transform .4s var(--br-ease); }
.sr-br__card > a:hover .sr-br__card-go { opacity: 1; transform: none; }

/* --- Все бренды A–Z --- */
.sr-br__all-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: 28px; }
.sr-br__all-head .sr-br__h2 { margin: 0; }
.sr-br__letters { display: flex; flex-wrap: wrap; gap: 6px; }
.sr-br__letters a { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; border: 1px solid var(--br-line); border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--c-text) !important; text-decoration: none !important; transition: background-color .2s ease, border-color .2s ease, color .2s ease; }
.sr-br__letters a:hover { border-color: var(--c-text); background: var(--c-text); color: #fff !important; }
.sr-br__letters a.is-off { opacity: .3; pointer-events: none; }

.sr-br__index { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; }
.sr-br__cols { columns: 3 200px; column-gap: 32px; }
.sr-br__letter { break-inside: avoid; margin-bottom: 28px; scroll-margin-top: 110px; }
.sr-br__letter-mark { display: block; margin: 0 0 8px 10px; font-family: var(--font-heading); font-weight: 800; font-size: 22px; line-height: 1; color: var(--c-accent); }
.sr-br__item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--c-text) !important; text-decoration: none !important; transition: background-color .15s ease, color .15s ease; }
.sr-br__item:hover, .sr-br__item.is-active { background: #EEF4FF; color: var(--c-primary-deep) !important; }
.sr-br__item-n { flex: 0 0 auto; font-size: 12.5px; font-weight: 500; color: #9CA3AF; }
.sr-br__empty { padding: 24px 10px; font-size: 15px; color: var(--br-muted); }
.sr-br__empty a { color: var(--c-primary-dark); }

/* Панель с товарами бренда (заполняет sr-brands.js) */
.sr-br__panel { position: sticky; top: 96px; }
.sr-br__panel-in { padding: 24px; border: 1px solid var(--br-line); border-radius: 24px; background: var(--br-soft); min-height: 240px; }
.sr-brp__head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.sr-brp__logo { flex: 0 0 auto; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: #fff; border: 1px solid var(--br-line); overflow: hidden; }
.sr-brp__logo img { max-width: 70%; max-height: 60%; width: auto; height: auto; margin: 0; }
.sr-brp__letter { font-family: var(--font-heading); font-weight: 800; font-size: 22px; color: var(--c-accent); }
.sr-brp__name { font-family: var(--font-heading); font-weight: 700; font-size: 20px; line-height: 1.15; letter-spacing: -0.02em; color: var(--c-text); }
.sr-brp__meta { margin-top: 3px; font-size: 13px; color: var(--br-muted); }
.sr-brp__list { display: grid; gap: 4px; margin: 0 -8px 16px; }
.sr-brp__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; color: var(--c-text) !important; text-decoration: none !important; transition: background-color .15s ease; }
.sr-brp__row:hover { background: #fff; }
.sr-brp__thumb { width: 44px; height: 44px; border-radius: 10px; background: #E9ECF0 center / cover no-repeat; }
.sr-brp__title { font-size: 14px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sr-brp__price { text-align: right; font-size: 14px; font-weight: 700; white-space: nowrap; }
.sr-brp__price del { display: block; font-size: 12px; font-weight: 400; color: #9CA3AF; }
.sr-brp__row.is-oos .sr-brp__price { color: #9CA3AF; font-weight: 500; font-size: 12.5px; }
.sr-brp__all { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 14px; background: var(--c-text); color: #fff !important; font-size: 14.5px; font-weight: 600; text-decoration: none !important; transition: opacity .2s ease; }
.sr-brp__all:hover { opacity: .88; }

/* --- Бренды без логотипа: бегущие ленты --- */
.sr-br__marquee-sec { margin: 0 0 88px; }
.sr-br__marquee {
	overflow: hidden;
	margin: 0 calc(50% - 50vw) 12px;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.sr-br__track { display: flex; gap: 12px; width: max-content; padding: 4px 0; animation: sr-br-marquee 70s linear infinite; }
.sr-br__marquee.is-reverse .sr-br__track { animation-direction: reverse; animation-duration: 80s; }
.sr-br__marquee:hover .sr-br__track { animation-play-state: paused; }
@keyframes sr-br-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.sr-br__chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 0 12px 0 24px;
	border: 1px solid var(--br-line);
	border-radius: 999px;
	background: #fff;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: -0.02em;
	white-space: nowrap;
	color: var(--c-text) !important;
	text-decoration: none !important;
	transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.sr-br__chip:hover { border-color: var(--c-text); background: var(--c-text); color: #fff !important; }
.sr-br__chip-n { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: #EEF4FF; font-family: var(--font-body); font-size: 12.5px; font-weight: 600; color: var(--c-primary-deep); }
.sr-br__chip:hover .sr-br__chip-n { background: rgba(255, 255, 255, .16); color: #fff; }

/* --- Не нашли бренд --- */
.sr-br__cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; padding: 36px 40px; border-radius: 28px; background: linear-gradient(135deg, #EEF5FF 0%, #E3EEFF 100%); }
.sr-br__cta-title { margin: 0 0 8px; font-family: var(--font-heading); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; letter-spacing: -0.03em; text-transform: uppercase; color: var(--c-text); }
.sr-br__cta p { font-size: 15.5px; color: #4B5563; }
.sr-br__cta-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px; border-radius: 16px; background: var(--c-accent); color: #fff !important; font-size: 15.5px; font-weight: 600; text-decoration: none !important; transition: background-color .2s ease; }
.sr-br__cta-btn:hover { background: var(--c-primary-dark); }

/* Поиск: скрытые элементы */
.sr-br [data-hidden] { display: none !important; }

@media (max-width: 1100px) {
	.sr-br__index { grid-template-columns: minmax(0, 1fr); }
	.sr-br__panel { display: none; }
	.sr-br__cols { columns: 3 180px; }
}
@media (max-width: 760px) {
	body.sr-doc-body .sr-br { padding-bottom: 64px; }
	.sr-br__head { flex-direction: column; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
	.sr-br__search { margin-bottom: 48px; }
	.sr-br__search input { height: 54px; border-radius: 16px; font-size: 15.5px; }
	.sr-br__sec { margin-bottom: 64px; }
	.sr-br__h2 { margin-bottom: 20px; }
	.sr-br__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.sr-br__card > a { border-radius: 18px; }
	.sr-br__logo { aspect-ratio: 16 / 11; }
	.sr-br__card-body { padding: 12px 14px 14px; }
	.sr-br__card-name { font-size: 14.5px; }
	.sr-br__card-meta { font-size: 12px; }
	.sr-br__card-go { display: none; }
	.sr-br__cols { columns: 2 140px; column-gap: 12px; }
	.sr-br__item { padding: 7px 8px; font-size: 14.5px; }
	.sr-br__letters { gap: 5px; }
	.sr-br__letters a { min-width: 32px; height: 32px; }
	.sr-br__chip { height: 48px; padding: 0 10px 0 18px; font-size: 15px; }
	.sr-br__chip-n { min-width: 28px; height: 28px; }
	.sr-br__cta { flex-direction: column; align-items: stretch; padding: 26px 22px; border-radius: 22px; }
	.sr-br__cta-btn { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	.sr-br__track { animation: none; flex-wrap: wrap; width: auto; }
	.sr-br__track [aria-hidden="true"] { display: none; }
	.sr-br__card > a, .sr-br__logo img, .sr-br__card-go { transition: none; }
}
