/* ==========================================================================
   PSQ Auto Parts — design system
   Direction: automotive-industrial. Dark hero, real photography, hard edges,
   one accent colour. Modelled on dealership-grade sites, not SaaS templates.
   ========================================================================== */

:root {
  /* Surfaces */
  --ink:      #0E1013;
  --ink-2:    #191C20;
  --ink-3:    #262A2F;
  --paper:    #FFFFFF;
  --paper-2:  #F5F5F3;
  --paper-3:  #ECECE9;

  /* Lines */
  --line:     #E2E2DE;
  --line-2:   #EDEDEA;
  --line-d:   rgba(255, 255, 255, .15);

  /* Text */
  --text:     #16181A;
  --text-2:   #565C64;
  --text-3:   #8C9299;
  --on-dark:  #F3F3F1;
  --on-dark-2:#9AA0A7;

  /* Accent — the only one */
  --red:      #C8102E;
  --red-d:    #A50D26;

  --wrap: 1320px;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Consolas, monospace;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: 0; border: 0; cursor: pointer; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }

/* ------------------------------------------------------------- typography */
.eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow--dark { color: var(--on-dark-2); }

h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; line-height: 1.14; }
h1 { font-size: 50px; }
h2 { font-size: 34px; }
h3 { font-size: 20px; }

.lede { font-size: 17px; line-height: 1.7; color: var(--text-2); }
.lede--dark { color: var(--on-dark-2); }

.mono { font-family: var(--mono); letter-spacing: .03em; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  background: var(--ink);
  border-bottom: 1px solid var(--line-d);
  font-size: 12.5px;
  color: var(--on-dark-2);
}
.topbar__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 42px;
  gap: 24px;
}
.topbar a:hover { color: var(--on-dark); }
.topbar__l { display: flex; align-items: center; gap: 26px; }
.topbar__r { display: flex; align-items: center; gap: 22px; }
.topbar__dot { color: var(--red); }

/* ------------------------------------------------------------------- nav */
.nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav__in {
  display: flex;
  align-items: center;
  height: 76px;
  gap: 44px;
}
.brand { display: flex; align-items: baseline; gap: 11px; flex: none; }
.brand__mark {
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
}
.brand__mark i { color: var(--red); font-style: normal; }
.brand__sub {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}
.nav__links { display: flex; align-items: center; gap: 34px; font-size: 14.5px; }
.nav__links a { color: var(--text-2); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav__links a:hover, .nav__links a.is-on {
  color: var(--text);
  border-bottom-color: var(--red);
}
.nav__right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.basket {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  padding: 10px 16px;
  border: 1px solid var(--line);
}
.basket:hover { border-color: var(--text); }
.basket__n {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--red);
  color: #fff;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14.5px;
  padding: 14px 26px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-d); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-3); }
.btn--ghost { border-color: var(--line-d); color: var(--on-dark); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn--line { border-color: var(--line); color: var(--text); }
.btn--line:hover { border-color: var(--text); }
.btn--sm { padding: 10px 18px; font-size: 13.5px; }

/* ------------------------------------------------------------------ hero */
.hero { background: var(--ink); color: var(--on-dark); }
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}
.hero__copy { display: flex; align-items: center; }
.hero__copy > div {
  max-width: 700px;
  margin-left: auto;
  width: 100%;
  padding: 88px 64px 88px 40px;
}
.hero h1 { margin: 18px 0 22px; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero__cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

.hero__stage {
  background: var(--paper);
  display: grid;
  place-items: center;
  padding: 48px 52px;
  position: relative;
}
.hero__stage img { width: 100%; max-width: none; }
.hero__tag {
  position: absolute;
  left: 0;
  bottom: 0;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  padding: 10px 16px;
}

/* ---------------------------------------------------------------- finder */
.finder { background: var(--ink-2); border-top: 1px solid var(--line-d); }
.finder__in {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 1px;
  background: var(--line-d);
  margin: 0 -1px;
}
.finder__f { background: var(--ink-2); padding: 20px 22px; }
.finder__l {
  display: block;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: 7px;
}
.finder select {
  width: 100%;
  background: 0;
  border: 0;
  color: var(--on-dark);
  font-size: 15px;
  outline: none;
  cursor: pointer;
}
.finder select option { background: var(--ink-2); color: var(--on-dark); }
.finder__go {
  background: var(--red);
  color: #fff;
  padding: 0 40px;
  font-size: 14.5px;
  display: grid;
  place-items: center;
}
.finder__go:hover { background: var(--red-d); }

/* -------------------------------------------------------------- sections */
.sec { padding: 96px 0; }
.sec--tight { padding: 72px 0; }
.sec--alt { background: var(--paper-2); }
.sec--dark { background: var(--ink); color: var(--on-dark); }

.sec__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 48px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.sec--dark .sec__head { border-bottom-color: var(--line-d); }
.sec__head h2 { max-width: 620px; margin-top: 12px; }
.sec__more { font-size: 14px; color: var(--red); white-space: nowrap; }
.sec__more:hover { text-decoration: underline; }

/* ------------------------------------------------------------ categories */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); }
.cat {
  padding: 30px 26px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.cat:nth-child(4n) { border-right: 0; }
.cat:nth-last-child(-n+4) { border-bottom: 0; }
.cat:hover { background: var(--paper-2); }
.cat__i { color: var(--red); margin-bottom: 16px; }
.cat__t { font-size: 16.5px; font-weight: 500; }
.cat__n { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); margin-top: 7px; }

