/* Styles for the generated catalogue pages (parts, categories, filters)
   and the part-number search on products.html.
   Uses the same custom properties as style.css so it follows the theme. */

.partpage, .listpage {
  max-width: 1200px;
  margin: 0 auto;
  padding: 7rem 1.25rem 4rem;
}

.crumb {
  font-size: .78rem;
  letter-spacing: .04em;
  color: var(--gray);
  margin-bottom: 1.5rem;
}
.crumb a { color: var(--gray); text-decoration: none; }
.crumb a:hover { color: var(--red); }
.crumb span { color: var(--white); font-weight: 600; }

/* ---------- part page ---------- */
.partgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 3rem;
}
.partimg {
  background: #fff;
  border: 1px solid rgba(128, 128, 128, .22);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.partimg img { width: 100%; height: auto; display: block; }
.noimg { color: var(--gray); padding: 4rem 0; font-size: .85rem; }

.partcat {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .6rem;
}
.partpage h1 {
  font-family: var(--font-display, inherit);
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0 0 1rem;
}
.partlead { font-size: .92rem; line-height: 1.75; color: var(--gray); margin-bottom: 1.5rem; }
.partnote { font-size: .78rem; color: var(--gray); margin-top: .85rem; }
.partstock {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-bottom: 1rem;
  padding: .4rem .8rem;
  border: 1px solid rgba(26, 158, 92, .45);
  border-radius: 100px;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #1a9e5c;
}

.wabtn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.4rem;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
}

.partpage h2, .listpage h2 {
  font-family: var(--font-display, inherit);
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--red);
}

.spectable { width: 100%; border-collapse: collapse; font-size: .88rem; }
.spectable th, .spectable td {
  text-align: left;
  padding: .7rem .9rem;
  border-bottom: 1px solid rgba(128, 128, 128, .2);
  vertical-align: top;
}
.spectable th { width: 200px; font-weight: 700; color: var(--gray); }
/* long OCR runs without spaces ("MAHINDRAMAXIITRUCK(O.EREF...)") must wrap on phones */
.spectable td { overflow-wrap: anywhere; word-break: break-word; }
.fitlist li, .partlead, .pcard2-fit { overflow-wrap: anywhere; }

.fitlist, .mateslist { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.fitlist li { padding: .5rem 0; border-bottom: 1px solid rgba(128, 128, 128, .15); }
.mateslist li { padding: .55rem 0; border-bottom: 1px solid rgba(128, 128, 128, .15); }
.mateslist a { font-weight: 700; color: var(--red); text-decoration: none; }
.mateslist a:hover { text-decoration: underline; }
.mateslist span { color: var(--gray); font-size: .8rem; margin-left: .5rem; }

/* ---------- listings ---------- */
.listpage h1 {
  font-family: var(--font-display, inherit);
  font-size: 2.3rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 .75rem;
}
.listlead { font-size: .9rem; color: var(--gray); line-height: 1.7; margin-bottom: 2rem; max-width: 760px; }

.pgrid2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1.1rem;
}
/* Card with a sliding info bar.
   The bar is pinned to the bottom; on hover it rises over the image and reveals
   the specs. The card itself never changes size, so the grid never reflows. */
.pcard2 {
  display: block;
  position: relative;
  /* reserve the bar's resting height; the bar is pinned to the bottom and
     expands upward OVER the image, so the card never changes size and the
     grid never reflows on hover */
  padding-bottom: 98px;
  text-decoration: none;
  border: 1px solid rgba(128, 128, 128, .22);
  border-radius: 8px;
  overflow: hidden;
  background: var(--dark2, transparent);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.pcard2:hover,
.pcard2:focus-visible {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}
.pcard2-img {
  background: #fff;
  /* full catalogue cards are roughly 5:4 */
  aspect-ratio: 5 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .6rem;
}
.pcard2-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform .35s cubic-bezier(.165, .84, .44, 1);
}
.pcard2:hover .pcard2-img img { transform: scale(1.06); }

