/* Страница брендов (09.10.2026, этап 3 аудита): pages/brands/index.php, поиск — assets/js/brands2.js.
   Плитки одного размера: белая карточка, логотип по центру (object-fit: contain), название и число товаров; телефон — 3 колонки. */
.bp {
    --bp-brand: #b74923; --bp-soft: #fbefe9; --bp-ink: #1c1a19; --bp-text: #3b3633; --bp-muted: #6b625d;
    --bp-line: #ebe5e1; --bp-field: #d8cfc9;
    color: var(--bp-ink); padding: 14px 0 40px; font-variant-numeric: tabular-nums;
}
.bp *, .bp *::before, .bp *::after { box-sizing: border-box; }
.bp [hidden] { display: none !important; }
.bp ul { list-style: none; margin: 0; padding: 0; }
.bp-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--bp-muted); margin-bottom: 12px; }
.bp-crumbs a { color: var(--bp-text); text-decoration: none; }

.bp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 14px; }
.bp-head h1 { margin: 0; font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--bp-ink); }
.bp-head p { margin: 4px 0 0; color: var(--bp-muted); font-size: 15px; }
.bp-search { position: relative; display: block; width: min(100%, 380px); color: var(--bp-muted); }
.bp-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.bp-search input { width: 100%; height: 48px; padding: 0 14px 0 44px; border: 1px solid var(--bp-field); border-radius: 5px; background: #fff;
    font: inherit; font-size: 16px; color: var(--bp-ink); }
.bp-search input:focus { outline: none; border-color: var(--bp-brand); box-shadow: 0 0 0 3px rgba(183, 73, 35, .15); }

.bp-az { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bp-az a { display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--bp-line); border-radius: 5px;
    background: #fff; color: var(--bp-text); font-size: 15px; font-weight: 600; text-decoration: none; }

.bp-sec { margin-top: 24px; }
.bp-sec h2 { margin: 0 0 12px; font-size: 21px; font-weight: 700; color: var(--bp-ink); }
.bp-group { margin-top: 18px; scroll-margin-top: calc(var(--fh-h, 126px) + 12px); }
.bp-letter { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--bp-line); font-size: 18px; font-weight: 700; color: var(--bp-brand); }

.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.bp-grid--big { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
.bp-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; padding: 12px 10px 10px; text-align: center;
    background: #fff; border: 1px solid var(--bp-line); border-radius: 5px; text-decoration: none; color: var(--bp-ink); transition: border-color .15s; }
.bp-tile__logo { display: grid; place-items: center; width: 100%; height: 60px; margin-bottom: 4px; }
.bp-tile__logo img { width: auto; height: auto; max-width: 100%; max-height: 52px; object-fit: contain; }
.bp-tile--big .bp-tile__logo { height: 76px; }
.bp-tile--big .bp-tile__logo img { max-height: 64px; }
.bp-tile__word { font-size: 18px; font-weight: 800; letter-spacing: .02em; color: var(--bp-ink); overflow-wrap: anywhere; line-height: 1.15; }
.bp-tile__name { max-width: 100%; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-tile__n { margin-top: auto; font-size: 12.5px; color: var(--bp-muted); }
.bp-none { margin: 20px 0 0; font-size: 16px; color: var(--bp-text); }
.bp-none a { color: var(--bp-brand); font-weight: 600; }

.bp a:focus-visible, .bp-search input:focus-visible { outline: 2px solid var(--bp-brand); outline-offset: 2px; }
@media (hover: hover) {
    .bp-tile:hover { border-color: var(--bp-brand); }
    .bp-tile:hover .bp-tile__name { color: var(--bp-brand); }
    .bp-az a:hover { border-color: var(--bp-brand); color: var(--bp-brand); }
    .bp-crumbs a:hover { color: var(--bp-brand); }
}

@media (max-width: 600px) {
    .bp { padding-top: 10px; }
    .bp-head h1 { font-size: 24px; }
    .bp-search { width: 100%; }
    .bp-az { flex-wrap: nowrap; overflow-x: auto; margin-inline: -15px; padding: 0 15px 4px; scrollbar-width: none; }
    .bp-az::-webkit-scrollbar { display: none; }
    .bp-az a { flex: none; min-width: 40px; height: 40px; }
    .bp-sec h2 { font-size: 19px; }
    .bp-grid, .bp-grid--big { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .bp-tile { padding: 10px 6px 8px; gap: 2px; }
    .bp-tile__logo, .bp-tile--big .bp-tile__logo { height: 46px; }
    .bp-tile__logo img, .bp-tile--big .bp-tile__logo img { max-height: 38px; }
    .bp-tile__word { font-size: 14px; }
    .bp-tile__name { font-size: 13px; }
    .bp-tile__n { font-size: 12.5px; } /* было 11,5 px (аудит FE-21) */
}
@media (prefers-reduced-motion: reduce) { .bp-tile { transition: none; } }
