/*
WRYEDGE DIRECT 2.0
Brands Page
v0.1.0-alpha1
*/


.brands-page {
    background:
        linear-gradient(
            180deg,
            #f7f9fb 0,
            #ffffff 340px
        );
    color: #111b25;
}


.brands-page__hero {
    padding:
        72px 0 56px;
    border-bottom:
        1px solid #e3e8ec;
}


.brands-page__kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: #d91f32;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}


.brands-page__kicker::before {
    content: "";
    width: 20px;
    height: 2px;
    background: #d91f32;
}


.brands-page__hero-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: end;
    gap: 48px;
}


.brands-page__hero h1 {
    margin: 0;
    font-size:
        clamp(
            42px,
            6vw,
            72px
        );
    line-height: .98;
    letter-spacing: -.045em;
    font-weight: 650;
}


.brands-page__hero p {
    max-width: 690px;
    margin:
        24px 0 0;
    color: #566573;
    font-size: 16px;
    line-height: 1.7;
}


.brands-page__stat {
    min-width: 160px;
    padding-left: 28px;
    border-left:
        1px solid #dce2e7;
}


.brands-page__stat strong {
    display: block;
    color: #111b25;
    font-size: 38px;
    line-height: 1;
    font-weight: 650;
}


.brands-page__stat span {
    display: block;
    margin-top: 7px;
    color: #71808c;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
}


.brands-directory {
    padding:
        58px 0 90px;
}


.brands-directory__heading {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(280px, 420px);
    align-items: end;
    gap: 38px;
}


.brands-directory__heading h2 {
    margin: 0;
    color: #1c2833;
    font-size:
        clamp(
            25px,
            3vw,
            31px
        );
    line-height: 1.1;
    font-weight: 600;
    letter-spacing: -.025em;
}


.brands-search {
    display: block;
}


.brands-search__label {
    display: block;
    margin-bottom: 8px;
    color: #5f6d78;
    font-size: 12px;
    font-weight: 700;
}


.brands-search input {
    width: 100%;
    height: 48px;
    padding:
        0 16px;
    border:
        1px solid #cfd8df;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: #111b25;
    font: inherit;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}


.brands-search input:focus {
    border-color: #d91f32;
    box-shadow:
        0 0 0 3px
        rgba(217, 31, 50, .08);
}


.brands-alphabet {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 34px;
    padding:
        14px;
    border:
        1px solid #e0e6ea;
    border-radius: 10px;
    background: #fafbfc;
}


.brands-letter {
    min-width: 34px;
    height: 34px;
    padding:
        0 9px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #52616d;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
    transition:
        color .15s ease,
        background .15s ease;
}


.brands-letter:hover:not(:disabled) {
    color: #c91e2e;
    background: #ffffff;
}


.brands-letter.is-active {
    background: #111b25;
    color: #ffffff;
}


.brands-letter:disabled {
    opacity: .24;
    cursor: default;
}


.brands-directory__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 52px;
}


.brands-directory__meta p {
    margin: 0;
    color: #72808b;
    font-size: 12px;
}


.brands-clear {
    border: 0;
    padding: 0;
    background: transparent;
    color: #c91e2e;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}


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


.brand-directory-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 190px;
    flex-direction: column;
    justify-content: space-between;
    padding:
        22px 20px 18px;
    border:
        1px solid #e0e6ea;
    border-radius: 10px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}


.brand-directory-card:hover,
.brand-directory-card:focus-visible {
    border-color:
        rgba(
            217,
            31,
            50,
            .58
        );
    box-shadow:
        0 10px 26px
        rgba(
            17,
            27,
            37,
            .065
        );
}


.brand-directory-card:focus-visible {
    outline: 2px solid #d91f32;
    outline-offset: 2px;
}


.brand-directory-card__logo {
    display: flex;
    height: 92px;
    align-items: center;
    justify-content: center;
    padding:
        8px 10px 18px;
}


.brand-directory-card__logo img {
    display: block;
    width: auto;
    max-width: 150px;
    max-height: 62px;
    object-fit: contain;
    filter:
        grayscale(1);
    opacity: .74;
    transition:
        filter .18s ease,
        opacity .18s ease;
}


