/* ==========================================================================
   TRAILGUARD TOPPERS – layout & alignment fixes + product grids
   Loaded after every other stylesheet on every page.
   ========================================================================== */

/* ---------- 0. Global safety ------------------------------------------------ */
html, body { max-width: 100%; }
body { overflow-x: clip; }

/* Elementor entrance animations never run in this static build, so anything
   flagged "invisible" stayed hidden (headings, animated letters, etc.). */
.elementor-invisible { visibility: visible !important; opacity: 1 !important; animation: none !important; }
[data-plugin-animated-letters] { opacity: 1 !important; visibility: visible !important; }

/* ---------- 1. Header: stop the right-hand group overflowing the row ---------- */
header .e-con-inner > .e-con-boxed.e-child {
  flex: 1 1 0%;
  width: auto !important;
  min-width: 0;
  max-width: 100%;
}
header .e-con-boxed.e-child > .e-con-inner { width: 100%; max-width: 100%; }
header .elementor-widget-porto_hb_search_form { flex: 1 1 auto; min-width: 0; }

/* Mini-cart: the theme's off-canvas drawer is parked just outside the viewport
   (translateX(105%)), which used to create a sideways scrollbar. body{overflow-x:clip}
   above contains it; here we only style the contents we now render into it. */
.minicart-offcanvas .cart-popup { background: #fff; color: #222; }
.minicart-offcanvas .widget_shopping_cart_content { padding: 56px 22px 22px; text-align: left; }
.atc-mini-count { display: block; margin: 0 0 14px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; }
.atc-mini-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #e5e7eb; }
.atc-mini-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: 0 0 64px; }
.atc-mini-item a { font-size: 14px; font-weight: 600; line-height: 1.35; color: #1d2024; text-decoration: none; }
.atc-mini-item small { display: block; margin-top: 2px; font-size: 13px; color: #6b7280; }
.atc-mini-total { display: flex; justify-content: space-between; margin: 16px 0; font-size: 16px; font-weight: 700; }
.atc-mini-actions { display: flex; flex-direction: column; gap: 10px; }
.atc-mini-actions a { display: block; padding: 12px; border-radius: 6px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; background: #fff; color: #1d2024; border: 1px solid #1d2024; }
.atc-mini-actions a.primary { background: #1d2024; color: #fff; }
.atc-mini-empty { margin: 0 0 16px; color: #555; }

/* ---------- 2. About page: one consistent centred reading column ------------ */
.elementor-8553 { --atc-col: 980px; }

.elementor-8553 > .e-con {
  position: relative !important;
  left: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 18px 0 !important;
  --padding-inline-start: 0px;
  --padding-inline-end: 0px;
}
.elementor-8553 .e-con > .e-con-inner {
  width: 100%;
  max-width: var(--atc-col) !important;
  margin: 0 auto !important;
  padding: 0 20px !important;
  box-sizing: border-box;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 18px !important;
}
.elementor-8553 .e-con .e-con {
  position: static !important;
  left: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.elementor-8553 .e-con .e-con > .e-con-inner { padding: 0 !important; max-width: 100% !important; }
.elementor-8553 .elementor-widget { width: 100%; max-width: 100%; }

/* in-page "Home › About Us" duplicates the theme breadcrumb above it */
.elementor-8553 > .e-con:first-child .elementor-widget-text-editor { display: none; }

/* text: everything left-aligned, same size & rhythm in every block */
.elementor-8553 .porto-u-heading,
.elementor-8553 .porto-u-main-heading,
.elementor-8553 .porto-u-sub-heading,
.elementor-8553 .elementor-widget-container { text-align: left !important; }
.elementor-8553 p,
.elementor-8553 li,
.elementor-8553 blockquote { text-align: left !important; font-size: 16px; line-height: 1.75; color: #3b3f45; }
.elementor-8553 p { margin: 0 0 1em; }
.elementor-8553 ul { margin: 0 0 1.2em; padding-left: 1.4em; }
.elementor-8553 li { margin: 0 0 .35em; }
.elementor-8553 p:empty { display: none; }

.elementor-8553 h2 {
  text-align: left !important;
  margin: 0 0 .55em;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  color: #1d2024;
}
.elementor-8553 .porto-u-sub-heading > h2 { font-size: 22px; font-weight: 600; color: #333; margin-top: .2em; }
.elementor-8553 .elementor-widget-heading:first-child h2.elementor-heading-title { font-size: 38px; margin-bottom: .3em; }

.elementor-8553 blockquote {
  margin: 0 0 1.2em;
  padding: 14px 20px;
  border-left: 4px solid #0a0a5c;
  background: #f6f7f9;
  border-radius: 0 8px 8px 0;
}
.elementor-8553 blockquote p:last-child { margin-bottom: 0; }

.elementor-8553 .elementor-widget-image img {
  display: block;
  margin: 6px auto;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}
/* two images in a row sit side-by-side instead of stacking at full width */
.elementor-8553 .e-con-inner:has(> .e-con-full:first-child .elementor-widget-image):has(> .e-con-full:last-child .elementor-widget-image) {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 18px !important;
}

/* the Google-reviews widget has no data offline and only leaves a blank gap */
.elementor-8553 .elementor-widget-shortcode:has(.ti-widget) { display: none; }

/* buttons get breathing room so they never touch the next heading */
.elementor-8553 .elementor-widget-porto_button,
.elementor-8553 .elementor-widget-button { margin: 6px 0 30px; }
.elementor-8553 .elementor-widget-heading h2.elementor-heading-title { margin-top: 8px; }

/* table of contents: compact box, two columns */
.elementor-8553 #ez-toc-container {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 0 28px;
  padding: 16px 22px;
  border-radius: 10px;
}
.elementor-8553 #ez-toc-container nav > ul { columns: 2; column-gap: 32px; margin: 8px 0 0; padding: 0; list-style: none; }
.elementor-8553 #ez-toc-container li { break-inside: avoid; font-size: 14px; margin: 0 0 4px; }
.elementor-8553 #ez-toc-container li ul { padding-left: 14px; margin: 2px 0 0; list-style: none; }
.elementor-8553 #ez-toc-container a { font-size: 14px; line-height: 1.5; }
.elementor-8553 .ez-toc-title { font-size: 17px !important; font-weight: 700; margin: 0; }

@media (max-width: 767px) {
  .elementor-8553 #ez-toc-container nav > ul { columns: 1; }
  .elementor-8553 .e-con-inner:has(> .e-con-full:first-child .elementor-widget-image):has(> .e-con-full:last-child .elementor-widget-image) { grid-template-columns: 1fr; }
  .elementor-8553 h2 { font-size: 24px; }
  .elementor-8553 .elementor-widget-heading:first-child h2.elementor-heading-title { font-size: 30px; }
}

/* ---------- 3. Home page ---------------------------------------------------- */
@media (max-width: 1255px) {
  body.home .elementor-2 > .e-con-boxed > .e-con-inner { padding-left: 20px; padding-right: 20px; box-sizing: border-box; }
}

/* category tiles: uniform, evenly spaced grid */
body.home .woocommerce ul.products.is-shortcode {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
}
body.home .woocommerce ul.products.is-shortcode > li.product-category {
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}
body.home li.product-category > a { display: block; height: 100%; text-align: center; text-decoration: none; }
body.home li.product-category .thumb-info { display: flex; flex-direction: column; height: 100%; }
body.home li.product-category .thumb-info-wrapper {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6f7f9;
  border-radius: 10px;
  overflow: hidden;
}
body.home li.product-category .thumb-info-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
body.home li.product-category .thumb-info-wrap { padding: 12px 6px 0; text-align: center; }
body.home li.product-category .thumb-info-title,
body.home li.product-category .thumb-info-inner { text-align: center; }

/* home text blocks: keep copy aligned the same way as its heading */
body.home .elementor-2 .porto-u-heading,
body.home .elementor-2 .porto-u-main-heading,
body.home .elementor-2 .porto-u-sub-heading { text-align: left; }
body.home .elementor-2 .elementor-element-e783a30 .porto-u-heading,
body.home .elementor-2 .elementor-element-e783a30 .porto-u-main-heading,
body.home .elementor-2 .elementor-element-e783a30 .porto-u-sub-heading,
body.home .elementor-2 .elementor-element-e783a30 p { text-align: left !important; }
body.home .elementor-2 .elementor-element-8759521 .porto-u-heading,
body.home .elementor-2 .elementor-element-8759521 .porto-u-main-heading,
body.home .elementor-2 .elementor-element-8759521 .porto-u-sub-heading { text-align: center; }
body.home .elementor-2 .elementor-element-8759521 ul { display: inline-block; text-align: left; padding-left: 1.2em; }
body.home .elementor-2 .elementor-element-8759521 ul li { text-align: left; }
body.home .elementor-2 .e-parent > .e-con-inner > .e-con-full > .elementor-widget { max-width: 100%; }

/* section headings with a divider underneath */
body.home .elementor-widget-heading .elementor-heading-title { text-align: left; }

/* ---------- 4. Shared product cards (home + related products) --------------- */
.atc-section { padding: 8px 0 40px; }
.atc-section .atc-inner { max-width: 1256px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.atc-section.atc-in-container { padding-top: 32px; clear: both; }
.atc-section.atc-in-container .atc-inner { padding: 0; max-width: none; }
.atc-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e5e7eb; position: relative; }
.atc-section-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px; background: #0a0a5c; }
.atc-section-title { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 700; color: #1d2024; }
.atc-section-link { font-size: 14px; font-weight: 600; color: #0a0a5c; text-decoration: none; white-space: nowrap; }
.atc-section-link:hover { text-decoration: underline; }

.atc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.atc-grid.atc-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.atc-grid.atc-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.atc-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; overflow: hidden; transition: box-shadow .2s ease, transform .2s ease; }
.atc-card:hover { box-shadow: 0 10px 26px rgba(15, 23, 42, .12); transform: translateY(-2px); }
.atc-card-img { display: block; aspect-ratio: 4 / 3; background: #f3f4f6; overflow: hidden; }
.atc-card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.atc-card-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; gap: 6px; }
.atc-card-cat { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atc-card-title { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 600; min-height: 2.8em; }
.atc-card-title a { color: #1d2024; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.atc-card-title a:hover { color: #0a0a5c; }
.atc-card-price { font-size: 17px; font-weight: 700; color: #0a0a5c; margin-top: auto; padding-top: 4px; }
.atc-card-btn { margin-top: 8px; display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: #1d2024; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: center; cursor: pointer; transition: background .2s ease; }
.atc-card-btn:hover { background: #0a0a5c; }
.atc-card-btn.is-added { background: #15803d; }

/* compact horizontal card for the narrow "We Suggest / Customer Favorites" columns */
.atc-list { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 0; padding: 0; list-style: none; }
.atc-list .atc-card { flex-direction: row; align-items: stretch; }
.atc-list .atc-card-img { width: 120px; flex: 0 0 120px; aspect-ratio: auto; min-height: 96px; }
.atc-list .atc-card-body { padding: 10px 12px; gap: 3px; justify-content: center; }
.atc-list .atc-card-title { min-height: 0; font-size: 14px; }
.atc-list .atc-card-btn { display: none; }
.atc-list .atc-card-price { padding-top: 0; margin-top: 2px; font-size: 15px; }

.atc-home-block { margin: 0; padding: 8px 0 24px; }
.atc-home-block .atc-inner { padding-top: 0; }

.atc-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1d2024; color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 99999; }
.atc-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .atc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.home .woocommerce ul.products.is-shortcode { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .atc-grid, .atc-grid.atc-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  body.home .woocommerce ul.products.is-shortcode { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .atc-section-title { font-size: 20px; }
  .atc-card-body { padding: 10px 12px 12px; }
}

/* ---------- 5. Product page: tidy the description block --------------------- */
.static-product-runtime .static-description h3 { font-size: 18px; margin: 18px 0 8px; font-weight: 700; }
.static-product-runtime .static-description p { margin: 0 0 .6em; line-height: 1.6; }
.static-product-runtime .static-description table { width: 100%; border-collapse: collapse; margin: 0 0 12px; }
.static-product-runtime .static-description th,
.static-product-runtime .static-description td { text-align: left; padding: 6px 10px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }

/* ---------- 6. Home spacing polish ----------------------------------------- */
body.home .elementor-element-a238e80 { width: calc(100% - 40px) !important; max-width: 1216px; margin-left: auto !important; margin-right: auto !important; }
body.home .elementor-element-a3bbdff { padding-bottom: 32px; }
body.home .elementor-element-2a2eac9 > .e-con-inner,
body.home .elementor-element-e783a30 > .e-con-inner { gap: 40px !important; align-items: flex-start; }
body.home .elementor-element-2a2eac9 .elementor-widget-image img,
body.home .elementor-element-e783a30 .elementor-widget-image img { border-radius: 10px; }
body.home .elementor-element-386f235 { padding-bottom: 12px; }
body.home .atc-home-block { padding: 12px 0 36px; }
body.home .elementor-element-fbd01c9 .atc-card-cat,
body.home .elementor-element-7b84b91 .atc-card-cat { max-width: 100%; }
body.home .elementor-element-fbd01c9 .atc-card-body,
body.home .elementor-element-7b84b91 .atc-card-body { min-width: 0; }

/* toast with link */
.atc-toast a { color: #ffb37a; font-weight: 700; margin-left: 10px; text-decoration: underline; }
.atc-toast.show { pointer-events: auto; }

/* ==========================================================================
   Instant search popup + vehicle fit finder (assets/js/site-search.js)
   ========================================================================== */
.live-search-list { display: none !important; }   /* the theme's server-side live search; replaced by .atc-search-pop */
.atc-search-pop { position: absolute; z-index: 100000; background: #fff; border: 1px solid #e3e5e8; border-radius: 10px; box-shadow: 0 14px 40px rgba(10, 10, 40, .18); max-height: min(70vh, 560px); overflow-y: auto; text-align: left; font-size: 14px; }
.atc-search-pop[hidden] { display: none; }
.atc-sp-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: #1c2230; text-decoration: none; border-bottom: 1px solid #f0f1f3; }
.atc-sp-item:hover, .atc-sp-item.on { background: #f3f5fb; color: #1c2230; }
.atc-sp-item img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; background: #f3f4f6; }
.atc-sp-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.atc-sp-name { font-weight: 600; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.atc-sp-name mark { background: #fff1b8; color: inherit; padding: 0 1px; border-radius: 2px; }
.atc-sp-cat { font-size: 12px; color: #6b7280; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atc-sp-price { font-weight: 700; color: #0a0a5c; white-space: nowrap; flex: 0 0 auto; }
.atc-sp-all { display: block; padding: 12px; text-align: center; font-weight: 700; color: #0a0a5c; text-decoration: none; background: #f8f9fb; position: sticky; bottom: 0; }
.atc-sp-all:hover { text-decoration: underline; }
.atc-sp-empty { padding: 18px 16px; color: #555; text-align: center; line-height: 1.6; }
.atc-sp-empty a { font-weight: 600; color: #0a0a5c; }

/* fit finder: four equal selects + button, no clipped placeholders */
.porto_products_filter_form { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: stretch; width: 100%; }
.porto_products_filter_form select { width: 100% !important; min-width: 0 !important; max-width: 100% !important; text-overflow: ellipsis; padding-left: 14px; padding-right: 30px; }
.porto_products_filter_form .btn-submit { white-space: nowrap; margin: 0; }
@media (max-width: 991px) { .porto_products_filter_form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .porto_products_filter_form .btn-submit { grid-column: 1 / -1; } }
@media (max-width: 480px) { .porto_products_filter_form { grid-template-columns: 1fr; } }

.atc-fit-results { margin-top: 18px; padding: 16px; background: #f6f7fb; border: 1px solid #e3e6f0; border-radius: 12px; text-align: left; }
.atc-fit-results[hidden] { display: none; }
.atc-fr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-bottom: 12px; color: #1c2230; }
.atc-fr-all, .atc-fr-more { margin-left: auto; font-weight: 700; color: #0a0a5c; text-decoration: none; }
.atc-fr-more { display: block; margin: 12px 0 0; text-align: center; }
.atc-fr-all:hover, .atc-fr-more:hover { text-decoration: underline; }
.atc-fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.atc-fr-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #fff; border: 1px solid #e6e8ee; border-radius: 10px; text-decoration: none; color: #1c2230; transition: box-shadow .15s, transform .15s; }
.atc-fr-card:hover { box-shadow: 0 8px 22px rgba(10, 10, 40, .12); transform: translateY(-2px); color: #1c2230; }
.atc-fr-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: #f3f4f6; }
.atc-fr-name { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.atc-fr-price { font-weight: 700; color: #0a0a5c; margin-top: auto; }
.atc-fr-empty { margin: 0; color: #555; }
.atc-fr-empty a { font-weight: 600; color: #0a0a5c; }

/* Home "Tell Us About Your Truck" card: on phones/tablets it was pulled up (negative margin)
   under the section above, hiding the top of its heading. Keep it fully visible. */
@media (max-width: 991px) {
  body.home .elementor-element-a238e80 {
    margin-top: 16px !important;
    position: relative;
    z-index: 5;
    overflow: visible;
  }
  body.home .elementor-element-a238e80 .elementor-heading-title { overflow: visible; }
}
@media (max-width: 767px) {
  body.home .elementor-element-a238e80 {
    width: calc(100% - 24px) !important;
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px;
  }
  body.home .elementor-element-45d3d30,
  body.home .elementor-element-e3d223e { width: 100% !important; max-width: 100% !important; }
}

/* "Share this post" areas removed site-wide (safety net for any dynamically inserted copy) */
.page-share, .post-share, .elementor-widget-porto_single_sharen { display: none !important; }
