@charset "UTF-8";
/*
 * "Parts by bike model" section (templates/element/products/popular_models.php).
 * The theme sets html { font-size: 62.5% }, so px is used here to keep sizes predictable.
 */
.bbm {
    margin-top: 40px;
    margin-bottom: 8px;
    scroll-margin-top: 90px;
    color: #1b1d21;
}
.bbm__title {
    position: relative;
    margin: 0 0 4px;
    padding-left: 14px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #1b1d21;
}
.bbm__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 4px;
    background: #ED1D24;
}
.bbm__sub {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.5;
    color: #6b7078;
}
.bbm__brands {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.bbm-brand {
    min-width: 0;
    padding: 14px 16px 10px;
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}
.bbm .bbm-brand__name {
    margin: 0 0 6px;
    padding-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    color: #ED1D24;
    border-bottom: 1px solid #ececef;
}
.bbm-brand ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.bbm-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    margin: 0 -8px;
    padding: 4px 8px;
    font-size: 14px;
    line-height: 1.35;
    color: #1b1d21;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.bbm-brand a:hover,
.bbm-brand a:focus-visible {
    color: #ED1D24;
    background: #f6f7f9;
}
.bbm-brand img,
.bbm-brand li .fa {
    flex-shrink: 0;
    width: 56px;
    height: 42px;
    margin: 0;
    object-fit: contain;
}
.bbm-brand li .fa {
    font-size: 24px;
    line-height: 42px;
    text-align: center;
    color: #c9ccd1;
}
.bbm-brand span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.bbm-brand small {
    flex-shrink: 0;
    font-size: 12px;
    color: #6b7078;
}
.bbm-brand .bbm-brand__all {
    justify-content: center;
    gap: 6px;
    margin: 6px -8px 2px;
    font-weight: 600;
    color: #ED1D24;
    background: #fff1f1;
}
.bbm-brand .bbm-brand__all:hover,
.bbm-brand .bbm-brand__all:focus-visible {
    color: #fff;
    background: #ED1D24;
}

@media (max-width: 991.98px) {
    .bbm__brands {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767.98px) {
    .bbm {
        margin-top: 30px;
    }
    .bbm__title {
        font-size: 18px;
    }
    .bbm__sub {
        font-size: 13px;
    }
    /* brand cards scroll sideways on phones, so the section stays one card tall above the products */
    .bbm__brands {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        margin: 0 -12px;
        padding: 2px 12px 8px;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .bbm__brands::-webkit-scrollbar {
        display: none;
    }
    .bbm-brand {
        flex: 0 0 82%;
        scroll-snap-align: start;
    }
}

/* ---------- Brand page: all models (templates/Products/parts_by_brand.php) ---------- */
.bbm-models {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}
.bbm-models a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding: 12px;
    text-align: center;
    text-decoration: none;
    color: #1b1d21;
    background: #fff;
    border: 1px solid #ececef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    transition: border-color .15s, color .15s;
}
.bbm-models a:hover,
.bbm-models a:focus-visible {
    color: #ED1D24;
    border-color: #ED1D24;
}
.bbm-models img,
.bbm-models .fa {
    width: 160px;
    max-width: 100%;
    height: 110px;
    margin: 0;
    object-fit: contain;
}
.bbm-models .fa {
    font-size: 48px;
    line-height: 110px;
    text-align: center;
    color: #c9ccd1;
}
.bbm-models strong {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}
.bbm-models small {
    font-size: 13px;
    color: #6b7078;
}

@media (max-width: 991.98px) {
    .bbm-models {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 767.98px) {
    .bbm-models {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .bbm-models strong {
        font-size: 14px;
    }
}
