.torq-parts-browser {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1.5rem 2rem;
    align-items: center;
    margin: 0 0 2.25rem;
    padding: 1.75rem 2rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f3f5f3;
}

.torq-parts-browser-copy h2 {
    margin: .1em 0 .3em;
    color: var(--ink);
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    line-height: 1;
}

.torq-parts-browser-copy > p:last-child {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
}

.torq-call-parts {
    display: flex;
    flex-direction: column;
    min-width: 210px;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    background: var(--forest);
    color: #fff;
    text-align: center;
    text-decoration: none;
}

.torq-call-parts span {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.torq-call-parts strong { font-size: 1.15rem; }

.torq-parts-mega {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: .65rem;
    position: relative;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.torq-parts-parent { position: static; margin: 0; }
.torq-parts-parent summary { list-style: none; cursor: pointer; }
.torq-parts-parent summary::-webkit-details-marker { display: none; }

.torq-parts-parent summary,
.torq-parts-parent-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 76px;
    padding: .85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
}

.torq-parts-parent summary span,
.torq-parts-parent-link span { font-weight: 850; line-height: 1.15; }
.torq-parts-parent summary small,
.torq-parts-parent-link small { margin-top: .3rem; color: var(--muted); font-size: .72rem; }
.torq-parts-parent summary::after { content: "+"; position: absolute; top: 50%; right: 1rem; color: var(--copper); font-size: 1.15rem; font-weight: 900; transform: translateY(-50%); }
.torq-parts-parent[open] summary::after { content: "−"; }
.torq-parts-parent[open] summary,
.torq-parts-parent.is-current summary,
.torq-parts-parent-link.is-current { border-color: var(--forest); background: var(--forest); color: #fff; }
.torq-parts-parent[open] summary small,
.torq-parts-parent.is-current summary small,
.torq-parts-parent-link.is-current small { color: rgba(255,255,255,.72); }

.torq-parts-mega-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + .5rem);
    right: 0;
    left: 0;
    padding: 1.2rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 39, 32, .18);
}

.torq-parts-all-parent {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--line);
    color: var(--forest);
    text-decoration: none;
}

.torq-parts-child-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.torq-parts-child > a { display: flex; flex-direction: column; min-height: 62px; padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.torq-parts-child > a:hover { border-color: var(--copper); background: #f8f4ef; }
.torq-parts-child > a span { margin-top: .2rem; color: var(--muted); font-size: .72rem; }
.torq-parts-grandchildren { display: grid; gap: .35rem; margin: .35rem 0 0 .75rem; }
.torq-parts-grandchildren .torq-parts-child > a { min-height: auto; padding: .55rem .65rem; }
.torq-parts-grandchildren .torq-parts-child > a strong { font-size: .86rem; }
.torq-parts-grandchildren .torq-parts-child > a span { display: none; }

.torq-parts-parent summary:focus-visible,
.torq-parts-parent-link:focus-visible,
.torq-parts-child > a:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }

.woocommerce ul.products li.product { display: flex; flex-direction: column; }
.woocommerce ul.products li.product > a.woocommerce-LoopProduct-link { display: flex; flex: 1; flex-direction: column; }

.torq-part-number {
    margin: .2rem 1rem .55rem;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 750;
}

.torq-part-number span {
    letter-spacing: .05em;
    text-transform: uppercase;
}

.torq-part-availability {
    margin: .15rem 1rem .65rem;
    padding: .42rem .6rem;
    border-radius: 7px;
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.3;
}

.torq-part-availability.is-stocked { background: #e6f2eb; color: #155b39; }
.torq-part-availability.is-order-only { background: #f4ede5; color: #8e3d20; }
.woocommerce ul.products li.product .price { margin-top: auto; }
.woocommerce ul.products li.product .torq-call-to-order { margin-top: .25rem; text-align: center; }

.torq-single-call {
    margin: 1.25rem 0;
    padding: 1.2rem;
    border-left: 4px solid var(--copper);
    border-radius: 0 10px 10px 0;
    background: #f3f5f3;
}

.torq-single-call .torq-part-availability { display: inline-block; margin: 0 0 .75rem; }
.torq-single-call > p:not(.torq-part-availability) { margin: 0 0 .8rem; }
.torq-single-call .button { display: inline-block; }

@media (max-width: 800px) {
    .torq-parts-browser { grid-template-columns: 1fr; padding: 1.35rem; }
    .torq-call-parts { width: 100%; }
    .torq-parts-mega { grid-column: 1; display: block; }
    .torq-parts-parent,
    .torq-parts-parent-link { margin-bottom: .55rem; }
    .torq-parts-parent summary,
    .torq-parts-parent-link { min-height: 64px; }
    .torq-parts-mega-menu { position: static; margin: .4rem 0 .75rem; padding: .85rem; box-shadow: none; }
    .torq-parts-child-grid { grid-template-columns: 1fr; }
    .torq-parts-all-parent { flex-direction: column; gap: .2rem; }
}

@media (max-width: 480px) {
    .torq-part-availability { font-size: .7rem; }
}
