/*
 * Landing polish - heavy-duty category landing pages (templates/heavy-duty-parts-for-sale-first-level.php)
 * LOOK & FEEL ONLY. No behaviour, link, form field or markup order is changed by this file.
 * Typography: the font FAMILY is inherited from the site; this file only sets size / weight / spacing / hierarchy.
 *
 * Scope: only two components are restyled, so the banner-layout pages (attachments, undercarriage, GET) that reuse
 * the same class names for their filter checkboxes are left untouched:
 *   HERO  = .landing-page-manufacturer-section that contains .landing-page-heading
 *   BRAND = .landing-page-manufacturer-section that contains the brand tiles (a.landing-page-buttons)
 * Browsers without :has() simply keep the previous look.
 */
:root {
  --lp-blue: #0057B8;
  --lp-blue-dark: #00418A;
  --lp-navy: #0A2540;
  --lp-ink: #1F2D3D;
  --lp-muted: #5A6472;
  --lp-line: #D8E0EA;
  --lp-soft: #F4F7FB;
  --lp-tint: #E8F0FB;
  --lp-radius: 12px;
  --lp-shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 8px 24px rgba(10, 37, 64, .07);
}

/* ---------- cards ---------- */
.landing-page-manufacturer-section:has(.landing-page-heading),
.landing-page-manufacturer-section:has(a.landing-page-buttons) {
  background: #fff;
  border: 1px solid var(--lp-line);
  border-radius: 16px;
  box-shadow: var(--lp-shadow);
  padding-left: 32px;
  padding-right: 32px;
}
.landing-page-manufacturer-section.py-4:has(.landing-page-heading) {
  padding-top: 32px !important;
  padding-bottom: 32px !important;
}
/* hero layout: text + image share the card evenly (no dead space between them), image gets real presence */
.landing-page-manufacturer-section.row:has(.landing-page-heading) {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 4.5vw, 80px);
  align-items: center;
  --bs-gutter-x: 0;
}
.landing-page-manufacturer-section.row:has(.landing-page-heading) > [class*="col-"] {
  width: auto;
  max-width: none;
  flex: initial;
  margin: 0;
  padding: 0;
}
.landing-page-manufacturer-section.row:has(.landing-page-heading):not(:has(.heavy-duty-featured-image)) { grid-template-columns: minmax(0, 1fr); }

/* ---------- hero typography: clear hierarchy ---------- */
/* same scale as /about-us/ and the homepage: blue 700 section title, navy 600 sub-heading, no extra tracking */
.landing-page-manufacturer-section .landing-page-heading {
  font-size: clamp(1.75rem, 1.2rem + 1.5vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0;
  color: var(--lp-blue);
  margin: 0 0 10px;
  text-wrap: balance;
}
.landing-page-manufacturer-section .landing-page-heading-2 {
  position: relative;
  font-size: clamp(1rem, .9rem + .5vw, 1.375rem);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--lp-navy);
  margin: 0 0 22px !important;
  padding-bottom: 16px;
  text-wrap: balance;
}
.landing-page-manufacturer-section .landing-page-heading-2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--lp-blue);
}
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description {
  font-size: 18px;
  line-height: 1.5;
  color: #000;
  max-width: 74ch;
}
/* every paragraph uses the same 18px / 400 / black as the about page lists (24px line height) */
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p { line-height: 24px; }
/* paragraphs that carry the phone / e-mail = one contact callout */
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p:has(a[href^="tel:"]),
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p:has(a[href^="mailto:"]) {
  padding: 12px 16px;
  background: #F4F8FD;
  border: 1px solid #D6E4F7;
  border-left: 4px solid var(--lp-blue);
  border-radius: 8px;
}
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p:has(a[href^="tel:"]) + p:has(a[href^="mailto:"]) {
  margin-top: -12px;
  border-top-color: transparent;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p:has(a[href^="tel:"]):has(+ p a[href^="mailto:"]) {
  margin-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
/* manufacturer pages whose hero image is intentionally not shown: let the text use the full card width */
.landing-page-manufacturer-section:has(.landing-page-heading):not(:has(.heavy-duty-featured-image)) > .col-md-8 { flex: 0 0 100%; max-width: 100%; }
.landing-page-manufacturer-section:has(.landing-page-heading):not(:has(.heavy-duty-featured-image)) .landing-page-description { max-width: 88ch; }
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p { margin: 0 0 12px; padding: 0; }
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description p:last-child { margin-bottom: 0; }
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description strong { color: #000; font-weight: 700; }
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description a { font-weight: 700; text-decoration: none; }
.landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description a:hover { text-decoration: underline; }

/* ---------- call-to-action row ---------- */
.landing-page-manufacturer-section:has(.landing-page-heading) .et_pb_button_module_wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin: 8px 0 0 !important;
}
.landing-page-manufacturer-section .primary-btn-home-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  min-width: 190px;
  margin: 0 !important;
  padding: 0 28px;
  border: 1px solid var(--lp-blue);
  border-radius: 8px;
  background: var(--lp-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 87, 184, .25);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.landing-page-manufacturer-section .primary-btn-home-banner:hover,
.landing-page-manufacturer-section .primary-btn-home-banner:focus {
  background: var(--lp-blue-dark);
  border-color: var(--lp-blue-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 87, 184, .28);
}
.landing-page-manufacturer-section .or-text {
  margin: 0 2px !important;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--lp-muted);
}
.landing-page-manufacturer-section .phone-cta,
.landing-page-manufacturer-section .email-cta,
.landing-page-manufacturer-section .chat-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 16px 0 9px;
  border: 1px solid var(--lp-line);
  border-radius: 8px;
  background: #fff;
  color: var(--lp-navy);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.landing-page-manufacturer-section .phone-cta i,
.landing-page-manufacturer-section .email-cta i,
.landing-page-manufacturer-section .chat-cta i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 !important;
  border-radius: 8px;
  background: var(--lp-tint);
  color: var(--lp-blue);
  font-size: 13px;
}
.landing-page-manufacturer-section .phone-cta:hover,
.landing-page-manufacturer-section .email-cta:hover,
.landing-page-manufacturer-section .chat-cta:hover {
  border-color: var(--lp-blue);
  background: #F4F8FD;
  color: var(--lp-blue);
}
.landing-page-manufacturer-section .primary-btn-home-banner:focus-visible,
.landing-page-manufacturer-section .phone-cta:focus-visible,
.landing-page-manufacturer-section .email-cta:focus-visible,
.landing-page-manufacturer-section .chat-cta:focus-visible,
.landing-page-manufacturer-section a.landing-page-buttons:focus-visible {
  outline: 3px solid rgba(0, 87, 184, .35);
  outline-offset: 2px;
}

