/* ==========================================================================
   Footer group links — the "most searched parts by vehicle" accordion
   --------------------------------------------------------------------------
   Its own sheet, loaded globally, NOT app.css: that one needs `npm run
   minify:css` before an edit takes effect, and the .fd-* rules it pairs with
   live only in app.min.css anyway. The footer renders on every page, so this
   cannot be a @stack('styles') sheet either.

   Additive. .fd-block, .fd-eyebrow, .fd-title and .fd-desc all come from
   app.min.css and are reused as-is so this section sits in the same rhythm as
   the brands and categories blocks above it.

   <details> is styled, never replaced. The markup has to stay native so every
   link is in the DOM for a crawler whether or not the section is open - that is
   the entire reason this block exists.
   ========================================================================== */

.fd-groups .fd-group-accordion {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px 18px;
    margin-top: 18px;
}

.fd-group-make {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    align-self: start;
}

.fd-group-make > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 14px;
    cursor: pointer;
    list-style: none;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    user-select: none;
    transition: background 0.18s ease;
}

/* The default disclosure triangle, replaced with a chevron that rotates. */
.fd-group-make > summary::-webkit-details-marker { display: none; }
.fd-group-make > summary::marker { content: ''; }

.fd-group-make > summary::after {
    content: '';
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid rgba(0, 0, 0, 0.45);
    border-bottom: 2px solid rgba(0, 0, 0, 0.45);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.fd-group-make[open] > summary::after { transform: rotate(-135deg); }
.fd-group-make > summary:hover { background: #f7f7f9; }

.fd-group-make-name {
    text-transform: capitalize;
    letter-spacing: -0.1px;
}

.fd-group-count {
    font-size: 11px;
    font-weight: 700;
    color: rgba(var(--secondaryColor));
    background: rgba(var(--secondaryColor), 0.09);
    border-radius: 999px;
    padding: 2px 8px;
    font-variant-numeric: tabular-nums;
}

.fd-group-list {
    list-style: none;
    margin: 0;
    padding: 2px 0 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.fd-group-list li { margin: 0; }

.fd-group-list a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 14px;
    font-size: 13px;
    line-height: 1.35;
    color: #43474e;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.fd-group-list a:hover {
    background: #f7f7f9;
    color: rgba(var(--secondaryColor));
}

.fd-group-stock {
    flex: 0 0 auto;
    font-size: 11px;
    color: #9a9aa2;
    font-variant-numeric: tabular-nums;
}

.fd-group-list a:hover .fd-group-stock { color: inherit; }

@media (max-width: 767px) {
    .fd-groups .fd-group-accordion {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* On a phone the first brand is open by default too, but a long list inside
       a 1-column accordion pushes the real footer a long way down, so the open
       panel scrolls rather than the page. Every link stays in the DOM. */
    .fd-group-list {
        max-height: 320px;
        overflow-y: auto;
    }
}

@media print {
    .fd-groups { display: none; }
}

/* ==========================================================================
   /used-parts — the group index page
   ========================================================================== */

.group-index-hero { padding-top: 40px; }
.group-index-hero h1 { font-size: clamp(24px, 4vw, 34px); font-weight: 800; letter-spacing: -0.4px; margin: 6px 0 10px; }
.group-index-hero p { font-size: 15px; color: #5a5a62; line-height: 1.6; max-width: 680px; }
.group-index-stat { margin-top: 10px; font-size: 13px; color: #74747c; }
.group-index-stat strong { color: #111; font-variant-numeric: tabular-nums; }

.group-index-jump ul {
    display: flex; flex-wrap: wrap; gap: 8px;
    list-style: none; padding: 0; margin: 0 0 26px;
}
.group-index-jump a {
    display: inline-block; padding: 6px 12px;
    border: 1px solid rgba(0,0,0,.1); border-radius: 999px;
    font-size: 12px; font-weight: 600; color: #43474e; text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.group-index-jump a:hover {
    background: rgba(var(--secondaryColor)); border-color: rgba(var(--secondaryColor)); color: #fff;
}

.group-index-make {
    border: 1px solid rgba(0,0,0,.08); border-radius: 12px;
    background: #fff; margin-bottom: 12px; overflow: hidden;
    scroll-margin-top: 90px;   /* the jump links land below the sticky header */
}
.group-index-make > summary {
    display: flex; align-items: center; gap: 12px;
    padding: 15px 18px; cursor: pointer; list-style: none;
    font-size: 16px; font-weight: 700; color: #111; user-select: none;
}
.group-index-make > summary::-webkit-details-marker { display: none; }
.group-index-make > summary::marker { content: ''; }
.group-index-make > summary::after {
    content: ''; width: 8px; height: 8px; margin-left: auto;
    border-right: 2px solid rgba(0,0,0,.4); border-bottom: 2px solid rgba(0,0,0,.4);
    transform: rotate(45deg); transition: transform .2s ease;
}
.group-index-make[open] > summary::after { transform: rotate(-135deg); }
.group-index-make > summary:hover { background: #f7f7f9; }
.gi-make-name { text-transform: capitalize; }
.gi-make-count {
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
    color: rgba(var(--secondaryColor)); background: rgba(var(--secondaryColor), .09);
    font-variant-numeric: tabular-nums;
}

.group-index-list {
    list-style: none; margin: 0; padding: 6px 10px 12px;
    border-top: 1px solid rgba(0,0,0,.06);
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 10px;
}
.group-index-list a {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    padding: 8px 10px; border-radius: 8px;
    font-size: 14px; color: #43474e; text-decoration: none; line-height: 1.35;
    transition: background .15s ease, color .15s ease;
}
.group-index-list a:hover { background: #f7f7f9; color: rgba(var(--secondaryColor)); }
.gi-link-name { text-transform: capitalize; }
.gi-link-stock { flex: 0 0 auto; font-size: 11px; color: #9a9aa2; font-variant-numeric: tabular-nums; }
.gi-link-stock small { margin-left: 3px; }

@media (max-width: 767px) {
    .group-index-list { grid-template-columns: 1fr; }
    .group-index-jump ul { gap: 6px; }
}
