/* ---- Brand tokens ---- */
:root {
  --stp-ink: #111827;
  --stp-charcoal: #1c1f26;
  --stp-yellow: #ffd200;
  --stp-yellow-dark: #eec000;
  --stp-border: #e5e7eb;
  --stp-muted: #6b7280;
}

/* ---- Persistent dark header ----
 * The Blocksy transparent header was disabled and the middle/bottom header
 * rows set to brand black (#0D0E10) in the customizer, so the dark header now
 * shows on every page. Menu links, cart/account icons, and the mobile
 * hamburger all inherit --theme-text-color; flip it to white on those rows. */
header.ct-header [data-row*="middle"],
header.ct-header [data-row*="bottom"] {
  --theme-text-color: #fff;
  --theme-link-initial-color: #fff;
  --theme-headings-color: #fff;
  --theme-icon-color: #fff; /* hamburger/cart/account SVGs fall back to black without this */
}
/* <button> doesn't inherit color (UA default is black) — set it outright. */
header.ct-header .ct-header-trigger { color: #fff; }

/* The search field is a white pill on the dark row — keep its text/placeholder
 * dark (the row-level white --theme-text-color would cascade in otherwise). */
header.ct-header .ct-search-box,
header.ct-header .ct-search-box input {
  --theme-text-color: #111827;
  color: #111827;
}

/* (The old mobile header-search margin compaction is gone: the search item
 * left the header entirely — it lives in the garage bar now.) */

/* The Greenshift dark hero rows carried 150-250px top padding to sit behind
 * the old transparent header overlay. The header is in-flow now: cap the
 * padding, and hide the row entirely where it has no content (homepage —
 * there it was purely the backdrop for the overlay). */
#gspb_row-id-gsbp-96b5086 { padding-top: 36px !important; padding-bottom: 30px !important; }
#gspb_row-id-gsbp-96b5086:not(:has(h1, h2, h3, .gspb_heading, p, form, img)) { display: none !important; }
/* The same block (content block 838) is also injected via a Blocksy hook after
 * the header (e.g. on /parts-for/ pages). Its only contents are the hidden
 * hero row plus an empty autop <p>, which left a ~24px white band above the
 * garage bar — the block was purely the old transparent-header backdrop, so
 * hide the hook copy outright. */
[data-block="hook:838"] { display: none !important; }

/* ---- Garage bar ---- */
.stp-garage-bar {
  background: var(--stp-charcoal); color: #f9fafb; font-size: 14px;
  border-bottom: 3px solid var(--stp-yellow);
}
.stp-garage-inner {
  /* 1290+32 matches the hero band's container so the bar's contents line up
   * with the hero text edge (and the header container, home-hero.css). */
  max-width: 1290px; margin: 0 auto; padding: 8px 32px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

/* Product search, hosted in the bar (moved out of the Blocksy header).
 * Wide enough for a full YMM+part query ("2015 Chevrolet Silverado
 * Transmission"); plain GET /?s=…&post_type=product, same as before. */
.stp-bar-search {
  display: flex; align-items: center; margin-left: auto;
  flex: 0 1 460px; min-width: 300px;
  background: #fff; border-radius: 8px; overflow: hidden;
}
.stp-bar-search input[type="search"] {
  flex: 1; min-width: 0; height: 40px; border: 0; background: transparent;
  padding: 0 4px 0 14px; font-size: 14.5px; color: var(--stp-ink);
}
.stp-bar-search input[type="search"]:focus-visible {
  outline: 2px solid var(--stp-yellow); outline-offset: -2px;
}
.stp-bar-search button {
  flex: none; width: 42px; height: 40px; border: 0; background: transparent;
  color: #4b5563; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.stp-bar-search button:hover { color: var(--stp-ink); }
.stp-bar-search button:focus-visible { outline: 2px solid var(--stp-yellow); outline-offset: -2px; }
/* Label and action buttons flow together on the left (no pushed-right actions). */
.stp-garage-label { display: inline-flex; align-items: center; gap: 8px; }
.stp-garage-label strong { color: var(--stp-yellow); }
.stp-garage-icon { flex: none; display: block; }
.stp-garage-action {
  background: transparent; color: #f9fafb; border: 1px solid #374151;
  border-radius: 6px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; line-height: 1.4;
}
.stp-garage-action:hover { background: #2a2e37; }
.stp-garage-action:focus-visible { outline: 2px solid var(--stp-yellow); outline-offset: 2px; }
.stp-garage-primary { background: var(--stp-yellow); color: var(--stp-ink); border-color: var(--stp-yellow); }
.stp-garage-primary:hover { background: var(--stp-yellow-dark); }
.stp-garage-ghost { opacity: .75; }

/* ---- Finder (shop, shortcode + modal) ---- */
.stp-finder {
  background: #fff; border: 1px solid var(--stp-border); border-top: 4px solid var(--stp-yellow);
  border-radius: 14px; padding: 20px;
  box-shadow: 0 6px 24px rgba(17, 24, 39, .08);
}
.stp-finder-head { margin-bottom: 14px; }
.stp-finder-title {
  font-size: 19px; font-weight: 800; color: var(--stp-ink); line-height: 1.25;
  letter-spacing: -.01em;
}
.stp-finder-sub { margin-top: 3px; font-size: 13.5px; color: var(--stp-muted); }

.stp-finder-row {
  display: grid; gap: 10px;
  grid-template-columns: minmax(96px, .7fr) 1fr 1.2fr auto;
  align-items: stretch;
}
.stp-finder-field { position: relative; display: block; min-width: 0; }
.stp-finder-field::after {
  /* chevron */
  content: ""; position: absolute; right: 14px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid #4b5563; border-bottom: 2px solid #4b5563;
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.stp-finder-row select {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 48px; padding: 10px 34px 10px 14px;
  border: 1.5px solid #d1d5db; border-radius: 10px;
  font-size: 16px; font-weight: 600; background: #fff; color: var(--stp-ink);
  cursor: pointer;
}
.stp-finder-row select:hover:not(:disabled) { border-color: #9ca3af; }
.stp-finder-row select:focus-visible {
  outline: 3px solid rgba(255, 210, 0, .55); outline-offset: 1px; border-color: var(--stp-ink);
}
.stp-finder-row select:disabled {
  background: #f3f4f6; color: #9ca3af; cursor: not-allowed; font-weight: 500;
}
.stp-finder-field:has(select:disabled)::after { border-color: #c3c8d0; }
.stp-finder-btn {
  min-height: 48px; padding: 0 24px;
  background: var(--stp-yellow); color: var(--stp-ink);
  border: 0; border-radius: 10px; font-size: 16px; font-weight: 800; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.stp-finder-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: not-allowed; }
.stp-finder-btn:not(:disabled):hover { background: var(--stp-yellow-dark); box-shadow: 0 2px 8px rgba(17,24,39,.18); }
.stp-finder-btn:focus-visible { outline: 3px solid var(--stp-ink); outline-offset: 2px; }

/* Free-text "Other…" inputs share the select chrome, minus the chevron. */
.stp-finder-row input.stp-finder-text {
  -webkit-appearance: none; appearance: none;
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid #d1d5db; border-radius: 10px;
  font-size: 16px; font-weight: 600; background: #fff; color: var(--stp-ink);
}
.stp-finder-row input.stp-finder-text:focus-visible {
  outline: 3px solid rgba(255, 210, 0, .55); outline-offset: 1px; border-color: var(--stp-ink);
}
.stp-finder-field.is-text::after { display: none; }

/* ---- No-match / request-a-part panel ---- */
.stp-finder-nomatch {
  margin-top: 14px; padding: 14px 16px; border-radius: 10px;
  background: #fffbeb; border: 1px solid #fde68a; color: #713f12; font-size: 14.5px;
}
.stp-finder-nomatch-msg { line-height: 1.5; }
.stp-finder-nomatch-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.stp-finder-request {
  display: inline-block; background: var(--stp-yellow); color: var(--stp-ink);
  border-radius: 8px; padding: 10px 18px; font-weight: 700; font-size: 15px; text-decoration: none;
}
.stp-finder-request:hover { background: var(--stp-yellow-dark); color: var(--stp-ink); }
.stp-finder-call {
  display: inline-block; padding: 10px 14px; font-weight: 700; font-size: 15px;
  color: #713f12; text-decoration: none;
}

/* ---- Modal ---- */
.stp-modal {
  position: fixed; inset: 0; background: rgba(17,24,39,.6); z-index: 99999;
  display: none; align-items: flex-start; justify-content: center; padding: 12vh 16px;
}
.stp-modal.is-open { display: flex; }
.stp-modal-box {
  position: relative; background: #fff; border-radius: 14px; padding: 24px;
  width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.stp-modal-close {
  position: absolute; top: 10px; right: 12px; border: 0; background: transparent;
  font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280;
}
.stp-modal-finder .stp-finder { border: 0; box-shadow: none; padding: 0; }
.stp-modal-finder .stp-finder-row { grid-template-columns: 1fr; }

/* ---- Fits badge ---- */
.stp-fits-badge {
  margin: 12px 0; padding: 10px 14px; border-radius: 8px; font-size: 15px; font-weight: 600;
}
.stp-fits-yes { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.stp-fits-no  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.stp-fits-badge strong { font-weight: 800; }

/* Pill overlaid on the product gallery — green fits / red doesn't-fit. */
.woocommerce-product-gallery { position: relative; }
#stp-fits-pill {
  position: absolute; top: 10px; left: 10px; z-index: 10;
  color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  pointer-events: none; max-width: calc(100% - 70px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#stp-fits-pill.stp-pill-yes { background: #16a34a; }
#stp-fits-pill.stp-pill-no  { background: #dc2626; }

/* Fits badge overlaid top-left on browse/shop product-card images. */
.stp-card-fit-badge {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  font-size: 11.5px; font-weight: 700; line-height: 1;
  padding: 4px 9px; border-radius: 999px; pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  max-width: calc(100% - 16px); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.stp-card-fit-yes { background: #16a34a; color: #fff; }
.stp-card-fit-no  { background: #e5e7eb; color: #6b7280; } /* muted grey, non-alarming */

/* ---- Shop/homepage finder wrapper ---- */
.stp-shop-finder { max-width: 760px; margin: 4px auto 28px; }

/* ---- Sticky mobile call ---- */
.stp-sticky-call { display: none; }

/* ---- Mobile ---- */
@media (max-width: 782px) {
  .stp-sticky-call {
    display: block; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9998;
    background: #16a34a; color: #fff; text-align: center; text-decoration: none;
    font-weight: 700; font-size: 16px; padding: 14px; border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.25);
  }
  /* keep page end reachable above the sticky call button */
  body { padding-bottom: 84px; }

  .stp-garage-label { flex: 1 1 100%; margin-bottom: 4px; }
  .stp-garage-inner { padding: 8px 16px 10px; }
  /* Search on its own line at the bottom of the bar. */
  .stp-bar-search { flex: 1 1 100%; order: 9; margin: 6px 0 0; min-width: 0; }

  .stp-finder { padding: 16px; }
  .stp-finder-row { grid-template-columns: 1fr 1fr; }
  .stp-finder-field-model, .stp-finder-btn { grid-column: 1 / -1; }
  .stp-shop-finder { margin: 8px auto 24px; }
}
