/* Scoped to the homepage Top Searched Parts collection. */
/* Collapse the Site Builder text block used only to load this stylesheet. */
#main .ms-text-block:has(link[href*="/binary/MAdiFq"]) {
  display: none !important;
}
html.ordertree-homepage #main {
  margin-top: 0 !important;
  padding-top: 2px !important;
}
#main .default-container:has(.ordertree-hero-band),
#main .row:has(.ordertree-hero-band),
#main .col-12:has(> .ordertree-hero-band),
#main .ordertree-hero-band {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
@media (max-width: 767px) {
  .ordertree-top-parts .msc-ss-carousel .msc-ss-carousel-strip {
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
    scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .ordertree-top-parts .msc-ss-carousel-strip::-webkit-scrollbar { display: none; }
  .ordertree-top-parts .msc-ss-carousel .msc-ss-carousel-slide {
    display: flex; width: 100% !important; left: 0 !important;
    transform: none !important; margin: 0; padding: 0;
  }
  .ordertree-top-parts .msc-ss-carousel-slide > .msc-ss-carousel-item {
    flex: 0 0 100% !important; width: 100% !important; min-width: 0;
    scroll-snap-align: start; scroll-snap-stop: always;
  }
}
/* Paint the side gutters without widening the hero or the page's scroll area. */
.ordertree-hero-band {
  position: relative;
}
.ordertree-hero-band .ms-content-block__image img {
  box-sizing: border-box;
  border: 1px solid #e6e6e6;
}
@media (max-width: 767px) {
  .ordertree-hero-band .msc-carousel__control__prev,
  .ordertree-hero-band .msc-carousel__control__next,
  .ordertree-hero-band .msc-carousel__indicators { display: none !important; }
  .ordertree-hero-band .msc-carousel__inner { touch-action: pan-y pinch-zoom; }
}
.ordertree-hero-band .msc-carousel__control__prev,
.ordertree-hero-band .msc-carousel__control__next {
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #555;
  box-shadow: 0 .6px 1.8px rgba(0,0,0,.1), 0 3.2px 7.2px rgba(0,0,0,.13);
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  top: 50%;
  margin-top: 0;
  transform: translateY(-50%);
}
.ordertree-hero-band .msc-carousel__control__prev__icon,
.ordertree-hero-band .msc-carousel__control__next__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  line-height: 1;
}
.ordertree-hero-band .msc-carousel__control__prev__icon::before,
.ordertree-hero-band .msc-carousel__control__next__icon::before {
  font-size: 60px;
  line-height: 1;
  color: #555;
  -webkit-text-fill-color: #555;
}
.ordertree-hero-band .msc-carousel__control__prev:focus-visible,
.ordertree-hero-band .msc-carousel__control__next:focus-visible {
  outline: 2px solid #555;
  outline-offset: 3px;
}
@media (hover: hover) {
  .ordertree-hero-band .msc-carousel__control__prev:hover,
  .ordertree-hero-band .msc-carousel__control__next:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 4px 10px rgba(0,0,0,.18);
  }
}
/* Extend the banner background without changing image dimensions. */
.ordertree-hero-band::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: 0 0 0 100vmax #d7d9d3;
  clip-path: inset(0 -100vmax);
  pointer-events: none;
}
/* Introductory subheader: two points larger than the original 12pt. */
#main .ordertree-intro p,
#main .ordertree-intro p span { font-size: 14pt !important; }
/* Keep the intro readable and evenly wrapped on narrow phones, including Safari. */
@media (max-width: 767px) {
  #main #text-block,
  #main .ordertree-intro {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  #main .ordertree-intro h2,
  #main .ordertree-intro h2 span {
    font-size: clamp(24px, 7vw, 28px) !important;
    line-height: 1.2;
  }
  #main .ordertree-intro h2 {
    text-wrap: balance;
    text-align: center;
    margin-bottom: 12px;
  }
  #main .ordertree-intro p {
    text-align: left;
    text-wrap: wrap;
    text-wrap: pretty;
    word-break: normal;
    overflow-wrap: normal;
    letter-spacing: normal;
    word-spacing: normal;
  }
  #main .ordertree-intro p,
  #main .ordertree-intro p span {
    font-size: 16px !important;
    line-height: 1.5;
  }
}
.ordertree-search-buttons {
  display: flex; justify-content: center; gap: 16px;
  max-width: 1040px; margin: 0 auto -2px; padding: 0 12px;
}
.ordertree-search-buttons .ordertree-search-button {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex: 1 1 0; min-width: 0; min-height: 92px; padding: 20px 24px;
  box-sizing: border-box; border: 2px solid #6ca644; border-radius: 8px;
  background: #6ca644; color: #fff; text-decoration: none;
  font: 700 22px/1.25 Arial, sans-serif; text-transform: uppercase;
  text-align: center;
}
.ordertree-search-button::before {
  content: ""; --icon-size: 44px; display: block;
  width: var(--icon-size); height: var(--icon-size); flex: 0 0 var(--icon-size);
  background: currentColor;
  -webkit-mask: var(--search-icon) center / contain no-repeat;
  mask: var(--search-icon) center / contain no-repeat;
}
.ordertree-search-button[href$="/findpartsb"] { --search-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.7%22%20stroke-linejoin%3D%22round%22%3E%3Cpolygon%20points%3D%2219.391%2C8.939%2019.807%2C10.255%2021.851%2C10.281%2021.851%2C13.719%2019.807%2C13.745%2019.391%2C15.061%2018.755%2C16.287%2020.181%2C17.750%2017.750%2C20.181%2016.287%2C18.755%2015.061%2C19.391%2013.745%2C19.807%2013.719%2C21.851%2010.281%2C21.851%2010.255%2C19.807%208.939%2C19.391%207.713%2C18.755%206.250%2C20.181%203.819%2C17.750%205.245%2C16.287%204.609%2C15.061%204.193%2C13.745%202.149%2C13.719%202.149%2C10.281%204.193%2C10.255%204.609%2C8.939%205.245%2C7.713%203.819%2C6.250%206.250%2C3.819%207.713%2C5.245%208.939%2C4.609%2010.255%2C4.193%2010.281%2C2.149%2013.719%2C2.149%2013.745%2C4.193%2015.061%2C4.609%2016.287%2C5.245%2017.750%2C3.819%2020.181%2C6.250%2018.755%2C7.713%22%2F%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%223.5%22%2F%3E%3C%2Fsvg%3E"); }
.ordertree-search-button[href$="/modelsearchb"] { --search-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%221.8%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22%2F%3E%3Cpath%20d%3D%22M7%208h10M7%2012h5m1%204%202%202%204-4%22%2F%3E%3C%2Fsvg%3E"); }
.ordertree-search-buttons .ordertree-search-button:hover { background: #568536; border-color: #568536; color: #fff; text-decoration: none; }
.ordertree-search-buttons .ordertree-search-button:focus-visible { outline: 3px solid #466e2b; outline-offset: 3px; }
@media (max-width: 767px) {
  .ordertree-search-buttons { flex-direction: column; gap: 12px; }
  .ordertree-search-buttons .ordertree-search-button {
    font-size: clamp(13px, 4.1vw, 18px); min-height: 80px;
    padding: 18px 8px; gap: 16px; white-space: nowrap;
    justify-content: flex-start;
  }
  .ordertree-search-button::before { --icon-size: 30px; }
  .ordertree-search-button span:not(.ordertree-search-icon) { flex: 0 1 auto; text-align: left; }
}
.ordertree-top-parts-old-title { display: none !important; }
/* Full-width background band around the centered product collection. */
#main .ordertree-parts-row {
  background-color: #f2f2f2 !important;
  box-shadow: 0 0 0 100vmax #f2f2f2;
  clip-path: inset(0 -100vmax);
  padding-top: 32px;
  padding-bottom: 32px;
}
#main .ordertree-parts-row .ordertree-top-parts { margin-bottom: 0; }
.ms-product-collection.ordertree-top-parts {
  border: 1px solid #c7c7c7;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  margin-bottom: 40px;
  background: #fff;
}
.ordertree-top-parts .ms-product-collection__heading {
  text-transform: uppercase;
  display: block;
  margin: 0;
  padding: 18px 22px;
  background: #000;
  color: #fff;
  border-bottom: 1px solid #c7c7c7;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
}
.ordertree-top-parts .msc-ss-carousel { position: relative; padding: 18px 12px 56px; }
.ordertree-top-parts .msc-ss-carousel-item { box-sizing: border-box; padding: 0 6px; margin: 0; }
.ordertree-top-parts .msc-ss-carousel .msc-ss-carousel-slide { gap: 0; }
.ordertree-top-parts .msc-ss-carousel .msc-ss-carousel-item {
  box-sizing: border-box; margin: 0 !important; padding: 0 6px;
}
.ordertree-top-parts .msc-ss-carousel .msc-flipper {
  position: absolute; top: auto; bottom: 8px; left: calc(50% - 46px);
  right: auto; transform: none; margin: 0; width: 40px; height: 36px;
  color: #333; z-index: 1;
}
.ordertree-top-parts .msc-ss-carousel .msc-flipper--next,
.ordertree-top-parts .msc-ss-carousel .msc-ss-carousel__flipper--next { left: calc(50% + 6px); }
.ordertree-top-parts .msc-product {
  display: flex;
  flex-direction: column;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 12px;
  background: #fff;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 100%;
}
.ordertree-top-parts .msc-product:hover { border-color: #466e2b; }
.ordertree-top-parts .msc-product:focus-visible { outline: 2px solid #466e2b; outline-offset: -3px; }
.ordertree-top-parts .msc-product__image {
  height: 190px;
  min-height: 0;
  padding: 0;
  margin: 0 0 12px;
}
.ordertree-top-parts .msc-product__image picture { display: block; height: 100%; }
.ordertree-top-parts .msc-product__image img {
  width: 100%; height: 100%; max-height: 190px; object-fit: contain;
}
.ordertree-top-parts .msc-product__details {
  display: flex; flex-direction: column; gap: 8px;
  padding: 0; margin: 0; min-height: 0;
}
.ordertree-top-parts .msc-product__details .msc-product__title,
.ordertree-top-parts .msc-product__details .msc-product__inventory-label,
.ordertree-top-parts .msc-product__details .msc-price { margin: 0; padding: 0; }
.ordertree-top-parts .msc-product__inventory-label:empty { display: none; }
.ordertree-top-parts .msc-product__details .msc-price { height: auto !important; min-height: 0; }
.ordertree-top-parts .msc-product__details .msc-product__title:last-child { margin-top: 6px; }
@media (max-width: 599px) {
  .ordertree-top-parts .ms-product-collection__heading { font-size: 23px; padding: 16px; }
  .ordertree-top-parts .msc-ss-carousel { padding: 12px 8px 52px; }
}
/* Desktop paddles match the PDP image viewer's circular controls. */
@media (min-width: 992px) {
  .ordertree-top-parts .msc-ss-carousel { padding: 18px 62px; }
  .ordertree-top-parts .msc-ss-carousel .msc-flipper {
    display: flex; align-items: center; justify-content: center;
    top: 50%; bottom: auto; left: 12px; right: auto;
    transform: translateY(-50%);
    width: 40px; height: 40px; padding: 0; border: 0;
    border-radius: 50% !important; background: #fff !important; color: #555;
    box-shadow: 0 .6px 1.8px rgba(0,0,0,.1), 0 3.2px 7.2px rgba(0,0,0,.13) !important;
    cursor: pointer;
    transition: background-color .15s ease, box-shadow .15s ease;
  }
  .ordertree-top-parts .msc-ss-carousel .msc-ss-carousel__flipper--next {
    left: auto; right: 12px;
  }
  .ordertree-top-parts .msc-flipper i,
  .ordertree-top-parts .msc-flipper i::before { color: #555; -webkit-text-fill-color: #555; font-size: 18px; }
  .ordertree-top-parts .msc-flipper:focus-visible { outline: 2px solid #555; outline-offset: 3px; }
}
@media (min-width: 992px) and (hover: hover) {
  .ordertree-top-parts .msc-ss-carousel .msc-flipper:hover {
    background: #f0f0f0 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,.16), 0 4px 10px rgba(0,0,0,.18) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ordertree-top-parts .msc-ss-carousel .msc-flipper { transition: none; }
}

/* OrderTree keeps its original welcome copy and normal heading capitalization. */
#main .ordertree-intro h2 { font-size: 32px; line-height: 1.2; }
#main .ordertree-intro h2,
#main .ordertree-intro h2 span { color: #6ca644 !important; }
#main .ordertree-intro h2 em { font-style: normal; }
#main .ordertree-intro p { line-height: 1.5; }
#main .ordertree-parts-row { margin-top: 0; }

/* The captured OrderTree hero has a separate spacer above it. */
#main .ordertree-hero-spacer { display: none; }