/* ---------- hero image card ---------- */
.landing-page-manufacturer-section .heavy-duty-featured-image {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(260px, 26vw, 440px);
  padding: clamp(16px, 2vw, 28px);
  background: #fff;
  border: 1px solid var(--lp-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(10, 37, 64, .05), 0 10px 30px rgba(10, 37, 64, .06) !important;
}
.landing-page-manufacturer-section .heavy-duty-featured-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: clamp(240px, 27vw, 440px);
  object-fit: contain;
  border-radius: 8px;
}

/* ---------- "Select Manufacturer" header ---------- */
.landing-page-manufacturer-section:has(a.landing-page-buttons) .landing-page-main-title {
  font-size: clamp(1.25rem, 1rem + .9vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--lp-blue);
  white-space: nowrap;
}
.landing-page-manufacturer-section:has(a.landing-page-buttons) .filter_line_border {
  height: 1px !important;
  background: var(--lp-line) !important;
}
.landing-page-manufacturer-section:has(a.landing-page-buttons) .landing-page-filter-title-section > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  --bs-gutter-x: 0;
}
.landing-page-manufacturer-section:has(a.landing-page-buttons) .landing-page-filter-title-section > .row > * { padding-left: 0; }

/* ---------- manufacturer tiles: one even grid ---------- */
.landing-page-filter-data-section.row:has(a.landing-page-buttons) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 16px;
  margin: 22px 0 0 !important;
  --bs-gutter-x: 0;
}
.landing-page-filter-data-section.row:has(a.landing-page-buttons) > * {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  flex: initial;
}
.landing-page-filter-data-section:has(a.landing-page-buttons) .manufacturer-items { display: flex; }
.landing-page-filter-data-section:has(a.landing-page-buttons) .manufacturer-items.hiddendiv { display: none; }
.landing-page-filter-data-section:has(a.landing-page-buttons) #view_more,
.landing-page-filter-data-section:has(a.landing-page-buttons) #view_less { grid-column: 1 / -1; margin-top: 4px; }
.landing-page-filter-data-section:has(a.landing-page-buttons) .manufacturer-items .btn-group { display: flex; width: 100%; }

.landing-page-filter-data-section .manufacturer-items a.landing-page-buttons.btn {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--lp-line) !important;
  border-radius: var(--lp-radius);
  background: #fff;
  overflow: hidden;
  box-shadow: none !important;
  text-align: center;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.landing-page-filter-data-section .manufacturer-items a.landing-page-buttons.btn:hover,
