/* Truck gallery ([fs_truck_gallery], inc/truck-gallery.php)
   Stage is a fixed 3:2 box: its height depends only on its width, never on
   the number or shape of the photos. Colours come from the Elementor kit. */

.fs-tg {
  --fs-tg-letterbox: #fff; /* page background: off-ratio photos sit on it */
  --fs-tg-accent: var(--e-global-color-100efa4, #B81313);
  --fs-tg-dark: var(--e-global-color-3460580, #14191C);
  position: relative;
  scroll-margin-top: 110px; /* clear the sticky header when a description link jumps here */
}

.fs-tg .fs-tg__stage {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 5px;
  background: var(--fs-tg-letterbox);
}

.fs-tg .fs-tg__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.fs-tg .fs-tg__track::-webkit-scrollbar {
  display: none;
}

.fs-tg .fs-tg__track:focus-visible {
  outline: 3px solid var(--fs-tg-accent);
  outline-offset: -3px;
}

.fs-tg .fs-tg__slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.fs-tg .fs-tg__photo,
.fs-tg .fs-tg__video {
  display: block;
  width: 100%;
  height: 100%;
}

.fs-tg .fs-tg__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Video slides: poster fills the frame (no letterbox bars), play button,
   label and title on top. The iframe replaces the link when selected. */
.fs-tg .fs-tg__video {
  position: relative;
  color: #fff;
  background: var(--fs-tg-dark);
}

.fs-tg .fs-tg__poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fs-tg .fs-tg__play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  background: var(--fs-tg-accent);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.fs-tg .fs-tg__play::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -13px 0 0 -8px;
  border-style: solid;
  border-width: 13px 0 13px 22px;
  border-color: transparent transparent transparent #fff;
}

.fs-tg .fs-tg__video:hover .fs-tg__play,
.fs-tg .fs-tg__video:focus-visible .fs-tg__play {
  background: var(--fs-tg-dark);
}

.fs-tg .fs-tg__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--fs-tg-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.fs-tg .fs-tg__caption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 24px 14px 12px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  font-size: 14px;
  line-height: 1.3;
}

.fs-tg .fs-tg__slide--video.is-loaded .fs-tg__video {
  display: none; /* kept in the DOM for the lightbox slideshow */
}

.fs-tg .fs-tg__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

/* Controls */
.fs-tg .fs-tg__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 25, 28, .6);
  color: #fff;
  font-size: 30px;
  line-height: 44px;
  cursor: pointer;
}

.fs-tg .fs-tg__nav:hover,
.fs-tg .fs-tg__nav:focus-visible {
  background: var(--fs-tg-accent);
}

.fs-tg .fs-tg__nav--prev {
  left: 10px;
}

.fs-tg .fs-tg__nav--next {
  right: 10px;
}

.fs-tg .fs-tg__nav[disabled] {
  opacity: .35;
  cursor: default;
}

.fs-tg .fs-tg__counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  margin: 0;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(20, 25, 28, .7);
  color: #fff;
  font-size: 13px;
  line-height: 1.6;
  pointer-events: none;
}

/* When a video is playing, its own controls own the bottom edge. */
.fs-tg.is-playing .fs-tg__counter {
  display: none;
}

/* Thumbnail strip */
.fs-tg .fs-tg__thumbs {
  position: relative; /* thumbnail offsets are measured against the strip */
  display: flex;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0 0 4px;
  overflow-x: auto;
  list-style: none;
  scroll-snap-type: x proximity;
}

.fs-tg .fs-tg__thumbs li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.fs-tg .fs-tg__thumb {
  position: relative;
  display: block;
  width: 108px;
  aspect-ratio: 3 / 2;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--fs-tg-letterbox);
  cursor: pointer;
}

.fs-tg .fs-tg__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fs-tg .fs-tg__thumb[aria-current="true"] {
  border-color: var(--fs-tg-accent);
}

.fs-tg .fs-tg__thumb:focus-visible {
  outline: 2px solid var(--fs-tg-dark);
  outline-offset: 2px;
}

.fs-tg .fs-tg__thumb .fs-tg__badge {
  top: auto;
  bottom: 4px;
  left: 4px;
  padding: 1px 5px;
  font-size: 10px;
}

/* Strip arrows and edge fades: shown only when there is more strip in
   that direction (.has-prev / .has-next, set by truck-gallery.js). */
.fs-tg .fs-tg__strip {
  position: relative;
}