.pcard2-b {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  min-height: 98px;
  padding: .7rem .8rem .9rem;
  background: var(--dark2, #fff);
  border-top: 1px solid rgba(128, 128, 128, .16);
  z-index: 2;
}
.pcard2-n { font-weight: 800; font-size: .92rem; letter-spacing: .01em; }
.pcard2-s { font-size: .76rem; color: var(--red); font-weight: 700; margin-top: .2rem; }
.pcard2-stock {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .3rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #1a9e5c;
}
.pcard2-stock i { font-size: .62rem; }

/* the reveal */
.pcard2-more {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.165, .84, .44, 1), opacity .25s ease,
              margin-top .35s cubic-bezier(.165, .84, .44, 1);
}
.pcard2:hover .pcard2-more,
.pcard2:focus-visible .pcard2-more {
  max-height: 260px;
  opacity: 1;
  margin-top: .6rem;
}
.pcard2-more ul { list-style: none; margin: 0; padding: 0; }
.pcard2-more li {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  font-size: .72rem;
  padding: .22rem 0;
  border-bottom: 1px solid rgba(128, 128, 128, .16);
}
.pcard2-more li span { color: var(--gray); }
.pcard2-more li b { font-weight: 700; text-align: right; }
.pcard2-fit {
  font-size: .71rem;
  color: var(--gray);
  line-height: 1.5;
  margin: .5rem 0 0;
}
.pcard2-go {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .55rem;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red);
}

/* Touch devices have no hover: show the specs at all times instead of hiding
   them behind an interaction that can never happen. */
@media (hover: none) {
  .pcard2-more { max-height: 260px; opacity: 1; margin-top: .6rem; }
  .pcard2:hover .pcard2-img img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard2, .pcard2-b, .pcard2-more, .pcard2-img img { transition: none; }
}

/* ---------- part-number search ---------- */
.psearch { max-width: 760px; margin: 0 auto 2.5rem; }
.psearch-box { position: relative; }
.psearch-box i {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--gray); font-size: .95rem; pointer-events: none;
}
#partSearch {
  width: 100%;
  padding: 1rem 1rem 1rem 2.8rem;
  font-size: 1rem;
  font-family: inherit;
  border: 2px solid rgba(128, 128, 128, .3);
  border-radius: 8px;
  background: var(--dark2, #fff);
  color: inherit;
}
#partSearch:focus { outline: none; border-color: var(--red); }
.psearch-hint { font-size: .78rem; color: var(--gray); margin-top: .6rem; text-align: center; }
.psearch-count { font-size: .82rem; color: var(--gray); margin: 1.2rem 0 .8rem; font-weight: 600; }
#partResults, #sf-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 1.1rem; }
.psearch-none { color: var(--gray); font-size: .9rem; padding: 1.5rem 0; }

@media (max-width: 820px) {
  .partgrid { grid-template-columns: 1fr; gap: 1.5rem; }
  .partpage h1 { font-size: 1.9rem; }
  #partResults, #sf-results { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
  .listpage h1 { font-size: 1.7rem; }
  .spectable th { width: 130px; }
  .partpage, .listpage { padding-top: 5.5rem; }
}

/* ---------- catalogue integration on products.html ---------- */
.pcard-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: .9rem 1rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
}
.pcard-link:hover { text-decoration: underline; }
.pcard-link i { font-size: .7rem; transition: transform .2s ease; }
.pcard:hover .pcard-link i { transform: translateX(3px); }

.catgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
  margin-bottom: 3rem;
}
.catcard {
  display: block;
  text-decoration: none;
  border: 1px solid var(--tint-06, rgba(128,128,128,.22));
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--dark3) 0%, var(--dark2) 100%);
  transition: transform .2s ease, border-color .2s ease;
}
.catcard:hover { transform: translateY(-4px); border-color: var(--red); }
.catcard-img {
  background: #fff;
  /* catalogue cards are roughly 5:4, so 16:10 would letterbox them */
  aspect-ratio: 5 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .7rem;
}
.catcard-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.catcard-b { padding: .85rem .95rem 1rem; }
.catcard-n {
  font-family: var(--font-display, inherit);
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  line-height: 1.25;
  color: var(--white, inherit);
}
.catcard-c { font-size: .76rem; color: var(--red); font-weight: 700; margin-top: .35rem; }

/* filter chips on category pages */
.fchips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 2.5rem; }
.fchip {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem .8rem;
  border: 1px solid rgba(128,128,128,.3);
  border-radius: 100px;
  font-size: .78rem; font-weight: 600;
  text-decoration: none; color: inherit;
  transition: border-color .15s ease, color .15s ease;
}
.fchip:hover { border-color: var(--red); color: var(--red); }
.fchip span {
  font-size: .68rem; font-weight: 800; color: var(--gray);
  background: rgba(128,128,128,.16); border-radius: 100px; padding: .05rem .4rem;
}

