/* BAS Storefront — mirrors the live brushautoparts.com Warehouse theme:
   Primary Dark #111111, Surface #1a1a1a, Accent Blue #3b82f6, red hero CTA #cc0000 */
:root {
  --bg: #111111; --surface: #1a1a1a; --surface2: #232323;
  --text: #ffffff; --muted: #9ca3af; --line: #2e2e2e;
  --accent: #3b82f6; --accent-hover: #2563eb; --accent-rgb: 59, 130, 246;
  --red-cta: #cc0000; --navy: #1e3a5f;
  --green: #22c55e; --amber: #f59e0b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
h1 { font-size: 1.6rem; margin-bottom: .5rem; font-weight: 800; }
h2 { font-size: 1.35rem; margin: 1.8rem 0 .9rem; font-weight: 800; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }
section { margin-bottom: 1.6rem; }

/* ------------------------------------------------------------- header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; gap: 18px; padding: 12px 16px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: .5px; white-space: nowrap; text-transform: uppercase; }
.logo img { height: 98px; width: auto; display: block; }
.logo-text span { color: var(--accent); margin-left: 7px; font-weight: 700; }
@media (max-width: 700px) { .logo-text { display: none; } .logo img { height: 82px; } }
.searchbar { flex: 1; display: flex; min-width: 240px; }
.searchbar input {
  flex: 1; padding: 11px 14px; border: 2px solid var(--accent); border-right: 0;
  border-radius: 8px 0 0 8px; background: #ffffff; color: #111111; font-size: 1rem;
}
.searchbar input::placeholder { color: #6b7280; }
.searchbar button {
  padding: 11px 20px; border: 2px solid var(--accent); border-left: 0;
  border-radius: 0 8px 8px 0; background: var(--accent); color: #fff;
  font-weight: 700; cursor: pointer; font-size: 1rem;
}
.searchbar button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.header-nav { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.phone { font-weight: 700; }
.cart-link { font-weight: 600; }
.cart-badge {
  background: var(--accent); color: #fff; border-radius: 10px;
  padding: 1px 8px; font-size: .8rem; font-weight: 700;
}
.main-nav { border-bottom: 1px solid var(--line); background: var(--bg); }
.main-nav .wrap { display: flex; gap: 26px; padding: 9px 16px; overflow-x: auto; white-space: nowrap; }
.main-nav a { font-size: .92rem; font-weight: 600; color: var(--text); opacity: .9; }
.main-nav a:hover { color: var(--accent); opacity: 1; }

/* --------------------------------------------------------------- hero */
.hero {
  position: relative; border-radius: 0; overflow: hidden; margin: 0 -16px;
  background: #000;
}
.hero img.hero-bg {
  width: 100%; height: 420px; object-fit: cover; display: block; opacity: .5;
}
.hero-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 0 20px;
}
.hero-inner h1 { font-size: 2.6rem; text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.hero-inner p { font-size: 1.15rem; margin: .4rem 0 1.2rem; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.btn-red {
  display: inline-block; background: var(--red-cta); color: #fff; font-weight: 700;
  padding: 13px 30px; border-radius: 6px; font-size: 1.05rem;
}
.btn-red:hover { background: #a80000; color: #fff; }
@media (max-width: 700px) {
  .hero img.hero-bg { height: 320px; }
  .hero-inner h1 { font-size: 1.9rem; }
}

/* ---------------------------------------------------------- trust bar */
.trustbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.trust-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px 16px;
}
.trust-item { display: flex; gap: 12px; align-items: center; }
.trust-item svg { width: 34px; height: 34px; stroke: var(--accent); flex-shrink: 0; }
.trust-item strong { display: block; font-size: .95rem; }
.trust-item small { color: var(--muted); font-size: .82rem; }
@media (max-width: 800px) { .trust-row { grid-template-columns: repeat(2, 1fr); } }

/* -------------------------------------------------------- hero search */
.hero-search { text-align: center; padding: 2.4rem 0 1.2rem; }
.hero-search h2 { font-size: 1.8rem; margin: 0 0 .3rem; }
.hero-search > p { color: var(--muted); margin-bottom: 1.1rem; }
.ymm {
  display: grid; grid-template-columns: 110px 1fr 1fr 1.4fr auto; gap: 8px;
  max-width: 980px; margin: 0 auto;
}
.ymm select, .ymm input, .facets select, .facets input {
  padding: 11px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface); color: var(--text); font-size: .95rem; width: 100%;
}
.ymm button {
  padding: 11px 24px; border: 0; border-radius: 6px; background: var(--accent);
  color: #fff; font-weight: 700; cursor: pointer; font-size: 1rem;
}
.ymm button:hover { background: var(--accent-hover); }
.popular { margin-top: 12px; color: var(--muted); font-size: .92rem; }
.popular a { color: var(--accent); }
@media (max-width: 800px) { .ymm { grid-template-columns: 1fr 1fr; } }

/* -------------------------------------------------------------- cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  overflow: hidden; display: flex; flex-direction: column; transition: border-color .15s, transform .15s;
}
.card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.card-img { position: relative; aspect-ratio: 4/3; background: #0c0c0c; border-radius: 10px 10px 0 0; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.noimg { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: .85rem; }
.noimg.big { aspect-ratio: 4/3; background: var(--surface); border: 1px dashed var(--line); border-radius: 10px; }
.chip {
  position: absolute; left: 8px; bottom: 8px; font-size: .72rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; color: #fff;
}
.chip-ship { background: rgba(34,197,94,.9); }
.chip-pickup { background: rgba(245,158,11,.92); color: #1a1305; }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card-vendor { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.card-title {
  font-size: .88rem; line-height: 1.35; min-height: 2.4em;
  overflow-wrap: break-word;
}
.card-price { font-weight: 800; margin-top: 6px; font-size: 1.02rem; }
.ship-note { color: var(--green); font-size: .78rem; font-weight: 700; margin-left: 7px; white-space: nowrap; }
.card-buy {
  margin-top: 9px; background: var(--accent); color: #fff; text-align: center;
  border-radius: 6px; padding: 8px 0; font-weight: 700; font-size: .88rem;
}
.card:hover .card-buy { background: var(--accent-hover); }

/* --------------------------------------------- vehicles (navy tiles) */
.vehicle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.vehicle-tile {
  position: relative; background: var(--navy); border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); transition: transform .15s, border-color .15s;
}
.vehicle-tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.vehicle-tile .card-img { border-radius: 0; }
.vehicle-tile .card-img img { opacity: .85; }
.vehicle-tile .card-body { text-align: center; }
.vehicle-tile .view-parts {
  display: inline-block; margin-top: 8px; background: var(--navy); border: 1px solid rgba(255,255,255,.4);
  color: #fff; border-radius: 6px; padding: 7px 18px; font-weight: 700; font-size: .85rem;
}
.vehicle-tile:hover .view-parts { background: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------ offers + rich text */
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.offer {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px;
}
.offer h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.offer p { color: var(--muted); font-size: .95rem; }
@media (max-width: 700px) { .offers { grid-template-columns: 1fr; } }
.about { text-align: center; max-width: 760px; margin: 0 auto; padding: 1.4rem 0 .4rem; }
.about p { color: var(--muted); margin: .6rem 0 1.2rem; }
.btn-accent {
  display: inline-block; background: var(--accent); color: #fff; font-weight: 700;
  padding: 12px 26px; border-radius: 6px;
}
.btn-accent:hover { background: var(--accent-hover); color: #fff; }

/* -------------------------------------------------------- type tiles */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.type-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 14px 16px; display: flex; justify-content: space-between; align-items: baseline;
  font-size: .92rem; font-weight: 600;
}
.type-tile small { color: var(--muted); font-weight: 400; }
.type-tile:hover { border-color: var(--accent); }

/* ------------------------------------------------------ pickup strip */
.pickup-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  background: var(--surface); border: 1px solid #4a3a12;
  border-radius: 10px; padding: 18px 22px; flex-wrap: wrap;
}
.pickup-strip h2 { margin: 0 0 .3rem; }
.pickup-strip p { color: var(--muted); max-width: 640px; }