.fs-tg .fs-tg__strip::before,
.fs-tg .fs-tg__strip::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 4px;
  z-index: 1;
  width: 56px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}

.fs-tg .fs-tg__strip::before {
  left: 0;
  background: linear-gradient(to right, var(--fs-tg-letterbox) 30%, transparent);
}

.fs-tg .fs-tg__strip::after {
  right: 0;
  background: linear-gradient(to left, var(--fs-tg-letterbox) 30%, transparent);
}

.fs-tg .fs-tg__strip.has-prev::before,
.fs-tg .fs-tg__strip.has-next::after {
  opacity: 1;
}

.fs-tg .fs-tg__strip-nav {
  display: none;
  position: absolute;
  top: calc(50% + 3px);
  z-index: 2;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 25, 28, .75);
  color: #fff;
  font-family: inherit;
  font-size: 22px;
  line-height: 32px;
  cursor: pointer;
}

.fs-tg .fs-tg__strip-nav--prev {
  left: 2px;
}

.fs-tg .fs-tg__strip-nav--next {
  right: 2px;
}

.fs-tg .fs-tg__strip.has-prev .fs-tg__strip-nav--prev,
.fs-tg .fs-tg__strip.has-next .fs-tg__strip-nav--next {
  display: block;
}

.fs-tg .fs-tg__strip-nav:hover,
.fs-tg .fs-tg__strip-nav:focus {
  background: var(--fs-tg-accent);
  color: #fff;
}

.fs-tg .fs-tg__thumbs {
  scrollbar-width: none;
}

.fs-tg .fs-tg__thumbs::-webkit-scrollbar {
  display: none;
}

/* Print-only blocks: dealer header, featured photo, disclaimer. */
.fs-print-only {
  display: none;
}

/* Mileage and price: family and weight come from the kit's Text and Primary
   globals, set on the widgets themselves. Elementor ignores a widget's own
   typography fields while a global is applied to that group, so the sizes
   live here. */
.fs-truck-mileage .jet-listing-dynamic-field__content {
  font-size: 22px;
}

.fs-truck-mileage {
  margin-bottom: 4px;
}

.fs-truck-price .jet-listing-dynamic-field__content {
  font-size: 28px;
}

.fs-truck-price {
  margin-bottom: 8px;
}

.fs-truck-location {
  margin-bottom: 16px;
}

.fs-w-title .elementor-heading-title {
  margin-bottom: 16px;
}

/* Right-column quick facts ([fs_truck_specline], [fs_truck_stock],
   [fs_truck_keyspecs]). These sit in Shortcode widgets, which Elementor
   gives no font rule, so they would inherit the kit's body font while the
   description, headings and buttons use the Text/Primary globals. Follow
   the Text global instead, and use 600 for values — a real weight in that
   font, unlike the body font, which ships 400 only. */
.fs-truck-specline,
.fs-truck-stock,
.fs-truck-location,
.fs-truck-specs {
  font-family: var(--e-global-typography-text-font-family), sans-serif;
  font-weight: var(--e-global-typography-text-font-weight, 400);
}

.fs-truck-specline,
.fs-truck-stock,
.fs-truck-location {
  margin: 0;
}

.fs-truck-specs {
  margin: 0;
  font-size: .9em;
}

.fs-truck-specs__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(20, 25, 28, .1);
}