/* ---------- other trade names, buttons, how-to-order (part + list pages) ---------- */
.partalt, .listalt { font-size: .82rem; color: var(--silver, var(--gray)); margin: -.4rem 0 1rem; }
.listalt { margin-top: -.2rem; }
.partbtns { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.callbtn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.2rem; border-radius: 6px; font-weight: 700; text-decoration: none; }
.howbuy { margin-top: 1.4rem; padding: 1rem 1.1rem; border: 1px solid rgba(128,128,128,.22); border-left: 3px solid var(--red); border-radius: 6px; background: var(--dark2, transparent); }
.howbuy-h { font-size: .7rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: .5rem; }
.howbuy ol { margin: 0 0 .6rem 1.1rem; padding: 0; font-size: .85rem; line-height: 1.7; }
.howbuy p { margin: 0; font-size: .8rem; color: var(--gray); line-height: 1.6; }
.pgrid2-sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* every catalogue card printed with this part number */
.cardgal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.cardgal-i { display: flex; flex-direction: column; text-decoration: none; border: 1px solid rgba(128,128,128,.22); border-radius: 8px; overflow: hidden; background: var(--dark2, transparent); transition: border-color .15s ease, transform .15s ease; }
.cardgal-i:hover { border-color: var(--red); transform: translateY(-2px); }
.cardgal-i img { width: 100%; aspect-ratio: 5 / 4; object-fit: contain; background: #fff; padding: .4rem; box-sizing: border-box; }
.cardgal-i span { font-size: .75rem; font-weight: 700; color: var(--gray); padding: .5rem .7rem; }
.cardgal-i .cardgal-note { font-weight: 500; color: var(--red); padding-top: 0; }
.confirmbox { margin: 0 0 1rem; padding: .8rem 1rem; border: 1px solid rgba(230,160,0,.55); border-left: 4px solid #e6a000; border-radius: 6px; background: rgba(230,160,0,.08); font-size: .84rem; line-height: 1.6; }
.confirmbox b { display: block; margin-bottom: .2rem; }
.partnew { display: inline-flex; align-items: center; gap: .4rem; margin: 0 0 1rem .5rem; padding: .4rem .8rem; border-radius: 100px; background: var(--red); color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- parts that fit (part pages) ---------- */
.matchlink { display: inline-flex; align-items: center; gap: .45rem; margin-top: .8rem; font-weight: 800; font-size: .85rem; color: var(--red); text-decoration: none; }
.matchlink:hover { text-decoration: underline; }
.fitgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.fitgrp { border: 1px solid rgba(128,128,128,.22); border-radius: 8px; padding: .8rem .9rem .6rem; background: var(--dark2, transparent); }
.fitgrp-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; margin-bottom: .5rem; }
.fitgrp-h b { font-family: var(--font-display, inherit); font-size: 1rem; text-transform: uppercase; letter-spacing: .02em; }
.fitgrp-h span { font-size: .7rem; font-weight: 800; color: var(--gray); background: rgba(128,128,128,.16); border-radius: 100px; padding: .05rem .45rem; }
.fitgrp-h em { flex-basis: 100%; font-style: normal; font-size: .74rem; color: var(--gray); }
.fitrow { display: flex; align-items: center; gap: .7rem; padding: .45rem .2rem; border-top: 1px solid rgba(128,128,128,.14); text-decoration: none; color: inherit; }
.fitrow:hover .fitrow-n { color: var(--red); }
.fitrow img { width: 62px; height: 50px; object-fit: contain; background: #fff; border-radius: 4px; border: 1px solid rgba(128,128,128,.25); flex-shrink: 0; }
.fitrow-b { display: flex; flex-direction: column; min-width: 0; }
.fitrow-n { font-weight: 800; font-size: .86rem; }
.fitrow-s { font-size: .74rem; color: var(--gray); }
.fitrow-x, .mt-x { align-self: flex-start; margin-top: .2rem; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #1a9e5c; border: 1px solid rgba(26,158,92,.45); border-radius: 100px; padding: .05rem .45rem; }
.fitmore { display: block; padding: .5rem .2rem .2rem; font-size: .78rem; font-weight: 800; color: var(--red); text-decoration: none; }
.fitbtn { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .75rem 1.1rem; border-radius: 6px; font-weight: 700; text-decoration: none; }

/* grouped listing (cross-size pages) */
.lgroup h2 small { font-size: .75rem; color: var(--gray); font-weight: 700; margin-left: .3rem; }

/* ---------- Match Parts tool ---------- */
.mtool { margin: 0 0 2rem; }
.mt-in { display: grid; gap: .5rem; padding: 1rem 1.1rem; border: 1px solid rgba(128,128,128,.22); border-radius: 8px; background: var(--dark2, transparent); }
.mt-in label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); margin-top: .3rem; }
.mt-box input, #mtSize { width: 100%; box-sizing: border-box; padding: .85rem .9rem .85rem 2.5rem; font-size: 1rem; font-family: inherit; color: inherit; background: var(--dark3, #fff); border: 2px solid rgba(128,128,128,.3); border-radius: 8px; }
#mtSize { padding-left: .9rem; }
.mt-box input:focus, #mtSize:focus { outline: none; border-color: var(--red); }
.mt-sug { display: grid; gap: .3rem; }
.mt-sugi { display: flex; justify-content: space-between; gap: .6rem; text-align: left; padding: .7rem .8rem; border: 1px solid rgba(128,128,128,.25); border-radius: 6px; background: var(--dark3, #fff); color: inherit; font-family: inherit; font-size: .9rem; cursor: pointer; }
.mt-sugi:hover { border-color: var(--red); }
.mt-sugi span { color: var(--gray); font-size: .76rem; }
.mt-out { margin-top: 1rem; }
.mt-head { display: flex; gap: 1rem; align-items: center; padding: .8rem; border: 2px solid var(--red); border-radius: 8px; margin-bottom: .8rem; }
.mt-head img { width: 110px; height: 88px; object-fit: contain; background: #fff; border-radius: 6px; }
.mt-kick { font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.mt-hn { font-family: var(--font-display, inherit); font-size: 1.3rem; font-weight: 800; color: inherit; text-decoration: none; }
.mt-grp { margin: 1rem 0; border: 1px solid rgba(128,128,128,.22); border-radius: 8px; overflow: hidden; }
.mt-grp-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; padding: .7rem .9rem; background: var(--dark2, transparent); }
.mt-grp-h b { font-family: var(--font-display, inherit); text-transform: uppercase; }
.mt-grp-h span { font-size: .7rem; font-weight: 800; color: var(--gray); }
.mt-grp-h em { flex-basis: 100%; font-style: normal; font-size: .74rem; color: var(--gray); }
.mt-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .9rem; border-top: 1px solid rgba(128,128,128,.14); cursor: pointer; }
.mt-row.on { background: rgba(26,158,92,.10); }
.mt-row input { width: 22px; height: 22px; accent-color: #1a9e5c; flex-shrink: 0; }
.mt-row img, .mt-noimg { width: 66px; height: 52px; object-fit: contain; background: #fff; border-radius: 4px; flex-shrink: 0; }
.mt-b { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mt-n { font-weight: 800; font-size: .9rem; }
.mt-s { font-size: .75rem; color: var(--gray); }
.mt-go { padding: .6rem; color: var(--gray); }
.mt-go:hover { color: var(--red); }
.mt-bar { position: sticky; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 1rem; margin-top: 1rem; border: 1px solid rgba(128,128,128,.25); border-radius: 10px; background: var(--dark2, #fff); box-shadow: 0 -8px 24px rgba(0,0,0,.25); }
.mt-bar[hidden] { display: none; }
.mt-bar span { font-weight: 800; }
.mt-bar .btn-r { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-radius: 6px; border: none; cursor: pointer; font-family: inherit; }
.mt-table th a { color: var(--white, inherit); text-decoration: none; }
.mt-table th a:hover { color: var(--red); }
.mt-rules li { line-height: 1.6; font-size: .9rem; }
@media (max-width: 820px) {
  .fitgrid { grid-template-columns: 1fr; }
  .mt-bar { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }   /* above the phone bottom menu */
  .mt-head img { width: 84px; height: 68px; }
}

/* questions on category pages */
.faqlist { margin: 0; }
.faqlist dt { font-weight: 800; margin-top: 1rem; }
.faqlist dd { margin: .3rem 0 0; color: var(--gray); font-size: .9rem; line-height: 1.7; max-width: 820px; }

/* part number index + cross reference pages */
.pnsec { margin-top: 1.5rem; scroll-margin-top: 90px; }
.pnsec h2 small { font-size: .75rem; color: var(--gray); font-weight: 600; text-transform: none; margin-left: .4rem; }
.pnlist { list-style: none; margin: 0; padding: 0; columns: 4 200px; column-gap: 1.5rem; }
.pnlist li { break-inside: avoid; padding: .28rem 0; border-bottom: 1px solid rgba(128,128,128,.12); font-size: .86rem; }
.pnlist a { color: var(--white, inherit); font-weight: 700; text-decoration: none; }
.pnlist a:hover { color: var(--red); }
.pnlist span { display: block; font-size: .72rem; color: var(--gray); }
.xrefwrap { overflow-x: auto; }
.xreftable { table-layout: fixed; }
.xreftable th:first-child { white-space: nowrap; width: 16%; }
.xreftable th:nth-child(2), .xreftable td:nth-child(2) { width: 24%; }
.xreftable .xref-all { font-weight: 800; white-space: nowrap; }
.pnsec h2 { margin-top: 1.2rem !important; }
@media (max-width: 820px) { .xreftable th:first-child { width: 30%; white-space: normal; } .xreftable th:nth-child(2), .xreftable td:nth-child(2) { display: none; } }
.xreftable td a { color: var(--red); font-weight: 600; text-decoration: none; }
.xreftable td a:hover { text-decoration: underline; }
.xreftable thead th { color: var(--white, inherit); border-bottom: 2px solid var(--red); }

/* specification table (folded) and parts-by-type table on listing pages */
.spec-all { margin-top: 2rem; border: 1px solid rgba(128,128,128,.22); border-radius: 8px; background: var(--dark2, transparent); }
.spec-all > summary { cursor: pointer; padding: .9rem 1.1rem; font-weight: 800; list-style: none; }
.spec-all > summary::-webkit-details-marker { display: none; }
.spec-all > summary::before { content: "+"; display: inline-block; width: 1.3em; color: var(--red); font-weight: 800; }
.spec-all[open] > summary::before { content: "\2212"; }
.spec-all .xrefwrap { padding: 0 1.1rem 1rem; }
.listtable th { width: auto; }
.listtable thead th { color: var(--white, inherit); border-bottom: 2px solid var(--red); }
.listtable td a { color: var(--red); font-weight: 700; text-decoration: none; }
.listtable td a:hover { text-decoration: underline; }
.listtable td:first-child a { white-space: nowrap; }   /* keep a part number on one line */
.listtable td:nth-child(2) { white-space: nowrap; }     /* a size like 42X119.8 MM, or a count */
/* on phones the table scrolls sideways inside its box instead of squeezing the words */
.spec-all .listtable { min-width: 560px; }
@media (max-width: 820px) { .listtable th, .listtable td { padding: .55rem .5rem; font-size: .8rem; } }

/* "Can't find your part?" box at the end of listings */
.helpbox { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; align-items: center; justify-content: space-between; margin-top: 3rem; padding: 1.5rem 1.6rem; border: 1px solid rgba(128,128,128,.22); border-top: 3px solid var(--red); border-radius: 8px; background: var(--dark2, transparent); }
.helpbox h2 { margin: 0 0 .4rem !important; padding: 0 !important; border: 0 !important; font-size: 1.2rem !important; }
.helpbox p { margin: 0; font-size: .88rem; color: var(--gray); line-height: 1.6; max-width: 560px; }
.helpbox-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
.helpbox-btns a { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.1rem; border-radius: 6px; font-weight: 700; font-size: .85rem; text-decoration: none; }
.guidelist { list-style: none; margin: 0; padding: 0; }
.guidelist li { padding: .6rem 0; border-bottom: 1px solid rgba(128,128,128,.15); }
.guidelist a { color: var(--red); font-weight: 700; text-decoration: none; }
.guidelist a:hover { text-decoration: underline; }

/* ---------- in-page filter on category / size / vehicle pages ---------- */
.lfilter { margin: 0 0 1.6rem; padding: 1rem 1.1rem; border: 1px solid rgba(128,128,128,.22); border-radius: 8px; background: var(--dark2, transparent); }
.lf-search { position: relative; margin-bottom: .8rem; }
.lf-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: .85rem; pointer-events: none; }
.lf-q { width: 100%; box-sizing: border-box; padding: .75rem .9rem .75rem 2.4rem; font-size: .95rem; font-family: inherit; color: inherit; background: var(--dark3, #fff); border: 2px solid rgba(128,128,128,.3); border-radius: 8px; -webkit-appearance: none; appearance: none; }
.lf-q:focus { outline: none; border-color: var(--red); }
.lf-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; }
.lf-lbl { font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gray); min-width: 70px; }
.lfilter .fchip { padding: .35rem .7rem; font-size: .75rem; background: none; cursor: pointer; font-family: inherit; color: inherit; }
.lfilter .fchip.on { border-color: var(--red); background: var(--red); color: #fff; }
.lfilter .fchip.on span { color: #fff; background: rgba(255,255,255,.22); }
.lfilter .lf-extra { display: none; }
.lfilter.lf-all .lf-extra { display: inline-flex; }
.lfilter.lf-all .lf-more { display: none; }
.lf-more { color: var(--red) !important; border-style: dashed !important; }
.lf-count { margin-top: .7rem; font-size: .8rem; font-weight: 600; color: var(--gray); }
.lf-none { margin: 1.5rem 0; color: var(--gray); font-size: .9rem; }
.lf-reset { background: none; border: 0; color: var(--red); font-weight: 700; cursor: pointer; font-family: inherit; font-size: inherit; text-decoration: underline; }
.pgrid2 .pcard2[hidden] { display: none; }
@media (max-width: 820px) {
  .lf-lbl { min-width: 100%; }
  .helpbox { padding: 1.2rem; }
  .helpbox-btns a { flex: 1 1 100%; justify-content: center; }
  .partbtns a { flex: 1 1 100%; justify-content: center; }
}

/* ---------- homepage: part finder + product range ---------- */
.home-search-sec {
  padding: 4rem 1.25rem;
  background: var(--dark2, transparent);
  border-top: 1px solid rgba(128,128,128,.14);
  border-bottom: 1px solid rgba(128,128,128,.14);
}
.home-search-wrap { max-width: 900px; margin: 0 auto; text-align: center; }
.home-search-sec h2,
.home-range-sec h2 {
  font-family: var(--font-display, inherit);
  font-size: 2.1rem; font-weight: 800; text-transform: uppercase;
  margin: .3rem 0 .7rem; line-height: 1.1;
}
.home-search-sec .psearch { margin-top: 1.6rem; text-align: left; }
.home-search-sec .psearch-hint { text-align: center; }

.home-range-sec { padding: 4.5rem 1.25rem; max-width: 1280px; margin: 0 auto; }
.home-range-sec .sec-label,
.home-search-sec .sec-label { text-align: center; }
.home-range-sec .sec-sub { text-align: center; max-width: 720px; margin: 0 auto 2.2rem; }
.home-range-sec .catgrid { margin-bottom: 2.5rem; }

@media (max-width: 820px) {
  .home-search-sec { padding: 2.6rem 1rem; }
  .home-range-sec { padding: 3rem 1rem; }
  .home-search-sec h2, .home-range-sec h2 { font-size: 1.5rem; }
  .catgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
  .catcard-n { font-size: .82rem; }
  .pgrid2, #partResults { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
  .pcard2 { padding-bottom: 88px; }
  .pcard2-b { min-height: 88px; padding: .55rem .6rem .7rem; }
  .pcard2-n { font-size: .8rem; }
}

/* Mobile horizontal-scroll guard.
   The Trust Badges band uses an inline 2.5rem side padding, and a button inside
   it pushes ~24px past a 375px screen. Google flags that as "content wider than
   screen". Scoped to small screens so desktop layout is untouched. */
@media (max-width: 640px) {
  /* body alone is not enough: when html is overflow:visible the body's value is
     propagated to the viewport and body itself stops clipping, so nothing is
     actually cut. Setting it on html is what stops the sideways scroll. */
  html, body { overflow-x: hidden; }
  body > div[style*="2.5rem"] { padding-left: 1rem !important; padding-right: 1rem !important; }
}
.fitgrid { align-items: start; }