.brand-directory-card:hover
.brand-directory-card__logo img {
    filter:
        grayscale(.15);
    opacity: .95;
}


.brand-directory-card__fallback {
    color: #273641;
    font-size: 19px;
    font-weight: 700;
    text-align: center;
}


.brand-directory-card__footer {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    padding-top: 15px;
    border-top:
        1px solid #edf0f2;
}


.brand-directory-card__name {
    min-width: 0;
    color: #1d2933;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}


.brand-directory-card__count {
    flex: none;
    color: #89949d;
    font-size: 10px;
    white-space: nowrap;
}


.brands-loading {
    grid-column:
        1 / -1;
    padding:
        60px 20px;
    border:
        1px dashed #d5dce1;
    border-radius: 10px;
    color: #7b8993;
    text-align: center;
}


.brands-empty {
    padding:
        70px 20px;
    text-align: center;
}


.brands-empty strong {
    display: block;
    color: #1c2833;
    font-size: 20px;
}


.brands-empty p {
    margin:
        8px 0 0;
    color: #78858f;
    font-size: 13px;
}


@media (max-width: 1180px) {

    .brands-grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

}


@media (max-width: 860px) {

    .brands-page__hero {
        padding:
            52px 0 42px;
    }


    .brands-page__hero-grid,
    .brands-directory__heading {
        grid-template-columns:
            1fr;
    }


    .brands-page__stat {
        min-width: 0;
        padding:
            0;
        border-left: 0;
    }


    .brands-grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

}


@media (max-width: 620px) {

    .brands-directory {
        padding:
            42px 0 64px;
    }


    .brands-alphabet {
        gap: 4px;
        padding:
            10px;
    }


    .brands-letter {
        min-width: 31px;
        height: 31px;
        padding:
            0 7px;
    }


    .brands-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
        gap: 10px;
    }


    .brand-directory-card {
        min-height: 166px;
        padding:
            17px 14px 14px;
    }


    .brand-directory-card__logo {
        height: 78px;
    }


    .brand-directory-card__logo img {
        max-width: 118px;
        max-height: 52px;
    }


    .brand-directory-card__footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

}


@media (max-width: 390px) {

    .brands-grid {
        grid-template-columns:
            1fr;
    }

}


/* BRANDS SORT + H1 RECOVERY v0.1.1-alpha1-fix1 */

/*
Smaller page title.
Placed late intentionally so it safely overrides
the original Brands hero typography.
*/

.brands-page__hero h1 {
    font-size:
        clamp(
            34px,
            3.2vw,
            46px
        );
}


/*
Search + sorting controls.
*/

.brands-directory__controls {
    display: grid;
    grid-template-columns:
        minmax(260px, 1fr)
        180px;
    align-items: end;
    gap: 12px;
}


.brands-sort {
    display: block;
}


.brands-sort select {
    width: 100%;
    height: 48px;
    padding:
        0 36px 0 14px;
    border:
        1px solid #cfd8df;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    color: #111b25;
    font: inherit;
    cursor: pointer;
    transition:
        border-color .18s ease,
        box-shadow .18s ease;
}


.brands-sort select:focus {
    border-color: #d91f32;
    box-shadow:
        0 0 0 3px
        rgba(217, 31, 50, .08);
}


@media (max-width: 720px) {

    .brands-directory__controls {
        grid-template-columns:
            1fr;
    }

}


/* BRANDS FILTER ALIGNMENT v0.1.1-alpha1-fix2 */

.brands-directory__controls {
    grid-template-columns:
        minmax(0, 1fr)
        158px;
    gap: 10px;
    width: 100%;
    min-width: 0;
}


.brands-search,
.brands-sort {
    min-width: 0;
}


.brands-search input,
.brands-sort select {
    box-sizing: border-box;
    max-width: 100%;
}


@media (max-width: 720px) {

    .brands-directory__controls {
        grid-template-columns:
            1fr;
    }

}


/* BRANDS HERO SOFT GRADIENT v0.1.1-alpha1-fix3 */

