:root {
  --max: 1200px;
  --engineworks-amber: #e0a321;
  --engineworks-amber-soft: #fff4d7;
}

html {
  scroll-padding-top: 150px;
}

.site-header {
  background: rgba(255, 255, 255, .98);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}

.masthead {
  min-height: 76px;
  grid-template-columns: 240px minmax(300px, 1fr) 150px;
  gap: 28px;
}

.engineworks-wordmark {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  width: fit-content;
  color: var(--navy);
  font-size: 22px;
  font-weight: 850;
  line-height: 1;
}

.engineworks-brand-name,
.engineworks-brand-suffix {
  white-space: nowrap;
}

.engineworks-brand-suffix {
  margin-left: 6px;
  padding-bottom: 4px;
  color: var(--orange);
  border-bottom: 3px solid var(--engineworks-amber);
}

.catalog-search {
  height: 46px;
  border: 1px solid #aab8b4;
  border-radius: 4px;
}

.catalog-search:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 63, 53, .14);
}

.catalog-search button {
  width: 112px;
  flex-basis: 112px;
  background: var(--navy);
}

.catalog-search button:hover {
  background: var(--navy-dark);
}

.cart-wrap {
  justify-self: end;
}

.cart-button {
  width: 132px;
  height: 48px;
  border-radius: 4px;
  color: var(--navy);
}

.cart-button b {
  background: var(--orange);
}

.main-nav {
  color: var(--ink);
  background: #fff;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.nav-inner {
  min-height: 50px;
  gap: 30px;
}

.nav-inner a {
  min-height: 50px;
  padding: 0;
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 14px;
  font-weight: 700;
}

.nav-inner a:hover,
.nav-inner a:focus-visible {
  color: var(--orange-dark);
  background: transparent;
  border-bottom-color: var(--engineworks-amber);
}

.nav-inner .all-parts {
  align-self: stretch;
  gap: 8px;
  margin-right: 0;
  padding: 0 20px;
  color: #fff;
  background: var(--navy);
  border-bottom-color: var(--navy);
}

.nav-inner .all-parts:hover,
.nav-inner .all-parts:focus-visible {
  color: #fff;
  background: var(--navy-dark);
  border-bottom-color: var(--navy-dark);
}

.engineworks-hero {
  min-height: 560px;
  padding: 0;
  display: flex;
  align-items: center;
  background-color: #fff;
  background-image: url("../media/hero-carburetor-kit.webp");
  background-repeat: no-repeat;
  background-position: calc(50% + 370px) center;
  background-size: 560px 560px;
  border-bottom: 1px solid var(--line);
}

.engineworks-hero::before,
.engineworks-hero::after {
  content: none;
}

.engineworks-hero-inner {
  position: relative;
  z-index: 1;
}

.engineworks-hero .hero-copy {
  max-width: 650px;
  padding: 58px 0 72px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.eyebrow-light {
  color: #f0c35a;
}

.engineworks-hero h1 {
  max-width: 620px;
  color: var(--navy-dark);
  font-size: 54px;
  line-height: 1.04;
  letter-spacing: 0;
}

.engineworks-hero .hero-lead {
  max-width: 560px;
  margin: 20px 0 26px;
  color: #40504c;
  font-size: 20px;
  line-height: 1.45;
}

.hero-search {
  width: min(100%, 590px);
  min-height: 58px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 120px;
  align-items: center;
  gap: 10px;
  padding-left: 17px;
  border: 1px solid #9aaca7;
  border-radius: 5px;
  background: #fff;
  box-shadow: var(--shadow);
}

.hero-search:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(18, 63, 53, .15), var(--shadow);
}

.hero-search svg {
  color: var(--navy);
}

.hero-search input {
  width: 100%;
  min-width: 0;
  height: 56px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.hero-search button {
  align-self: stretch;
  border: 0;
  color: #fff;
  background: var(--orange);
  font-weight: 800;
  cursor: pointer;
}

.hero-search button:hover {
  background: var(--orange-dark);
}

.hero-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
}

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 4px;
}

.button-primary {
  background: var(--navy);
}

.button-primary:hover {
  background: var(--navy-dark);
}

.button-secondary {
  color: var(--navy);
  border-color: var(--navy);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  color: var(--navy);
  border-bottom: 2px solid var(--engineworks-amber);
  font-weight: 800;
}

.home .section {
  padding: 76px 0;
}

.home .section-heading {
  margin-bottom: 30px;
}

