.ps-featured-brands {
    width: 100%;
}

.ps-featured-brands__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.ps-featured-brands__card {
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 96px;
    padding: 14px;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.ps-featured-brands__card:hover {
    background: #e8ebf0;
    transform: translateY(-2px);
}

.ps-featured-brands__logo {
    display: block;
    height: 48px;
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.ps-featured-brands__name {
    color: #0a213b;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.ps-brands-directory {
    color: #0a213b;
    width: 100%;
}

.ps-brands-directory__header {
    margin-bottom: 1.5rem;
}

.ps-brands-directory .ps-brands-directory__header h1.ps-brands-directory__title {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.ps-brands-directory__intro {
    color: #4b5563;
    margin: 0;
}

.ps-brands-directory__index {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.ps-brands-directory__index a {
    border-radius: 4px;
    color: #0a213b;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.35rem 0.55rem;
    text-decoration: none;
}

.ps-brands-directory__index a:hover,
.ps-brands-directory__index a.is-active {
    background: #0a213b;
    color: #fff;
}

.ps-brands-directory__group {
    margin-bottom: 2rem;
}

.ps-brands-directory .ps-brands-directory__group h2.ps-brands-directory__letter {
    border-bottom: 1px solid #e5e7eb;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 0.85rem;
    padding-bottom: 0.35rem;
}

.ps-brands-directory__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.ps-brands-directory__card {
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    color: #0a213b;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    justify-content: center;
    min-height: 120px;
    padding: 1rem 0.75rem;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.ps-brands-directory__card:hover {
    background: #e8ebf0;
    transform: translateY(-2px);
}

.ps-brands-directory__logo {
    height: 42px;
    max-width: 100%;
    object-fit: contain;
}

.ps-brands-directory__name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
}

.ps-brands-directory.is-filtered .ps-brands-directory__group {
    display: none;
}

.ps-brands-directory.is-filtered .ps-brands-directory__group.is-active {
    display: block;
}

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

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

@media (max-width: 640px) {
    .ps-featured-brands__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

/* Hide shop-archive lifestyle / Bags promo carousel on brand views. */
body.ps-brand-filtered .elementor-2670 .elementor-element-91405c3,
body.ps-brand-filtered .elementor-2670 .elementor-widget-n-carousel,
body.ps-brands-directory-page .elementor-2670 .elementor-element-91405c3,
body.ps-brands-directory-page .elementor-2670 .elementor-widget-n-carousel,
body.ps-brand-filtered .ps-category-hero,
body.ps-brands-directory-page .ps-category-hero {
    display: none !important;
}

/* Equal-size brand cards: same height in every row, logo box fixed. */
.ps-brands-directory .ps-brands-directory__grid > li {
    display: flex;
    margin: 0;
    padding: 0;
}

.ps-brands-directory .ps-brands-directory__card {
    box-sizing: border-box;
    height: 120px;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.ps-brands-directory .ps-brands-directory__card img.ps-brands-directory__logo {
    display: block;
    flex: 0 0 auto;
    height: 42px !important;
    margin: 0 !important;
    max-height: 42px !important;
    max-width: 100% !important;
    object-fit: contain;
    width: auto !important;
}

/* Equal-size Featured Brands cards (homepage). */
.ps-featured-brands .ps-featured-brands__grid > li {
    display: flex;
    margin: 0;
    padding: 0;
}

.ps-featured-brands .ps-featured-brands__card {
    box-sizing: border-box;
    height: 96px;
    min-height: 0;
    overflow: hidden;
    width: 100%;
}

.ps-featured-brands .ps-featured-brands__card img.ps-featured-brands__logo {
    display: block;
    flex: 0 0 auto;
    height: 48px !important;
    margin: 0 !important;
    max-height: 48px !important;
    max-width: 100% !important;
    object-fit: contain;
    width: auto !important;
}
