/*
 * TTF Nav: the [ttf_parts] parts list of a workshop guide (Hub Run Sheet H5.2).
 *
 * A compact grid of the car's parts in one category, each a card linking the product with its image, title and
 * price, then a line linking the category narrowed to the car. It sits in the blog's article column
 * (ttf-blog-preview.php, whose `.ttf-cust .single-body a` rule underlines links: the cards override it).
 * ttf-nav/guides.php enqueues this file when a list renders. Class prefix ttf-parts.
 */

.ttf-parts { margin: 1.2rem 0 1.6rem; }
.ttf-parts .ttf-parts__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: .75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.ttf-parts .ttf-parts__item { margin: 0; padding: 0; }
.ttf-parts .ttf-parts__item::before { content: none; }
.ttf-parts .ttf-parts__item a.ttf-parts__link {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: .85rem;
    height: 100%;
    padding: .6rem .75rem .6rem .6rem;
    border: 1px solid #e8e8e8;
    background: #fff;
    color: #1a1a1a;
    text-decoration: none;
    transition: border-color .15s ease;
}
.ttf-parts .ttf-parts__item a.ttf-parts__link:hover,
.ttf-parts .ttf-parts__item a.ttf-parts__link:focus-visible { border-color: #e63946; color: #1a1a1a; }
.ttf-parts .ttf-parts__img {
    grid-row: 1 / span 2;
    align-self: center;
    width: 72px;
    height: 72px;
    background: #f5f5f5;
}
.ttf-parts .ttf-parts__img picture { display: block; }
.ttf-parts .ttf-parts__img img {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
}
.ttf-parts .ttf-parts__title {
    display: -webkit-box;
    align-self: end;
    overflow: hidden;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.ttf-parts .ttf-parts__price {
    align-self: start;
    margin-top: .25rem;
    font-size: .9rem;
    font-weight: 700;
    color: #e63946;
    font-variant-numeric: tabular-nums;
}
.ttf-parts .ttf-parts__price del { margin-right: .35rem; font-weight: 500; color: #94a3b8; }
.ttf-parts .ttf-parts__price ins { text-decoration: none; }
.ttf-parts .ttf-parts__all { margin: .8rem 0 0; font-size: .95rem; font-weight: 700; }
.ttf-parts .ttf-parts__all a::after { content: " \2192"; }

@media (max-width: 620px) {
    .ttf-parts .ttf-parts__list { grid-template-columns: minmax(0, 1fr); }
}
