.tw-brands-page {
    --brands-navy: #08264b;
    --brands-orange: #f45b0b;
    --brands-green: #16834a;
    --brands-text: #263a57;
    --brands-muted: #68758a;
    --brands-border: #dce3eb;
    min-height: 70vh;
    padding: 0 0 64px;
    background:
        radial-gradient(circle at 8% 8%, rgba(244, 91, 11, .08), transparent 22rem),
        linear-gradient(180deg, #f8fafc 0%, #f3f6f9 100%);
    color: var(--brands-text);
    font-family: Inter, Lato, sans-serif;
}

.tw-brands-page *,
.tw-brands-page *::before,
.tw-brands-page *::after { box-sizing: border-box; }

.tw-brands-shell {
    width: calc(100% - 48px);
    max-width: 1480px;
    margin: 0 auto;
}

.tw-brands-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    margin: 0;
    color: #78869a;
    font-size: 12px;
}

.tw-brands-breadcrumb a { color: #415675 !important; }
.tw-brands-breadcrumb .fa { color: #a4afbc; }

.tw-brands-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
    gap: 36px;
    align-items: center;
    padding: clamp(28px, 4vw, 58px);
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(120deg, rgba(255,255,255,.04), transparent 46%),
        var(--brands-navy);
    box-shadow: 0 18px 45px rgba(8, 38, 75, .15);
    color: #fff;
}

.tw-brands-hero::after {
    position: absolute;
    top: -90px;
    right: -70px;
    width: 340px;
    height: 340px;
    border: 55px solid rgba(255,255,255,.045);
    border-radius: 50%;
    content: "";
}

.tw-brands-hero__copy,
.tw-brands-search { position: relative; z-index: 1; }

.tw-brands-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
    color: #ffb383;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.tw-brands-hero h1 {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(30px, 4vw, 52px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.05;
    text-transform: none;
}

.tw-brands-hero p {
    max-width: 640px;
    margin: 0;
    color: #c9d6e4;
    font-size: 14px;
    line-height: 1.7;
}

.tw-brands-hero__stats {
    display: flex;
    gap: 22px;
    margin-top: 24px;
}

.tw-brands-hero__stats span {
    display: grid;
    gap: 2px;
    padding-left: 14px;
    border-left: 2px solid var(--brands-orange);
}

.tw-brands-hero__stats strong { color: #fff; font-size: 21px; }
.tw-brands-hero__stats small { color: #9fb1c5; font-size: 10px; text-transform: uppercase; }

.tw-brands-search {
    padding: 22px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
}

.tw-brands-search label {
    display: block;
    margin-bottom: 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.tw-brands-search__field {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 42px;
    align-items: center;
    height: 52px;
    border-radius: 9px;
    background: #fff;
    overflow: hidden;
}

.tw-brands-search__field > .fa {
    color: #718095;
    text-align: center;
}

.tw-brands-search input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    outline: 0;
    color: var(--brands-navy);
    font: inherit;
    font-size: 14px;
}

.tw-brands-search button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 7px;
    background: #edf2f6;
    color: #66758a;
    cursor: pointer;
}

.tw-brands-section { margin-top: 34px; }

.tw-brands-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.tw-brands-section__head h2 {
    margin: 0 0 4px;
    color: var(--brands-navy);
    font-size: clamp(21px, 2.4vw, 29px);
    font-weight: 800;
    letter-spacing: -.02em;
    text-transform: none;
}

.tw-brands-section__head p {
    margin: 0;
    color: var(--brands-muted);
    font-size: 12px;
}

.tw-brands-count {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--brands-border);
    border-radius: 999px;
    background: #fff;
    color: #53647a;
    font-size: 11px;
    font-weight: 700;
}