/* --------------------------------------------------------------- product */
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pcard { background: var(--paper); display: flex; flex-direction: column; }
.pcard__img { background: #fff; aspect-ratio: 4/3; display: grid; place-items: center; padding: 20px; }
.pcard__img img { max-height: 100%; width: auto; object-fit: contain; }
.pcard__b { padding: 18px 20px 20px; border-top: 1px solid var(--line-2); flex: 1; display: flex; flex-direction: column; }
.pcard__t { font-size: 15px; font-weight: 500; line-height: 1.35; }
.pcard__v { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.pcard__oe { font-family: var(--mono); font-size: 12px; color: var(--text-2); margin-top: 12px; }
.pcard__f {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pcard__add { font-size: 13px; color: var(--red); }
.pcard__add:hover { text-decoration: underline; }
.pcard__stk { font-size: 11.5px; color: var(--text-3); }

/* ---------------------------------------------------------------- models */
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-d); }
.mcard {
  background: var(--ink-2);
  padding: 30px 28px 32px;
  transition: background .15s;
}
.mcard:hover { background: var(--ink-3); }
.mcard__b { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-2); }
.mcard__t { font-size: 21px; font-weight: 500; margin-top: 10px; }
.mcard__n { font-family: var(--mono); font-size: 12.5px; color: var(--red); margin-top: 14px; }

/* ----------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-d); }
.stat { background: var(--ink); padding: 40px 30px 44px; }
.stat__v { font-size: 42px; font-weight: 500; letter-spacing: -.02em; }
.stat__v span { font-size: 20px; color: var(--red); }
.stat__l { font-size: 13px; color: var(--on-dark-2); margin-top: 10px; }

/* ---------------------------------------------------------------- certs */
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cert { background: var(--paper); padding: 28px 24px 30px; }
.cert__b { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.cert__t { font-size: 16px; font-weight: 500; margin-top: 10px; }
.cert__d { font-size: 13px; color: var(--text-2); margin-top: 8px; line-height: 1.6; }

/* --------------------------------------------------------------- footer */
.foot { background: var(--ink); color: var(--on-dark-2); padding: 70px 0 0; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 50px; padding-bottom: 56px; }
.foot h4 { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark); font-weight: 500; margin-bottom: 18px; }
.foot a { display: block; font-size: 14px; padding: 5px 0; }
.foot a:hover { color: var(--on-dark); }
.foot__note { font-size: 13.5px; line-height: 1.7; margin-top: 16px; }
.foot__bar {
  border-top: 1px solid var(--line-d);
  padding: 22px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 12.5px;
}

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .wrap { padding: 0 28px; }
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero__grid { grid-template-columns: 1fr; min-height: 0; }
  .hero__copy > div { margin: 0; padding: 64px 28px 56px; max-width: none; }
  .hero__stage { padding: 48px 28px; min-height: 340px; }
  .footer-grid, .foot__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .cats, .pgrid, .certs { grid-template-columns: repeat(2, 1fr); }
  .cat:nth-child(4n) { border-right: 1px solid var(--line); }
  .cat:nth-child(2n) { border-right: 0; }
  .cat:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
  .cat:nth-last-child(-n+2) { border-bottom: 0; }
  .mgrid, .stats { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
}

@media (max-width: 680px) {
  .wrap { padding: 0 18px; }
  h1 { font-size: 31px; }
  h2 { font-size: 23px; }
  .sec { padding: 60px 0; }
  .pcard__v, .topbar__r { display: none; }
  /* the WhatsApp line wraps to two lines at this width — drop it, the
     number stays reachable from the footer and the contact page */
  .topbar__l { gap: 0; overflow: hidden; }
  .topbar__in { height: auto; min-height: 42px; }
  .topbar__l a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar__l a + a { display: none; }
  .cats, .pgrid, .certs, .mgrid, .stats { grid-template-columns: 1fr; }
  .cat { border-right: 0 !important; }
  .cat:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .sec__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .finder__in { grid-template-columns: 1fr; }
  .finder__go { padding: 18px; }
  .foot__grid { grid-template-columns: 1fr; }
  .foot__bar { flex-direction: column; gap: 8px; }
}