.brands-page__hero {
    background:
        radial-gradient(
            ellipse 72% 150% at 4% 48%,
            rgba(126, 174, 216, .15) 0%,
            rgba(126, 174, 216, .07) 36%,
            rgba(126, 174, 216, 0) 72%
        ),
        radial-gradient(
            ellipse 68% 145% at 96% 18%,
            rgba(222, 73, 94, .105) 0%,
            rgba(222, 73, 94, .045) 40%,
            rgba(222, 73, 94, 0) 74%
        ),
        linear-gradient(
            105deg,
            #f7fafc 0%,
            #fafcfd 34%,
            #fdfdfd 58%,
            #fff9fa 82%,
            #f8fbfd 100%
        );
}



/* ==========================================================
   WRYEDGE BRANDS PAGE 2.0 — NEWEST BRANDS ROW
   v0.1.2-brands-latest1-fix1
   ========================================================== */


/* Smaller, lighter hero title */

.brands-page__hero h1 {
    font-size:
        clamp(
            30px,
            2.7vw,
            38px
        );

    font-weight:
        620;

    line-height:
        1.04;

    letter-spacing:
        -.022em;
}


/* Dynamic latest-brands rail */

.brands-latest {
    padding:
        38px 0 0;
}


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


.brands-latest__heading h2 {
    margin:
        4px 0 0;

    color:
        #1c2833;

    font-size:
        clamp(
            22px,
            2vw,
            27px
        );

    font-weight:
        600;

    line-height:
        1.12;

    letter-spacing:
        -.02em;
}


.brands-latest__grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            5,
            minmax(0, 1fr)
        );

    gap:
        14px;
}


/*
Reuse normal brand cards but keep the new row
slightly denser than the full directory.
*/

.brand-directory-card--latest {
    min-height:
        166px;

    padding:
        18px 18px 15px;
}


.brand-directory-card--latest
.brand-directory-card__logo {
    height:
        82px;
}


.brand-directory-card--latest
.brand-directory-card__logo img {
    max-width:
        140px;

    max-height:
        58px;
}


/* Main directory follows naturally below */

.brands-latest
+
.brands-directory {
    padding-top:
        46px;
}


@media (max-width: 1180px) {

    .brands-latest__grid {
        grid-template-columns:
            repeat(
                4,
                minmax(0, 1fr)
            );
    }

}


@media (max-width: 860px) {

    .brands-latest {
        padding-top:
            30px;
    }


    .brands-latest__grid {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );
    }

}


@media (max-width: 620px) {

    .brands-latest__grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap:
            10px;
    }


    .brand-directory-card--latest {
        min-height:
            150px;
    }

}


@media (max-width: 390px) {

    .brands-latest__grid {
        grid-template-columns:
            1fr;
    }

}



/* ==========================================================
   BRAND TEXT LOGO FALLBACK v0.1.3
   ========================================================== */


/*
A brand without an uploaded logo remains visually
complete. The name occupies the same logo area as
a real manufacturer mark.
*/

.brand-directory-card__fallback-name {
    display:
        block;

    width:
        100%;

    padding:
        0 10px;

    color:
        #4f5962;

    font-size:
        clamp(
            17px,
            1.55vw,
            24px
        );

    font-weight:
        750;

    line-height:
        1.05;

    letter-spacing:
        -.025em;

    text-align:
        center;

    overflow-wrap:
        anywhere;
}


.brand-directory-card--text-logo
.brand-directory-card__logo {
    display:
        flex;

    align-items:
        center;

    justify-content:
        center;
}


.brand-directory-card--latest
.brand-directory-card__fallback-name {
    font-size:
        clamp(
            16px,
            1.35vw,
            21px
        );
}


@media (max-width: 620px) {

    .brand-directory-card__fallback-name {
        font-size:
            17px;
    }


    .brand-directory-card--latest
    .brand-directory-card__fallback-name {
        font-size:
            16px;
    }

}



/* ==========================================================
   BRANDS LOCALE POLISH v0.1.5
   ========================================================== */

/*
Give the localized sort value enough room for
"Naujausi pirmiausia" without clipping.
*/

.brands-directory__controls {
    grid-template-columns:
        minmax(0, 1fr)
        190px;
}


@media (max-width: 720px) {

    .brands-directory__controls {
        grid-template-columns:
            1fr;
    }

}