/* ------------------------------------------------------------ buttons */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 6px; border: 0;
  background: var(--surface2); color: var(--text); font-weight: 700; cursor: pointer;
  font-size: .95rem; text-align: center;
}
.btn:hover { background: var(--line); color: var(--text); }
.btn-buy { background: var(--accent); color: #fff; width: 100%; margin-bottom: 8px; font-size: 1.05rem; }
.btn-buy:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); width: 100%; margin-bottom: 8px; }
.btn-amber { background: var(--amber); color: #1a1305; width: 100%; margin-bottom: 8px; }
.btn-amber:hover { background: #d97706; color: #1a1305; }
.pickup-strip .btn-amber { width: auto; margin: 0; }

/* ------------------------------------------------------ search layout */
.search-layout { display: grid; grid-template-columns: 230px 1fr; gap: 20px; padding-top: 1rem; }
.filters-toggle { display: none; }
@media (max-width: 800px) {
  .search-layout { grid-template-columns: 1fr; gap: 12px; }
  /* results first on phones — filters collapse behind a toggle */
  .filters-toggle {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 11px 16px; border: 1px solid var(--line);
    border-radius: 8px; background: var(--surface); color: var(--text);
    font-weight: 700; font-size: .95rem; cursor: pointer;
  }
  .facets { display: none; }
  .facets.open { display: block; }
}
.facets { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px; align-self: start; }
.facets h3 { margin-top: .9rem; }
.facets h3:first-child { margin-top: 0; }
.facets select, .facets input { margin-bottom: 6px; }
.facet-row { display: block; font-size: .9rem; padding: 3px 0; color: var(--muted); }
.price-row { display: flex; gap: 6px; }
.facets .btn { width: 100%; margin-top: 10px; background: var(--accent); color: #fff; }
.clear { display: block; text-align: center; margin-top: 8px; font-size: .85rem; color: var(--muted); }
.notice {
  background: #2a2107; border: 1px solid #4a3a12; color: #fbbf24;
  border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: .92rem;
}
.notice-info { background: #0e2036; border-color: #1e3a5f; color: #93c5fd; }
.results-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.qchip { background: var(--surface2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: .82rem; margin: 0 2px; }
.sort-form select { padding: 8px; border-radius: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin: 22px 0; }
.similar-break { border-top: 2px solid var(--line); margin-top: 26px; padding-top: 18px; }
.similar-break h2 { margin: 0 0 .2rem; }
.similar-break p { margin-bottom: 12px; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty h1, .empty h3 { color: var(--text); margin-bottom: .6rem; }

/* ------------------------------------------------------- product page */
.crumbs { font-size: .84rem; color: var(--muted); padding: 12px 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.product-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr); gap: 24px; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; } }
.gallery #main-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #0c0c0c; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
.thumbs img.active, .thumbs img:hover { border-color: var(--accent); }
.buybox h1 { font-size: 1.3rem; line-height: 1.35; }
.sold-banner {
  background: #2a0f0f; border: 1px solid #5c1a1a; color: #fca5a5;
  border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: .95rem;
}
.sold-banner strong { color: #f87171; letter-spacing: .06em; }
.buy-price { font-size: 1.7rem; font-weight: 800; margin: 10px 0 14px; display: flex; align-items: center; gap: 10px; }
.buy-price .chip { position: static; }
.spec-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: .92rem; }
.spec-table th { text-align: left; color: var(--muted); font-weight: 600; padding: 7px 10px 7px 0; width: 110px; vertical-align: top; }
.spec-table td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.descr { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: .93rem; }
.fit-table-wrap { overflow-x: auto; }
.ic-lines { margin: 6px 0 10px; font-size: .95rem; }
.ic-line {
  display: grid; grid-template-columns: 92px 90px 1fr; gap: 12px;
  padding: 5px 0; border-bottom: 1px solid rgba(46, 46, 46, .55);
  line-height: 1.45; align-items: baseline;
}
.ic-line:last-child { border-bottom: 0; }
.ic-years { font-weight: 700; white-space: nowrap; }
.ic-model { color: var(--accent); font-weight: 600; white-space: nowrap; }
.ic-desc { color: var(--muted); }
@media (max-width: 700px) {
  .ic-line { grid-template-columns: 84px 1fr; }
  .ic-desc { grid-column: 1 / -1; padding-left: 0; margin-top: -2px; }
}
.fit-details { margin-top: 12px; }
.fit-details summary { cursor: pointer; color: var(--muted); font-size: .9rem; padding: 4px 0; }
.fit-details summary:hover { color: var(--accent); }
.fit-table-wrap.tall { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; }
.fit-table-wrap.tall table { max-width: none; }
.fit-table-wrap.tall tr:first-child th { position: sticky; top: 0; background: var(--bg); }
.fit-table { border-collapse: collapse; width: 100%; max-width: 640px; font-size: .9rem; }
.fit-table th, .fit-table td { text-align: left; padding: 6px 14px 6px 0; border-bottom: 1px solid var(--line); }
.fit-table th { color: var(--muted); }

/* vehicle page */
.vehicle-head { padding: .6rem 0 1rem; }

/* cart */
.cart-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.cart-row .rm { background: none; border: 0; color: var(--muted); cursor: pointer; }
.cart-row .rm:hover { color: #ef4444; }
.cart-total { font-size: 1.1rem; margin: 14px 0; }
#cart-actions .btn-buy { max-width: 320px; }

/* info pages + lead forms */
.info-page { max-width: 900px; margin: 0 auto; padding-top: 1.2rem; }
.info-page h1 { margin-bottom: .4rem; }
.info-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 1.2rem; }
@media (max-width: 760px) { .info-cols { grid-template-columns: 1fr; } }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.info-card h3 { margin: .9rem 0 .3rem; }
.info-card h3:first-child { margin-top: 0; }
.info-card p { color: var(--muted); font-size: .95rem; }
.big-phone { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.lead-form label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 10px; }
.lead-form input, .lead-form textarea, .lead-form select {
  width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--bg); color: var(--text); font-size: .95rem;
}
.lead-form .btn { margin-top: 4px; }
.form-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }

/* zoom overlay */
#zoom-overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out;
}
#zoom-overlay[hidden] { display: none; }
#zoom-img { max-width: 96vw; max-height: 96vh; object-fit: contain; }
.gallery #main-img { cursor: zoom-in; }

/* footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 3rem; background: var(--surface); }
.footer-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; padding: 26px 16px; font-size: .9rem; }