.fs-truck-specs dt {
  color: var(--e-global-color-text, #7A7A7A);
}

.fs-truck-specs dd {
  margin: 0;
  color: var(--e-global-color-dea41e4, #191F23);
  font-weight: 600;
  text-align: right;
}

/* The kit styles every <button> and <a> with rules of specificity (0,1,1)
   and (0,2,1) for :hover/:focus: red button backgrounds, 0 borders, the
   Sora link font and red link hover. Pin the gallery's own states so only
   the video badge, play button and active thumbnail carry colour. */
.fs-tg .fs-tg__thumb:hover,
.fs-tg .fs-tg__thumb:focus {
  border-width: 2px;
  border-style: solid;
  border-color: transparent;
  background: var(--fs-tg-letterbox);
}

.fs-tg .fs-tg__thumb[aria-current="true"]:hover,
.fs-tg .fs-tg__thumb[aria-current="true"]:focus {
  border-color: var(--fs-tg-accent);
}

.fs-tg .fs-tg__nav:focus:not(:focus-visible) {
  background: rgba(20, 25, 28, .6);
}

.fs-tg .fs-tg__video,
.fs-tg .fs-tg__video:hover,
.fs-tg .fs-tg__video:focus {
  color: #fff;
  font-family: inherit;
}

.fs-tg .fs-tg__nav {
  font-family: inherit;
}

/* Description and Details share one centred reading column: long prose and
   spec toggles are easier to follow narrow, while the section backgrounds
   still run the full width of the page. Headings sit inside the same
   container, so they line up with the column's left edge. "You may also
   like" keeps the full box width. */
body .elementor-20661 .elementor-element.elementor-element-375335e > .elementor-container,
body .elementor-20661 .elementor-element.elementor-element-73b767f > .elementor-container,
body .elementor-20661 .elementor-element.elementor-element-e84ef05 > .elementor-container {
  max-width: 1000px;
  margin-right: auto;
  margin-left: auto;
}

/* The description widget carried its own 820px cap; fill the column. */
body .elementor-20661 .elementor-element.elementor-element-bd66977 {
  width: 100%;
  max-width: 100%;
}

/* Wide screens: use the column's width for the specs instead of one long
   thin list. Grid, not column-count: column-count flows the rows, so a value
   that wraps (Transmission) pushes everything after it out of line. With
   explicit grid-column/grid-row on every row (set by the shortcode), both
   columns share the same rows, so each row lines up across the pair. Engine
   rows fill column 1, chassis rows column 2. Buttons stay stacked at every
   width. */
@media (min-width: 1400px) {
  /* 55/45 above this width only: the template stays 60/40, so narrower
     screens are untouched. `body` outranks Elementor's own column rule,
     which loads later in the combined stylesheet. */
  body .elementor-20661 .elementor-element.elementor-element-dfd6484 {
    width: 55%;
  }

  body .elementor-20661 .elementor-element.elementor-element-9fe9c0c {
    width: 45%;
  }

  .fs-truck-specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 32px;
  }
}

/* Breadcrumbs above the gallery ([rank_math_breadcrumb] in the template):
   wayfinding, not navigation furniture. Small type, muted links that
   underline only on hover, thin separators, and the current page in darker
   text (Rank Math renders it as a span, not a link). `body` in the link
   selectors outranks the kit's `.elementor-kit-14 a` rule. */
.rank-math-breadcrumb p {
  margin: 0;
  font-family: var(--e-global-typography-text-font-family), sans-serif;
  font-size: 15px;
  font-weight: var(--e-global-typography-text-font-weight, 400);
  line-height: 1.5;
}

body .rank-math-breadcrumb a {
  font-family: inherit;
  color: var(--e-global-color-secondary, #54595F);
  text-decoration: none;
}

body .rank-math-breadcrumb a:hover,
body .rank-math-breadcrumb a:focus {
  color: var(--e-global-color-100efa4, #B81313);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Replace Rank Math's "»" with a thin "›". */
.rank-math-breadcrumb .separator {
  font-size: 0;
}

.rank-math-breadcrumb .separator::after {
  content: "\203A";
  margin: 0 8px;
  color: var(--e-global-color-text, #7A7A7A);
  font-size: 15px;
  opacity: .8;
}

.rank-math-breadcrumb .last {
  color: var(--e-global-color-dea41e4, #191F23);
  font-weight: 500;
}

@media (max-width: 767px) {
  .fs-w-title .elementor-heading-title {
    text-align: left;
  }

  .fs-truck-mileage .jet-listing-dynamic-field__content {
    font-size: 20px;
  }

  .fs-truck-mileage .jet-listing-dynamic-field,
  .fs-truck-price .jet-listing-dynamic-field {
    justify-content: flex-start;
  }

  .rank-math-breadcrumb p {
    font-size: 13px;
  }

  .rank-math-breadcrumb .separator::after {
    margin: 0 6px;
    font-size: 13px;
  }

  .fs-tg .fs-tg__thumb {
    width: 88px;
  }

  .fs-tg .fs-tg__strip-nav {
    width: 28px;
    height: 28px;
    margin-top: -14px;
    font-size: 19px;
    line-height: 28px;
  }

  .fs-tg .fs-tg__stage {
    border-radius: 0;
  }

  .fs-tg .fs-tg__nav {
    width: 36px;
    height: 36px;
    margin-top: -18px;
    font-size: 24px;
    line-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fs-tg .fs-tg__track {
    scroll-behavior: auto;
  }
}


/* ==========================================================================
   Print: a spec sheet for one truck (body.single-trucks)
   Order: dealer header, title, stock, price, mileage, photo, spec line, key
   specs, Details, description, disclaimer. Everything else is hidden.
   ========================================================================== */

@media print {
  @page {
    size: Letter;
    margin: 12mm;
  }

  body.single-trucks,
  body.single-trucks * {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body.single-trucks .fs-print-only {
    display: block;
  }

  /* Chrome and site furniture that does not belong on paper. */
  body.single-trucks header.elementor-location-header,
  body.single-trucks footer.elementor-location-footer,
  body.single-trucks .elementor-element-96ea2ed,          /* breadcrumb section */
  body.single-trucks .elementor-element-c30aa9a,          /* "You may also like" heading */
  body.single-trucks .elementor-element-9d132f2,          /* related trucks grid */
  body.single-trucks .elementor-element-04af211,          /* bottom CTA */
  body.single-trucks .elementor-widget-button,
  body.single-trucks .fs-tg,                              /* gallery: the print photo replaces it */
  body.single-trucks call-us-selector,                    /* 3CX chat */
  body.single-trucks .elementor-toggle-icon {
    display: none !important;
  }

  /* Single column, in reading order. */
  body.single-trucks .elementor-element-349e816 > .elementor-container {
    display: block;
  }

  body.single-trucks .elementor-element-9fe9c0c,
  body.single-trucks .elementor-element-dfd6484 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.single-trucks .elementor-element-9fe9c0c > .elementor-widget-wrap {
    display: flex;
    flex-direction: column;
    padding: 0 !important;
  }

  body.single-trucks .fs-w-title { order: 1; }
  body.single-trucks .fs-truck-price { order: 2; }
  body.single-trucks .fs-truck-mileage { order: 3; }
  body.single-trucks .fs-w-location { order: 4; }
  body.single-trucks .fs-w-printphoto { order: 5; }
  body.single-trucks .fs-w-keyspecs { order: 6; }

  /* Dealer header. */
  body.single-trucks .fs-print-header {
    display: flex !important;
    align-items: center;
    gap: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #000;
    font-size: 10pt;
    line-height: 1.35;
  }

  body.single-trucks .fs-print-header__logo {
    width: auto;
    max-width: 42mm;
    max-height: 14mm;
  }

  /* Truck heading and figures. */
  body.single-trucks .fs-w-title .elementor-heading-title {
    margin: 10px 0 2px;
    font-size: 19pt !important;
    line-height: 1.15;
  }

  body.single-trucks .fs-truck-price .jet-listing-dynamic-field__content {
    font-size: 16pt !important;
    font-weight: 700;
  }

  body.single-trucks .fs-truck-mileage .jet-listing-dynamic-field__content,
  body.single-trucks .fs-truck-location {
    font-size: 11pt !important;
  }

  body.single-trucks .fs-print-photo img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 85mm;
    margin: 8px 0;
  }

  /* Specs: keep every row and toggle whole, and open the Details toggles. */
  body.single-trucks .fs-truck-specs {
    font-size: 10.5pt;
  }

  body.single-trucks .fs-truck-specs__row,
  body.single-trucks .elementor-toggle-item,
  body.single-trucks .elementor-tab-content,
  body.single-trucks .elementor-icon-list-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.single-trucks .elementor-tab-content {
    display: block !important;
    height: auto !important;
    padding: 2px 0 6px !important;
  }

  body.single-trucks .elementor-tab-title {
    padding: 4px 0 !important;
    font-size: 11pt !important;
    font-weight: 700;
  }

  body.single-trucks .elementor-element-e84ef05,
  body.single-trucks .elementor-element-73b767f,
  body.single-trucks .elementor-element-375335e {
    padding: 4px 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }

  body.single-trucks .elementor-element-375335e .elementor-widget-text-editor {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 10.5pt;
  }

  body.single-trucks .elementor-element-8226cb9 .elementor-heading-title,
  body.single-trucks .elementor-element-a478c50 .elementor-heading-title {
    margin: 8px 0 2px;
    font-size: 13pt !important;
  }

  body.single-trucks .fs-print-footer {
    margin-top: 10px;
    padding-top: 6px;
    border-top: 1px solid #000;
    font-size: 9pt;
  }

  body.single-trucks a {
    text-decoration: none;
  }
}