.landing-page-filter-data-section .manufacturer-items a.landing-page-buttons.btn:focus {
  background: #fff;
  color: var(--lp-blue);
  border-color: var(--lp-blue) !important;
  box-shadow: 0 8px 20px rgba(0, 87, 184, .14) !important;
  transform: translateY(-2px);
}
a.landing-page-buttons .et_shop_image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 104px;
  padding: 14px 18px;
  background: #fff; /* white photos (category tiles) blend in */
}
/* brand-logo tiles: same grey as the logo image files, so the logo blends into the tile */
a.landing-page-buttons .et_shop_image:has(img[src*="/brand-logos/"]),
a.landing-page-buttons .et_shop_image.lp-noimg { background: #E8E8E8; }
a.landing-page-buttons .et_shop_image img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 74px;
  object-fit: contain;
  border-radius: 0;
}
a.landing-page-buttons .et_overlay { display: none !important; }
.landing-page-filter-data-section .manufacturer-items .btn-light:hover img { background-color: transparent !important; }

/* tile without a logo (restricted brand, or a logo that failed to load): neutral icon, same tile size */
a.landing-page-buttons .et_shop_image.lp-noimg img { display: none; }
a.landing-page-buttons .et_shop_image.lp-noimg::before {
  content: "\f013";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  color: #9AA9BD;
}

a.landing-page-buttons h6 {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 46px;
  margin: 0;
  padding: 12px 10px;
  border-top: 1px solid var(--lp-line);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--lp-navy);
}
a.landing-page-buttons:hover h6 { color: var(--lp-blue); }

/* ---------- Load More ---------- */
.landing-page-filter-data-section:has(a.landing-page-buttons) #view_more p,
.landing-page-filter-data-section:has(a.landing-page-buttons) #view_less p {
  display: inline-block;
  margin: 0;
  padding: 8px 22px 2px;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--lp-blue);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.landing-page-filter-data-section:has(a.landing-page-buttons) #view_more p:hover,
.landing-page-filter-data-section:has(a.landing-page-buttons) #view_less p:hover { border-color: var(--lp-blue); background: #F4F8FD; }

/* ---------- quote band ("Didn't find what you were looking for?") ---------- */
.et_pb_section_11 .et_pb_row_12 .et_pb_column_4_4 { width: 100%; }
/* heading and "GET QUOTE IN MINUTES" keep the site's own size / weight / colour (same as the other pages) */
.et_pb_section_11 h2.white-text {
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}
.et_pb_section_11 .form-wrapper .form-control,
.et_pb_section_11 .form-wrapper .form-select {
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--lp-line);
  border-radius: 8px;
  color: var(--lp-ink);
  font-size: 15px;
  box-shadow: none;
}
.et_pb_section_11 .form-wrapper textarea.form-control {
  height: auto;
  min-height: 96px;
  padding: 12px 14px;
}
.et_pb_section_11 .form-wrapper .form-control:focus,
.et_pb_section_11 .form-wrapper .form-select:focus {
  border-color: var(--lp-blue);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, .18);
  outline: 0;
}
.et_pb_section_11 .form-wrapper .primary-btn {
  min-width: 220px;
  height: 48px;
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: .08em;
}

/* ---------- responsive ---------- */
@media (max-width: 991.98px) {
  .landing-page-manufacturer-section.row:has(.landing-page-heading) { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .landing-page-manufacturer-section .heavy-duty-featured-image { min-height: 0; }
}
@media (max-width: 767.98px) {
  .landing-page-manufacturer-section:has(.landing-page-heading),
  .landing-page-manufacturer-section:has(a.landing-page-buttons) { padding-left: 18px; padding-right: 18px; }
  .landing-page-manufacturer-section.py-4:has(.landing-page-heading) { padding-top: 22px !important; padding-bottom: 22px !important; }
  .landing-page-manufacturer-section:has(.landing-page-heading) .landing-page-description { font-size: 17px; max-width: none; }
  .landing-page-filter-data-section.row:has(a.landing-page-buttons) { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
  a.landing-page-buttons .et_shop_image { height: 92px; }
}
@media (max-width: 575.98px) {
  .landing-page-manufacturer-section .primary-btn-home-banner { width: 100%; }
  .landing-page-manufacturer-section .or-text { display: none; }
  .landing-page-manufacturer-section .phone-cta,
  .landing-page-manufacturer-section .email-cta,
  .landing-page-manufacturer-section .chat-cta { flex: 1 1 calc(50% - 8px); justify-content: center; }
  .landing-page-manufacturer-section:has(a.landing-page-buttons) .landing-page-main-title { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-page-manufacturer-section .primary-btn-home-banner,
  .landing-page-filter-data-section .manufacturer-items a.landing-page-buttons.btn { transition: none; transform: none !important; }
}