.home .section-heading h2,
.finder-intro h2,
.selection-layout h2 {
  color: var(--navy-dark);
  font-size: 32px;
  line-height: 1.18;
  letter-spacing: 0;
}

.home .section-link {
  color: var(--navy);
  font-size: 14px;
}

.home .categories-section {
  background: var(--soft);
}

.home .category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home .category-card {
  min-height: 146px;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 22px;
  align-items: center;
  border-radius: 5px;
}

.home .category-image {
  width: 130px;
  height: 144px;
  padding: 10px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
}

.home .category-copy {
  min-height: 0;
  padding: 18px;
}

.home .category-copy strong {
  color: var(--navy-dark);
  font-size: 16px;
  overflow-wrap: normal;
}

.home .category-copy small {
  font-size: 13px;
}

.home .category-card > svg {
  position: static;
  width: 18px;
  height: 18px;
  color: var(--orange);
}

.finder-section {
  padding: 70px 0;
  color: #fff;
  background: var(--navy);
}

.finder-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 72px;
  align-items: center;
}

.finder-intro h2 {
  max-width: 470px;
  color: #fff;
}

.finder-intro > p:last-child {
  max-width: 500px;
  margin: 20px 0 0;
  color: #d1dfdb;
  font-size: 16px;
}

.finder-steps {
  display: grid;
}

.finder-step {
  min-height: 104px;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.finder-step:last-child {
  border-bottom: 0;
}

.step-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  color: var(--engineworks-amber);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 4px;
}

.finder-step strong {
  font-size: 16px;
}

.finder-step p {
  margin: 4px 0 0;
  color: #d1dfdb;
  font-size: 14px;
}

.home .product-section {
  background: #fff;
  border-top: 0;
}

.home .product-grid {
  gap: 18px;
}

.home .product-card {
  border-radius: 5px;
}

.home .product-image {
  height: 260px;
  background: #fff;
}

.home .product-body {
  padding: 16px;
}