.tw-brands-featured,
.tw-brands-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.tw-brand-card {
    position: relative;
    display: grid;
    grid-template-rows: 105px auto;
    min-width: 0;
    border: 1px solid var(--brands-border);
    border-radius: 12px;
    background: #fff;
    color: var(--brands-navy) !important;
    overflow: hidden;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(8, 38, 75, .045);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.tw-brand-card[hidden] { display: none; }

.tw-brand-card:hover,
.tw-brand-card:focus {
    border-color: #f3a476;
    box-shadow: 0 14px 30px rgba(8, 38, 75, .1);
    transform: translateY(-3px);
}

.tw-brand-card__logo {
    position: relative;
    display: grid;
    place-items: center;
    padding: 18px;
    border-bottom: 1px solid #edf1f5;
    background: linear-gradient(145deg, #fff 30%, #f7f9fb 100%);
}

.tw-brand-card__logo img {
    display: block;
    width: 100%;
    max-width: 150px;
    height: 68px;
    object-fit: contain;
}

.tw-brand-card__fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: #eaf0f6;
    color: #294c70;
    font-size: 23px;
    font-weight: 800;
}

.tw-brand-card__fallback[hidden] { display: none; }

.tw-brand-card__verified {
    position: absolute;
    top: 9px;
    right: 9px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    border-radius: 999px;
    background: #eaf8ef;
    color: var(--brands-green);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

.tw-brand-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 14px 15px;
}

.tw-brand-card__body > span:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.tw-brand-card__body strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tw-brand-card__body small { color: #748196; font-size: 10px; }
.tw-brand-card__arrow { color: var(--brands-orange); font-size: 17px; }

.tw-brands-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 18px;
    padding: 12px;
    border: 1px solid var(--brands-border);
    border-radius: 11px;
    background: #fff;
}

.tw-brands-alphabet button {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: #f2f5f8;
    color: #4a5f78;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.tw-brands-alphabet button:hover,
.tw-brands-alphabet button.is-active {
    border-color: #ffb389;
    background: #fff0e7;
    color: #d94a00;
}

.tw-brands-empty {
    margin-top: 16px;
    padding: 36px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #fff;
    color: #627187;
    text-align: center;
}

.tw-brands-empty[hidden] { display: none; }
.tw-brands-empty .fa { display: block; margin-bottom: 9px; color: var(--brands-orange); font-size: 23px; }

@media (max-width: 1199px) {
    .tw-brands-featured,
    .tw-brands-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .tw-brands-hero { grid-template-columns: 1fr; gap: 24px; }
    .tw-brands-featured,
    .tw-brands-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .tw-brands-shell { width: calc(100% - 24px); }
    .tw-brands-page { padding-bottom: 40px; }
    .tw-brands-hero { padding: 26px 20px; border-radius: 13px; }
    .tw-brands-hero__stats { gap: 15px; }
    .tw-brands-search { padding: 15px; }
    .tw-brands-section { margin-top: 27px; }
    .tw-brands-section__head { align-items: start; }
    .tw-brands-featured,
    .tw-brands-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .tw-brand-card { grid-template-rows: 90px auto; }
    .tw-brand-card__logo { padding: 13px; }
    .tw-brand-card__logo img { height: 59px; }
    .tw-brand-card__body { padding: 12px; }
}

@media (max-width: 390px) {
    .tw-brands-hero__stats { flex-direction: column; gap: 9px; }
    .tw-brands-hero__stats span { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }
    .tw-brands-featured,
    .tw-brands-grid { grid-template-columns: 1fr; }
    .tw-brand-card { grid-template-columns: 108px minmax(0, 1fr); grid-template-rows: 86px; }
    .tw-brand-card__logo { border-right: 1px solid #edf1f5; border-bottom: 0; }
    .tw-brand-card__logo img { height: 52px; }
}

.tw-brand-collection {
    min-height: 70vh;
    padding-top: 18px;
}

.tw-brand-collection__breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    color: #718096;
    font-size: 12px;
}

.tw-brand-collection__breadcrumb a { color: #365b82; }

.tw-brand-collection__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
    padding: 22px 24px;
    border: 1px solid var(--brands-border);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #fff8f2 100%);
    box-shadow: 0 8px 24px rgba(8, 38, 75, .05);
}

.tw-brand-collection__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 20px;
}

.tw-brand-collection__identity > div { min-width: 0; }

.tw-brand-collection__logo {
    display: grid;
    width: 124px;
    height: 78px;
    flex: 0 0 auto;
    place-items: center;
    padding: 10px;
    border: 1px solid #e0e7ef;
    border-radius: 10px;
    background: #fff;
}

.tw-brand-collection__logo img { display: block; width: auto; max-width: 100%; height: auto; max-height: 54px; object-fit: contain; }
.tw-brand-collection__logo strong { color: var(--brands-navy); font-size: 32px; }
.tw-brand-collection__identity small { display: block; margin-bottom: 3px; color: var(--brands-orange); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tw-brand-collection__identity h1 { position: static; display: block; float: none !important; clear: both; width: 100%; margin: 0; color: var(--brands-navy); font-size: clamp(26px, 3vw, 38px); font-weight: 850; letter-spacing: -.03em; line-height: 1.15; }
.tw-brand-collection__identity p { display: block; clear: both; margin: 5px 0 0; color: #66758a; font-size: 13px; line-height: 1.5; }

.tw-brand-collection__summary {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    margin-top: 10px;
    padding: 7px 10px;
    border: 1px solid #c9d9e9;
    border-radius: 999px;
    background: #eef5fb;
    color: var(--brands-navy);
}

.tw-brand-collection__summary span { color: #56708b; font-size: 10px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.tw-brand-collection__summary strong { color: var(--brands-navy); font-size: 18px; line-height: 1; }

.tw-brand-collection__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding: 11px 14px;
    border: 1px solid var(--brands-border);
    border-radius: 9px;
    background: #fff;
    color: #5c6e83;
    font-size: 12px;
    font-weight: 650;
}

.tw-brand-collection__toolbar i { margin-right: 5px; color: var(--brands-orange); }
.tw-brand-collection__toolbar a { color: #0c4c8a; font-weight: 750; }

@media (max-width: 680px) {
    .tw-brand-collection__hero { align-items: flex-start; flex-direction: column; padding: 18px; }
    .tw-brand-collection__identity { align-items: flex-start; gap: 13px; }
    .tw-brand-collection__logo { width: 84px; height: 62px; }
    .tw-brand-collection__identity h1 { font-size: 25px; }
    .tw-brand-collection__identity p { font-size: 11px; }
    .tw-brand-collection__summary { margin-top: 8px; padding: 6px 9px; }
    .tw-brand-collection__summary strong { font-size: 16px; }
    .tw-brand-collection__toolbar { align-items: flex-start; flex-direction: column; }
}

/* ---------------------------------------------------------------------------
   Authorised brand landing page
   Hero banner image, category tiles and promo strip, shown only when a brand
   is marked as authorised. A standard brand keeps the plain listing above.
   --------------------------------------------------------------------------- */
.tw-brand-collection--authorised .tw-brand-collection__hero {
    position: relative;
    overflow: hidden;
    align-items: stretch;
}

.tw-brand-collection__hero-media {
    flex: 0 0 clamp(220px, 34%, 440px);
    align-self: stretch;
    border-radius: 10px;
    background: #0b1220;
    overflow: hidden;
}

.tw-brand-collection__hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 150px;
    object-fit: cover;
    object-position: center;
}

.tw-brand-collection__categories {
    margin-bottom: 16px;
    padding: 18px 20px 20px;
    border: 1px solid var(--brands-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(8, 38, 75, .05);
}

.tw-brand-collection__categories > h2 {
    margin: 0 0 14px;
    color: var(--brands-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.tw-brand-collection__category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.tw-brand-collection__category {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 14px 13px;
    border: 1px solid var(--brands-border);
    border-radius: 11px;
    background: linear-gradient(135deg, #fff 0%, #f7f9fc 100%);
    color: var(--brands-navy);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tw-brand-collection__category:hover {
    border-color: var(--brands-orange);
    box-shadow: 0 10px 22px rgba(8, 38, 75, .1);
    transform: translateY(-2px);
    color: var(--brands-navy);
}

.tw-brand-collection__category-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    font-size: 16px;
}

.tw-brand-collection__category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tw-brand-collection__category-name { font-size: 13px; font-weight: 750; line-height: 1.25; }
.tw-brand-collection__category-count { color: var(--brands-muted); font-size: 10.5px; font-weight: 650; }
.tw-brand-collection__category--more { background: #0b3158; color: #fff; border-color: #0b3158; }
.tw-brand-collection__category--more:hover { color: #fff; border-color: #0b3158; }
.tw-brand-collection__category--more .tw-brand-collection__category-icon { background: rgba(255, 255, 255, .14); color: #fff; }
.tw-brand-collection__category--more .tw-brand-collection__category-count { color: #cad8e6; }

.tw-brand-collection__promo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 16px;
    padding: 26px 30px;
    border-radius: 14px;
    background: #0b1220;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.tw-brand-collection__promo-copy { max-width: 460px; }
.tw-brand-collection__promo-copy h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 850;
    letter-spacing: -.02em;
    text-transform: uppercase;
}
.tw-brand-collection__promo-copy p { margin: 8px 0 0; color: #c6d2e2; font-size: 13px; line-height: 1.5; }

.tw-brand-collection__promo-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    padding: 10px 18px;
    border-radius: 7px;
    background: var(--brands-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.tw-brand-collection__promo-cta:hover { background: #d94f08; color: #fff; }

.tw-brand-collection__promo-points {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tw-brand-collection__promo-points li { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; }
.tw-brand-collection__promo-points i { color: var(--brands-orange); font-size: 15px; }

@media (max-width: 980px) {
    .tw-brand-collection__category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .tw-brand-collection--authorised .tw-brand-collection__hero { flex-direction: column; gap: 14px; }
    .tw-brand-collection--authorised .tw-brand-collection__identity { width: 100%; }
    .tw-brand-collection--authorised .tw-brand-collection__summary {
        gap: 5px;
        margin-top: 7px;
        padding: 5px 8px;
    }
    .tw-brand-collection--authorised .tw-brand-collection__summary span { font-size: 8px; }
    .tw-brand-collection--authorised .tw-brand-collection__summary strong { font-size: 14px; }
    .tw-brand-collection__hero-media {
        width: 100%;
        flex-basis: auto;
        aspect-ratio: 16 / 7;
        background: #fff;
    }
    .tw-brand-collection__hero-media img {
        height: 100%;
        min-height: 0;
        max-height: none;
        object-fit: contain;
    }
    .tw-brand-collection__categories { padding: 15px 12px 12px; }
    .tw-brand-collection__categories > h2 { margin-bottom: 10px; font-size: 10px; }
    .tw-brand-collection__category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .tw-brand-collection__category { align-items: center; gap: 5px; min-height: 108px; padding: 10px 6px; text-align: center; }
    .tw-brand-collection__category-icon { width: 28px; height: 28px; border-radius: 7px; font-size: 13px; }
    .tw-brand-collection__category-name { font-size: 10px; line-height: 1.2; }
    .tw-brand-collection__category-count { font-size: 8px; }
    .tw-brand-collection__promo { flex-direction: column; align-items: flex-start; gap: 18px; padding: 20px; }
    .tw-brand-collection__promo-copy { max-width: none; }
}
