/* TL_BRANDS_PAGE_V1: /brands — iPhone theme, light and dark */
.tl-brands-page {
    --bp-card: #f2f2f7;
    --bp-ink: #1c1c1e;
    --bp-muted: #6c6c70;
    --bp-fill: #fff;
    --bp-line: rgba(60,60,67,.14);
    --bp-blue: #007aff;
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px 32px 48px;
    color: var(--bp-ink);
}
html[data-theme="dark"] .tl-brands-page {
    --bp-card: #1c1c1e;
    --bp-ink: #fff;
    --bp-muted: #98989d;
    --bp-fill: #2c2c2e;
    --bp-line: rgba(84,84,88,.6);
    --bp-blue: #0a84ff;
}
.tl-brands-page__head {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}
.tl-brands-page__head h1 { margin: 0; font-size: 26px; font-weight: 900; color: var(--bp-ink); }
.tl-brands-page__head p { margin: 4px 0 0; font-size: 13px; color: var(--bp-muted); }
/* iOS search bar: full row under the title */
.tl-brands-page__search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 640px;
    height: 46px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--bp-card);
    transition: border-color .2s ease, background .2s ease;
}
.tl-brands-page__search:focus-within { border-color: var(--bp-blue); background: var(--bp-fill); }
.tl-brands-page__search svg { width: 19px; height: 19px; flex: none; fill: none; stroke: var(--bp-muted); stroke-width: 2; }
.tl-brands-page__search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 !important;
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    color: var(--bp-ink) !important;
    font: inherit;
    font-size: 15px !important;
}
.tl-brands-page__search input::placeholder { color: var(--bp-muted); }
.tl-brands-page__search input::-webkit-search-cancel-button { display: none; }
.tl-brands-page__search output {
    flex: none;
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bp-fill);
    color: var(--bp-muted);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.tl-brands-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.tl-brands-page__card {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 14px 10px 12px;
    border-radius: 16px;
    background: var(--bp-card);
    color: var(--bp-ink);
    text-align: center;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.tl-brands-page__card[hidden] { display: none; }
.tl-brands-page__card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.08); }
.tl-brands-page__logo {
    width: 100%;
    --logo-h: 84px;
    height: var(--logo-h);
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.tl-brands-page__logo img { display: block !important; width: 100% !important; height: var(--logo-h) !important; max-width: 100% !important; max-height: var(--logo-h) !important; object-fit: contain !important; padding: 8px !important; box-sizing: border-box !important; }
.tl-brands-page__logo b { font-size: 30px; font-weight: 900; color: #1c1c1e; }
.tl-brands-page__card strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 700;
}
.tl-brands-page__card small { font-size: 12px; color: var(--bp-muted); }
.tl-brands-page__empty { margin: 24px 0; text-align: center; color: var(--bp-muted); }
@media (max-width: 840px) {
    .tl-brands-page { padding: 16px 16px calc(96px + env(safe-area-inset-bottom, 0px)); }
    .tl-brands-page__head h1 { font-size: 22px; }
    .tl-brands-page__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .tl-brands-page__logo { --logo-h: 64px; }
    .tl-brands-page__card { padding: 10px 6px; border-radius: 14px; }
    .tl-brands-page__card strong { font-size: 12px; }
}