.home .product-category {
  margin: 0 0 10px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.home .product-card h3 {
  min-height: 68px;
  font-size: 15px;
  line-height: 1.38;
}

.home .mpn {
  margin: 14px 0 12px;
}

.home .csb-card-action-row {
  min-height: 58px;
}

.home .csb-card-action {
  color: #fff !important;
  background: var(--navy) !important;
  border-color: var(--navy) !important;
}

.home .csb-card-view {
  color: var(--navy) !important;
  background: #fff !important;
}

.home .csb-card-action:hover,
.home .csb-card-action:focus-visible {
  color: #fff !important;
  background: var(--orange) !important;
  border-color: var(--orange) !important;
}

.selection-section {
  padding: 42px 0;
  background: var(--engineworks-amber-soft);
  border-top: 1px solid #efd58e;
  border-bottom: 1px solid #efd58e;
}

.selection-layout {
  display: grid;
  grid-template-columns: .85fr 1.15fr auto;
  gap: 42px;
  align-items: center;
}

.selection-layout h2 {
  font-size: 27px;
}

.selection-layout > p {
  margin: 0;
  color: #544733;
  font-size: 15px;
}

.site-footer {
  padding-top: 54px;
  color: #dce7e4;
  background: var(--navy-dark);
}

.footer-grid {
  grid-template-columns: 1.55fr repeat(3, 1fr);
  gap: 50px;
}

.footer-brand .engineworks-wordmark {
  color: #fff;
}

.footer-about p {
  color: #aec2bd;
  font-size: 13px;
  line-height: 1.65;
}

.footer-grid h2 {
  font-size: 13px;
  letter-spacing: 0;
}

.footer-grid > div:not(:first-child) a {
  color: #c2d2ce;
  font-size: 13px;
}

.footer-bottom {
  min-height: 80px;
  color: #9bb0ab;
  font-size: 12px;
}

.footer-payment img {
  width: min(359px, 100%);
}

.mobile-cart {
  background: var(--orange);
}

.mobile-cart span {
  color: var(--navy-dark);
  background: var(--engineworks-amber);
  border-color: #fff;
}

@media (max-width: 1120px) {
  .masthead {
    grid-template-columns: 220px minmax(260px, 1fr) 132px;
    gap: 18px;
  }

  .nav-inner {
    gap: 18px;
  }

  .nav-inner a {
    font-size: 13px;
  }

  .home .category-card {
    grid-template-columns: 106px minmax(0, 1fr) 20px;
  }

  .home .category-image {
    width: 106px;
  }
}

@media (max-width: 820px) {
  .masthead {
    min-height: 112px;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    grid-template-rows: 54px 48px;
    gap: 0 10px;
    padding-block: 5px;
  }

  .engineworks-wordmark {
    font-size: 18px;
  }

  .catalog-search {
    height: 44px;
  }

  .catalog-search button {
    width: 48px;
    flex-basis: 48px;
  }

  .catalog-search button span {
    display: none;
  }

  .cart-wrap {
    grid-column: 3;
    grid-row: 1;
  }

  .main-nav {
    position: absolute;
    inset: 100% 0 auto;
    visibility: hidden;
    opacity: 0;
    color: var(--navy);
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    visibility: visible;
    opacity: 1;
  }

  .nav-inner {
    width: 100%;
    padding: 8px 14px 14px;
    gap: 0;
  }

  .nav-inner a,
  .nav-inner .all-parts {
    min-height: 48px;
    width: 100%;
    padding: 0 12px;
    color: var(--navy);
    background: #fff;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
  }

  .nav-inner .all-parts:hover,
  .nav-inner .all-parts:focus-visible,
  .nav-inner a:hover,
  .nav-inner a:focus-visible {
    color: var(--orange-dark);
    background: #fff;
    border-bottom-color: var(--line);
  }

  .finder-layout,
  .selection-layout {
    grid-template-columns: 1fr;
  }

  .finder-layout {
    gap: 36px;
  }

  .selection-layout {
    gap: 20px;
  }

  .selection-layout .button {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .engineworks-hero {
    min-height: 630px;
    align-items: flex-start;
    background-position: center calc(100% - 10px);
    background-size: 320px 320px;
  }

  .engineworks-hero .hero-copy {
    width: 100%;
    max-width: none;
    padding: 42px 0 328px;
  }

  .engineworks-hero h1 {
    max-width: none;
    font-size: 25px;
    overflow-wrap: normal;
    word-break: normal;
  }

  .engineworks-hero .hero-lead {
    margin: 14px 0 20px;
    padding: 0;
    font-size: 16px;
  }

  .hero-search {
    min-height: 54px;
    grid-template-columns: 22px minmax(0, 1fr) 92px;
    padding-left: 12px;
  }

  .hero-search input {
    height: 52px;
    font-size: 14px;
  }

  .hero-search button {
    font-size: 13px;
  }

  .hero-links {
    align-items: flex-start;
    gap: 14px;
    margin-top: 16px;
  }

  .home .section {
    padding: 58px 0;
  }

  .home .section-heading {
    align-items: flex-start;
  }

  .home .section-heading h2,
  .finder-intro h2,
  .selection-layout h2 {
    font-size: 28px;
  }

  .home .section-link {
    width: 32px;
    overflow: hidden;
    white-space: nowrap;
  }

  .home .section-link svg {
    min-width: 20px;
    margin-left: 8px;
  }

  .home .category-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home .category-card {
    min-height: 108px;
    grid-template-columns: 92px minmax(0, 1fr) 22px;
  }

  .home .category-image {
    width: 92px;
    height: 106px;
  }

  .home .category-copy {
    min-height: 0;
    padding: 14px;
  }

  .finder-section {
    padding: 58px 0;
  }

  .finder-step {
    min-height: 112px;
  }

  .home .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .home .product-image {
    height: 164px;
  }

  .home .product-body {
    padding: 12px;
  }

  .home .product-category {
    min-height: 30px;
    font-size: 9px;
  }

  .home .product-card h3 {
    min-height: 0;
    font-size: 13px;
  }

  .home .mpn {
    margin-top: 16px;
    overflow-wrap: anywhere;
  }

  .selection-section {
    padding: 48px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 34px 24px;
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-bottom {
    min-height: 0;
    padding: 20px 0 80px;
  }
}

@media (max-width: 390px) {
  .engineworks-hero {
    min-height: 660px;
    background-size: 300px 300px;
  }

  .engineworks-hero .hero-copy {
    padding-bottom: 310px;
  }

  .hero-links {
    flex-direction: column;
    gap: 4px;
  }

  .home .csb-card-action-row {
    align-items: end;
  }

  .home .csb-card-price {
    max-width: 62px;
  }

  .home .product-card .price ins {
    font-size: 16px;
  }
}

@media (max-width: 350px) {
  .home .product-grid {
    grid-template-columns: 1fr;
  }

  .home .csb-card-price {
    max-width: none;
  }
}
