/*
TM Aircraft Core - Site Styles

Goal: migrate legacy Divi Custom CSS into the plugin so it survives Divi/theme updates.
Includes both legacy selectors (old Divi Code Modules) and plugin selectors.
*/

/* Pagination (legacy) */
.pagination li {
  display: inline-block;
  margin: 0 5px;
}
.pagination li a,
.pagination li span {
  background: #f5f5f5;
  padding: 8px 12px;
  border-radius: 20px;
  color: #333;
  font-weight: bold;
  text-decoration: none;
}
.pagination li .current {
  background-color: #004aad;
  color: #fff;
}

/* Sticky filters button (legacy + plugin) */
@media only screen and (max-width: 768px) {

  /* Compare bar base */
  #tmCompareBar.tm-compare-bar {
    display: block !important; /* prevents JS display:none from killing fade */
    position: fixed;
    left: 0px;
    right: 0px;
    bottom: 0px !important;
    z-index: 2147483646;

    /* fade/slide animation */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 260ms ease, transform 260ms ease;
    will-change: opacity, transform;
  }

  /* Hidden state (used when near footer OR when empty) */
  #tmCompareBar.tm-compare-bar.is-hidden {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
  }

  /* Filters pill base */
  #stickyFiltersBtn,
  #tmStickyFiltersBtn {
    position: fixed !important;
    left: auto !important;
    right: 12px !important;
    bottom: 12px !important;

    margin: 0 !important;
    transform: none !important;

    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;

    width: auto !important;
    max-width: calc(100vw - 24px);
    white-space: nowrap;

    background-color: #004aad;
    color: #fff;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 999px;

    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    line-height: 1;
    z-index: 2147483647;

    /* fade/slide + bottom shift animation */
    opacity: 1;
    transform: translateY(0) !important;
    transition:
      opacity 260ms ease,
      transform 260ms ease,
      bottom 220ms ease,
      background-color 0.3s ease;
    will-change: opacity, transform, bottom;
  }

  /* Filters pill hidden (near footer, etc.) */
  #stickyFiltersBtn.is-hidden,
  #tmStickyFiltersBtn.is-hidden {
    opacity: 0;
    transform: translateY(10px) !important;
    pointer-events: none;
  }

  /* When compare bar is active, lift the Filters pill above it */
  body.tm-compare-active #stickyFiltersBtn,
  body.tm-compare-active #tmStickyFiltersBtn {
    bottom: 78px !important; /* adjust if compare bar is taller */
  }

  #stickyFiltersBtn:hover,
  #tmStickyFiltersBtn:hover {
    background-color: #0056b3;
  }
}

@media only screen and (min-width: 769px) {
  #stickyFiltersBtn,
  #tmStickyFiltersBtn {
    display: none !important;
  }
}




/* Listing cards (legacy + plugin) */
.aircraft-card,
.tm-aircraft-card {
  background: #fff;
  border: 1px solid #ccc;
  padding: 15px;
  border-radius: 8px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  margin-bottom: 30px;
}

.aircraft-card:hover,
.tm-aircraft-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* Desktop filter button (legacy + plugin) */
.filters-toggle,
.tm-filters-toggle {
  display: inline-block;

}

.filters-toggle,
.tm-filters-toggle {
  display: block;
  width: fit-content;   /* supported in modern browsers */
  margin-left: auto;
  margin-right: auto;
}


.filters-toggle:hover,
.tm-filters-toggle:hover {
  background-color: #0056b3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  text-decoration: underline;
}

.apply-filters-button,
.tm-apply-filters {
  padding: 10px 20px;
  font-weight: bold;
  background: #004aad;
  color: #fff;
  border: none;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.apply-filters-button:hover,
.tm-apply-filters:hover {
  background-color: #0056b3;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-decoration: underline;
}

@media only screen and (max-width: 768px) {
  .filters-toggle,
  .tm-filters-toggle {
    display: none !important;
  }
}

/* Accordion + checkbox group (legacy) */
.filter-item {
  flex: 1 1 300px;
  margin-bottom: 10px;
}
.filter-item label {
  font-weight: bold;
  margin-bottom: 5px;
}
.checkbox-group {
  background: #fff;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
}
.accordion-header {
  cursor: pointer;
  background: #e1e1e1;
  padding: 8px 12px;
  font-weight: bold;
  border-radius: 6px;
  margin-bottom: 5px;
}
.accordion-content {
  display: none;
  padding: 0 10px 10px;
}
.accordion-content.active {
  display: block;
}
.select-all-label {
  display: block;
  font-style: italic;
  margin-bottom: 5px;
}
.accordion-header {
  cursor: pointer;
  background: #e1e1e1;
  padding: 8px 12px;
  font-weight: bold;
  border-radius: 6px;
  margin-bottom: 5px;
}
.accordion-content {
  display: none;
  padding: 0 10px 10px;
}
.accordion-content.active {
  display: block;
}
.select-all-label {
  display: block;
  font-style: italic;
  margin-bottom: 5px;
}

/* Sticky row helper (Divi) */
.my-sticky-row {
  box-shadow: none !important;
  transition: box-shadow 0.3s ease;
}
.my-sticky-row.et_pb_sticky {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55) !important;
}

/* Vertical menu helper (Divi menu module) */
.vertical-menu .et_pb_menu__menu {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center;
  padding-left: 0 !important;
  list-style: none;
  text-align: center !important;
  width: 100%;
}
.vertical-menu .et_pb_menu__menu li {
  width: 100% !important;
  text-align: center !important;
  margin: 10px 0 !important;
}
.vertical-menu .et_pb_menu__menu li a {
  display: inline-block !important;
  text-align: center !important;
  width: 100%;
}

/* ------------------------------------------------------------
   Single aircraft listing detail styles
------------------------------------------------------------ */
.aircraft-overview,
.aircraft-airframe,
.aircraft-engine,
.aircraft-apu,
.aircraft-avionics,
.aircraft-equipment,
.aircraft-appearance,
.aircraft-documents {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9f9f9;
  border: 1px solid #e2e2e2;
  border-radius: 10px;
}

.aircraft-overview h3,
.aircraft-airframe h4,
.aircraft-engine h4,
.aircraft-apu h4,
.aircraft-avionics h4,
.aircraft-equipment h4,
.aircraft-appearance h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.aircraft-overview li,
.aircraft-airframe li,
.aircraft-engine li,
.aircraft-apu li,
.aircraft-appearance li {
  font-weight: normal;
}

.aircraft-overview li strong,
.aircraft-airframe li strong,
.aircraft-engine li strong,
.aircraft-apu li strong,
.aircraft-appearance li strong {
  font-weight: bold;
}

.aircraft-overview li span,
.aircraft-airframe li span,
.aircraft-engine li span,
.aircraft-apu li span,
.aircraft-appearance li span {
  font-weight: normal;
}

.engine-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.engine-col {
  flex: 1 1 250px;
}

.engine-col ul {
  list-style: none;
  padding-left: 0;
}

.engine-col li {
  margin-bottom: 0.5em;
}

.engine-col h5 {
  font-size: 1.1rem;
  margin-bottom: 0.5em;
}

.engine-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.engine-table th,
.engine-table td {
  border: 1px solid #ccc;
  padding: 0.6em;
  text-align: left;
  vertical-align: top;
}

.engine-table thead {
  background-color: #f7f7f7;
}

.engine-table td:first-child,
.engine-table th:first-child {
  font-weight: bold;
  background-color: #fafafa;
}

.btn-brochure {
  background: #004aad;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

.aircraft-avionics .normal-text,
.aircraft-equipment .normal-text {
  font-weight: normal;
  line-height: 1.6;
}

/* Simple single-page header area (new shortcode) */
.tm-aircraft-single {
  max-width: 1200px;
  margin: 0 auto;
}

.tm-aircraft-single__hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 980px) {
  .tm-aircraft-single__hero {
    grid-template-columns: 1fr;
  }
}

.tm-aircraft-single__media {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 16px;
}

.tm-aircraft-single__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.tm-aircraft-single__info {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 18px;
}

.tm-aircraft-single__title {
  margin: 0 0 10px;
  font-size: 28px;
}

.tm-aircraft-single__price {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 10px;
}

.tm-aircraft-single__meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.tm-aircraft-single__meta li {
  font-size: 14px;
}

.tm-aircraft-single__meta strong {
  display: inline-block;
  min-width: 110px;
}

.tm-aircraft-single__cta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.tm-aircraft-single__cta .seller-contact p {
  margin: 0;
}

.tm-aircraft-single__gallery {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

.tm-aircraft-single__gallery img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e5e5e5;
  display: block;
}

/* Fullscreen gallery modal: center media and prevent "zoom/crop" */
.tm-gallery-modal-dialog {
  display: flex;
  flex-direction: column;
  height: 90vh;          /* adjust if you want taller/shorter */
}

.tm-gallery-modal-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-gallery-modal-track {
  width: 100%;
  height: 100%;
  display: flex;
}

.tm-gallery-modal-slide {
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tm-gallery-modal-slide img,
.tm-gallery-modal-slide video,
.tm-gallery-modal-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Ensure gallery nav arrows always sit ABOVE the media (mobile included) */
.tm-gallery-main,
.tm-gallery-modal-main {
  position: relative;
}

/* Put arrows on top */
.tm-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  pointer-events: auto;
}

/* Keep them inside the viewport edge */
.tm-gallery-prev { left: 10px; }
.tm-gallery-next { right: 10px; }

/* Mobile tweaks: tighter inset + bigger tap target */
@media (max-width: 600px) {
  .tm-gallery-prev { left: 8px; }
  .tm-gallery-next { right: 8px; }

  .tm-gallery-nav {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.tm-gallery-modal-count {
  display: none !important;
}


/* Quick View: legacy (#quickViewModal) and plugin (.tm-qv-modal) */
#quickViewModal,
.tm-qv-modal {
  z-index: 2147483647 !important;
  position: fixed !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
}

@media (max-width: 768px) {
  .quick-view-button,
  .tm-aircraft-btn--quick-view {
    display: none !important;
  }
}

/* ------------------------------------------------------------
   Quick View: prevent Close button from overlapping the image
------------------------------------------------------------ */

/* Reserve a top "header" area inside the modal */
#tmQuickViewModal .tm-qv-inner {
  position: relative;
  background: #fff;
  padding-top: 56px; /* header height - adjust if you want */
}

/* Optional subtle divider under the header area
#tmQuickViewModal .tm-qv-inner:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 56px;        
  height: 1px;
  background: rgba(0,0,0,0.08);
} */

/* Place the close button in the header area (not over the image) */
#tmQuickViewModal .tm-qv-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;

  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.16);
  border-radius: 999px;
  padding: 8px 12px;

  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}


/* Thumbnails (legacy + plugin) */
.aircraft-thumbnail-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-radius: 4px;
}
.aircraft-thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-aircraft-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  /*border-radius: 10px;
  background: #f1f1f1;*/

  /* softer shadow */
  /*box-shadow: 0 12px 22px -20px rgba(0, 0, 0, 0.16);*/
}

.tm-aircraft-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Latest Aircraft (legacy + plugin) */
.latest-aircraft-wrapper {
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}
.latest-aircraft-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-top: 40px;
}
.latest-aircraft-grid .aircraft-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  transition: box-shadow 0.3s ease;
}
.latest-aircraft-grid .aircraft-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.latest-aircraft-grid .aircraft-image-wrapper {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 10px;
}
.latest-aircraft-grid .aircraft-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.latest-aircraft-grid h3 {
  margin: 10px 0;
  font-size: 1.2em;
  font-weight: 600;
}
.latest-aircraft-grid .aircraft-card p {
  margin: 4px 0;
  font-size: 0.95em;
}

/* Compare page */
.tm-compare-page {
  padding-top: 120px;
}
.compare-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1rem;
  justify-content: center;
}
.compare-card {
  flex: 1 1 320px;
  max-width: 400px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.compare-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transform: scale(1.02);
  cursor: pointer;
}
.compare-thumbnail,
.compare-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.compare-card h3 {
  margin-top: 1rem;
  font-size: 1.2rem;
}
.compare-card ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}
.compare-card li {
  margin-bottom: 0.75rem;
}
@media screen and (max-width: 768px) {
  .compare-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* Compare page */
.tm-compare-page {
  padding-top: 120px;
}

.compare-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1rem;
  justify-content: center;
}
.compare-card {
  flex: 1 1 320px;
  max-width: 420px;
  background: #f9f9f9;
  border-radius: 10px;
  border: 1px solid #ccc;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: block;
}
.compare-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transform: scale(1.02);
  cursor: pointer;
}
.compare-thumbnail,
.compare-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.compare-card h3 {
  margin-top: 1rem;
  font-size: 1.2rem;
}
.compare-card ul {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
}
.compare-card li {
  margin-bottom: 0.75rem;
}

@media screen and (max-width: 768px) {
  .compare-grid {
    flex-direction: column;
    align-items: center;
  }
}

/* Master single listing page shortcode layout */
.tm-aircraft-single {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 0;
}

.tm-aircraft-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 24px;
}

.tm-aircraft-hero__media {
  flex: 1 1 420px;
  min-width: 280px;
}

.tm-aircraft-hero__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

.tm-aircraft-hero__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tm-aircraft-hero__thumb {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e2e2;
  background: #fff;
}

.tm-aircraft-hero__thumb img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}

.tm-aircraft-hero__info {
  flex: 1 1 360px;
  min-width: 280px;
}

.tm-aircraft-hero__title {
  margin: 0 0 8px;
}

.tm-aircraft-hero__price {
  font-size: 24px;
  font-weight: 700;
  margin: 6px 0 14px;
}

.tm-aircraft-hero__meta {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.tm-aircraft-hero__meta li {
  margin: 0;
}

.tm-aircraft-hero__docs {
  margin-top: 14px;
}

/* Right-side info redesign (spec rows + highlights + CTA card) */
.tm-aircraft-hero__info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 14px;
}

.tm-aircraft-specs {
  border-top: 1px solid rgba(0,0,0,0.18);
}

.tm-aircraft-spec-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.18);
}

.tm-aircraft-spec-label {
  font-weight: 700;
}

.tm-aircraft-spec-value {
  text-align: right;
  opacity: 0.9;
}

.tm-aircraft-side-title {
  margin: 0 0 10px 0;
  font-size: 26px;
  letter-spacing: 0.02em;
}

.tm-aircraft-highlights-list {
  margin: 0;
  padding-left: 20px;
}

.tm-aircraft-highlights-list li {
  margin: 10px 0;
}

.tm-aircraft-cta-card {
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 14px;
  padding: 20px;
  background: #f7f4ef;
}

.tm-aircraft-cta-title {
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 750;
}

.tm-aircraft-cta-text {
  margin: 0 0 16px 0;
  line-height: 1.6;
  opacity: 0.9;
}

.tm-aircraft-cta-actions {
  margin-top: 8px;
}

.tm-aircraft-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.35);
  text-decoration: none !important;
  font-weight: 700;
}

.tm-aircraft-cta-contact {
  margin-top: 16px;
}

/* If your hero right column is tight, this keeps it clean on mobile too */
@media (max-width: 980px) {
  .tm-aircraft-hero__info-grid {
    gap: 14px;
  }
}


.compare-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.compare-title {
  text-align: center;
  margin: 0 0 20px;
  font-size: 2rem;
  font-weight: 700;
}

.compare-specs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.compare-specs li {
  margin-bottom: 10px;
}

.compare-avionics-text {
  line-height: 1.6;
}

/* v1.2.2 tweaks */

/* Kill any legacy inline-styled compare bar that may still be injected */
#compare-bar { display: none !important; }

/* Do not float CF7 wizard cards on hover (annoying while clicking) */
.tm-form.tm-card--float:hover {
  transform: none !important;
}

/* ------------------------------------------------------------
   v2 Hero Layout: Full-width gallery row + 2-column info row
   Paste at bottom of site.css so it wins the cascade.
------------------------------------------------------------ */

/* Slightly wider container helps the gallery feel "hero" */
.tm-aircraft-single {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
}

/* Row 1: media full width, Row 2: info */
.tm-aircraft-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.tm-aircraft-hero__media,
.tm-aircraft-hero__info {
  width: 100%;
}

/* Row 2 layout: left (title/price/stats) + right (CTA) */
.tm-aircraft-hero__info-grid--v2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 980px) {
  .tm-aircraft-hero__info-grid--v2 {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------
   Gallery boost: bigger, cleaner main image + nicer thumbs
------------------------------------------------------------ */

.tm-gallery-main {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.10);
  background: #0b0b0b;
  position: relative;
}

/* Make slides fill the hero area */
.tm-gallery-track,
.tm-gallery-slide {
  height: 100%;
}

.tm-gallery-slide img,
.tm-gallery-slide video,
.tm-gallery-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Thumbs: horizontal scroll row, slightly larger */
.tm-gallery-thumbs {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.tm-gallery-thumb {
  flex: 0 0 92px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
}

.tm-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-gallery-thumb.is-active {
  outline: 2px solid #004aad;
  outline-offset: 2px;
}

/* Nav arrows: cleaner "pill" buttons */
.tm-gallery-nav {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.88);
}

/* Fullscreen button: consistent and a bit more premium */
.tm-gallery-open {
  position: absolute;
  right: 14px;
  bottom: 14px;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.18);
  background: rgba(255,255,255,0.92);
  font-weight: 700;
}

/* ------------------------------------------------------------
   Gallery Collage Hero (1 big + 4 tiles + "See all")
------------------------------------------------------------ */

.tm-gallery.tm-gallery--collage {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 12px;
  align-items: stretch;
}

/* Main image becomes the big left panel */
.tm-gallery.tm-gallery--collage .tm-gallery-main {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.10);
  background: #0b0b0b;
}

/* Make the slide fill the main panel */
.tm-gallery.tm-gallery--collage .tm-gallery-track,
.tm-gallery.tm-gallery--collage .tm-gallery-slide {
  height: 100%;
}

.tm-gallery.tm-gallery--collage .tm-gallery-slide img,
.tm-gallery.tm-gallery--collage .tm-gallery-slide video,
.tm-gallery.tm-gallery--collage .tm-gallery-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Right side becomes a 2x2 grid of tiles */
.tm-gallery.tm-gallery--collage .tm-gallery-thumbs {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
  height: 100%;
  overflow: hidden;
  padding-bottom: 0;
}

.tm-gallery.tm-gallery--collage .tm-gallery-thumb {
  width: 100%;
  height: 100%;
  flex: initial;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  position: relative;
}

.tm-gallery.tm-gallery--collage .tm-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-gallery.tm-gallery--collage .tm-gallery-thumb.is-hidden {
  display: none !important;
}

/* Hide default "View fullscreen" button in collage mode (we use the tile overlay) */
.tm-gallery.tm-gallery--collage .tm-gallery-open {
  display: none !important;
}

/* Hide arrows in collage mode so we do not "slide away" from visible tiles */
.tm-gallery.tm-gallery--collage .tm-gallery-nav {
  display: none !important;
}

/* "See all N images" overlay on the 4th tile */
.tm-gallery.tm-gallery--collage .tm-gallery-thumb--more img {
  filter: brightness(0.8);
}

.tm-gallery.tm-gallery--collage .tm-gallery-thumb--more .tm-gallery-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  font-weight: 800;
  border-radius: 16px;
  background: rgba(0,0,0,0.45);
  color: #fff;
}

/* Mobile: stack main above tiles */
@media (max-width: 980px) {
  .tm-gallery.tm-gallery--collage {
    grid-template-columns: 1fr;
  }

  .tm-gallery.tm-gallery--collage .tm-gallery-main {
    aspect-ratio: 16 / 9;
  }

  .tm-gallery.tm-gallery--collage .tm-gallery-thumbs {
    height: auto;
  }

  .tm-gallery.tm-gallery--collage .tm-gallery-thumb {
    height: 120px;
  }
}

/* -----------------------------------------------------------
   Divi mobile hamburger dropdown menu polish
   Targets: <ul id="mobile_menu1" class="et_mobile_menu">
----------------------------------------------------------- */

@media (max-width: 980px) {

  /* The dropdown panel */
  #mobile_menu1.et_mobile_menu {
    /* layout */
    padding: 10px 10px;
    margin-top: 10px;

    /* look */
    background: #ffffff;
    border-top: 0 !important;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);

    /* keep it above page content */
    position: relative;
    z-index: 9999;
  }

  /* Remove Divi's default item spacing/borders */
  #mobile_menu1.et_mobile_menu li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }

  /* Link rows */
  #mobile_menu1.et_mobile_menu li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;

    /* tighter than Divi default */
    padding: 14px 14px !important;
    line-height: 1.2;

    /* typography */
    font-size: 16px;
    font-weight: 600;
    color: #111111 !important;
    text-decoration: none;

    /* row styling */
    border: 0 !important;
    border-radius: 10px;
    background: transparent;

    /* reduce that huge tap height feel */
    min-height: 44px;
  }

  /* Subtle dividers (instead of heavy borders) */
  #mobile_menu1.et_mobile_menu li + li > a {
    position: relative;
  }
  #mobile_menu1.et_mobile_menu li + li > a:before {
    content: "";
    position: absolute;
    top: -1px;
    left: 14px;
    right: 14px;
    height: 1px;
    background: rgba(0,0,0,0.06);
  }

  /* Hover/focus/active */
  #mobile_menu1.et_mobile_menu li > a:hover,
  #mobile_menu1.et_mobile_menu li > a:focus {
    background: rgba(0,0,0,0.04);
    outline: none;
  }

  #mobile_menu1.et_mobile_menu li > a:active {
    background: rgba(0,0,0,0.07);
  }

  /* Current page highlight (Divi adds current-menu-item) */
  #mobile_menu1.et_mobile_menu li.current-menu-item > a,
  #mobile_menu1.et_mobile_menu li.current_page_item > a {
    background: rgba(255,165,0,0.14);
    color: #111111 !important;
  }

  /* Optional: tighten the dropdown width so it looks intentional */
  .et_mobile_nav_menu .et_mobile_menu {
    width: min(92vw, 420px);
    margin-left: auto;
    margin-right: auto;
  }
}

/* -----------------------------------------------------------
   Divi Theme Builder Header: center hamburger + center dropdown
----------------------------------------------------------- */

@media (max-width: 980px) {

  /* Center the menu module contents on mobile */
  .et-l--header .et_pb_menu .et_pb_menu__wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Center the hamburger container */
  .et-l--header .et_pb_menu .et_mobile_nav_menu {
    float: none !important;
    margin: 0 auto !important;
    text-align: center !important;
    position: relative !important; /* anchor dropdown to this */
  }

  /* Center the hamburger icon itself */
  .et-l--header .et_pb_menu .mobile_menu_bar {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Center the dropdown panel under the hamburger */
  .et-l--header .et_pb_menu ul.et_mobile_menu,
  .et-l--header .et_pb_menu ul#mobile_menu1.et_mobile_menu {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;

    width: min(92vw, 420px) !important;
    margin-top: 10px !important;
    z-index: 9999 !important;
  }
}

@media (max-width: 980px) {
  .tm-aircraft-btn--quickview {
    display: none !important;
  }
}

@media (max-width: 980px) {
  #tmStickyFiltersBtn.tm-hide-near-footer,
  #tmCompareBar.tm-hide-near-footer {
    opacity: 0 !important;
    transform: translateY(12px) !important;
    pointer-events: none !important;
  }
}

@media (max-width: 980px) {
  #tmCompareBar {
    bottom: env(safe-area-inset-bottom) !important;
  }

  #tmStickyFiltersBtn {
    bottom: calc(env(safe-area-inset-bottom) + 12px) !important;
  }

  body.tm-compare-active #tmStickyFiltersBtn {
    bottom: calc(env(safe-area-inset-bottom) + 78px) !important;
  }
}

/* Center the filters toggle control (works whether .filters-toggle is wrapper or the button itself) */
.filters-toggle,
.tm-filters-toggle {
  width: 100% !important;           /* if it's a wrapper, let it span the row */
  display: flex !important;         /* center children */
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;    /* fallback if contents are inline */
}

/* If the clickable element is inside the wrapper (common in Divi) */
.filters-toggle a,
.filters-toggle button,
.tm-filters-toggle a,
.tm-filters-toggle button {
  float: none !important;
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  margin: 0 auto !important;
}

/* If the element itself is the button/link with that class */
a.filters-toggle,
button.filters-toggle,
a.tm-filters-toggle,
button.tm-filters-toggle {
  float: none !important;
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  margin: 0 auto !important;
}


/* Force a "center slot" for only the top toggle */
.tm-aircraft-sales {
  display: grid !important;
  grid-template-columns: 1fr;
}

.tm-aircraft-sales > button.tm-filters-toggle {
  justify-self: center !important;
  width: auto !important;
  display: inline-flex !important;
  margin-bottom: 40px !important; /* buffer before cards */
}

/* Mobile swap: hide the in-layout desktop Filters button, use the floating pill instead */
@media only screen and (max-width: 768px) {
  .tm-aircraft-sales > button.tm-filters-toggle {
    display: none !important;
  }

  /* Make sure the floating pill is visible on mobile */
  #tmStickyFiltersBtn {
    display: inline-flex !important;
  }
}

/* Desktop swap: show the in-layout button, hide the floating pill */
@media only screen and (min-width: 769px) {
  .tm-aircraft-sales > button.tm-filters-toggle {
    display: inline-flex !important;
  }

  #tmStickyFiltersBtn {
    display: none !important;
  }
}

/* Compare bar fade/slide animation (ALL breakpoints) */
#tmCompareBar.tm-compare-bar {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 260ms ease, transform 260ms ease;
  will-change: opacity, transform;
}

/* Hidden state */
#tmCompareBar.tm-compare-bar.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

@media (min-width: 769px) {
  #tmCompareBar.tm-compare-bar {
    overflow: hidden;
    max-height: 500px;              /* big enough for your compare UI */
    transition: opacity 260ms ease, transform 260ms ease, max-height 260ms ease;
  }

  #tmCompareBar.tm-compare-bar.is-hidden {
    max-height: 0;
  }
}

/* Compare bar: hide near footer on ALL breakpoints */
#tmCompareBar.tm-compare-bar.tm-hide-near-footer {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  pointer-events: none !important;
}

/* Compare bar fade animation on ALL sizes (desktop + mobile) */
#tmCompareBar.tm-compare-bar {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 260ms ease, transform 260ms ease;
  will-change: opacity, transform;
}

#tmCompareBar.tm-compare-bar.is-hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

/* Hide near footer on ALL sizes */
#tmCompareBar.tm-compare-bar.tm-hide-near-footer {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  pointer-events: none !important;
}

.tm-qv-thumb img,
.tm-aircraft-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ------------------------------------------------------------
   Single listing spec cards (v3): grids, stat tiles, accordions
------------------------------------------------------------ */

.tm-spec-card {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.tm-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.tm-card-head--tight {
  margin-bottom: 10px;
}

.tm-card-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
}

.tm-card-subtitle {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  opacity: 0.95;
}

.tm-card-title-sm {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 800;
}

/* Badges */
.tm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.tm-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: rgba(0,0,0,0.04);
}

.tm-badge--primary {
  background: rgba(0,74,173,0.10);
  border-color: rgba(0,74,173,0.25);
}

.tm-badge--muted {
  opacity: 0.85;
}

/* Spec grids */
.tm-spec-grid {
  display: grid;
  gap: 10px;
  margin: 0;
}

.tm-spec-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tm-spec-grid--1 {
  grid-template-columns: 1fr;
}

@media (max-width: 820px) {
  .tm-spec-grid--2 { grid-template-columns: 1fr; }
  .tm-card-head { flex-direction: column; align-items: stretch; }
  .tm-badges { justify-content: flex-start; }
}

.tm-spec {
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
}

.tm-spec__label {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

.tm-spec__value {
  margin: 6px 0 0 0;
  font-size: 15px;
  font-weight: 750;
}

.tm-spec--mono .tm-spec__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Make tight grids a bit less tall */
.tm-spec-grid--tight .tm-spec {
  padding: 9px 10px;
}

/* Stat tiles */
.tm-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 12px 0;
}

@media (max-width: 820px) {
  .tm-stats { grid-template-columns: 1fr; }
}

.tm-stat {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

.tm-stat__value {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.1;
}

.tm-stat__label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* Notes accordions */
.tm-note-toggle {
  margin-top: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.tm-note-toggle__summary {
  cursor: pointer;
  padding: 12px 12px;
  font-weight: 850;
  background: rgba(0,0,0,0.03);
  list-style: none;
}

.tm-note-toggle__summary::-webkit-details-marker { display: none; }

.tm-note-toggle__body {
  padding: 12px 12px;
  line-height: 1.6;
  opacity: 0.95;
}

/* Text blocks (avionics/equipment) */
.tm-text-block {
  line-height: 1.7;
  opacity: 0.95;
}

/* Engine cards */
.tm-engine-cards {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.tm-engine-cards--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 820px) {
  .tm-engine-cards--2 { grid-template-columns: 1fr; }
}

.tm-engine-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

.tm-engine-card__title {
  font-weight: 900;
  margin-bottom: 10px;
}

/* Appearance split */
.tm-appearance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 820px) {
  .tm-appearance-grid { grid-template-columns: 1fr; }
}

.tm-subcard {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

.tm-subcard__title {
  font-weight: 900;
  margin-bottom: 10px;
}

/* ------------------------------------------------------------
   Hero quick facts: modern grid (replaces lined rows)
------------------------------------------------------------ */

.tm-badges--hero {
  margin-top: 10px;
  justify-content: flex-start;
}

.tm-hero-kv {
  margin-top: 14px;
}

/* Notes summary: show a single pill (text + chevron together) */
.tm-note-toggle--hint .tm-note-toggle__summary {
  position: relative;
  padding-right: 150px; /* room for the pill */
}

.tm-note-toggle--hint .tm-note-toggle__summary::after {
  content: "Click to view";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);

  font-size: 12px;
  font-weight: 800;

  /* pill look */
  padding: 6px 28px 6px 10px; /* extra right padding for chevron */
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.04);
  opacity: 0.9;

  /* put chevron INSIDE the pill */
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px 10px;

  /* down chevron by default */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 4.4l3.8 3.8 3.8-3.8' fill='none' stroke='rgba(0,0,0,0.55)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

  pointer-events: none; /* keeps clicks on summary */
}

.tm-note-toggle--hint[open] .tm-note-toggle__summary::after {
  content: "Click to hide";

  /* up chevron when open */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 7.6l3.8-3.8 3.8 3.8' fill='none' stroke='rgba(0,0,0,0.55)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* Remove the separate chevron entirely */
.tm-note-toggle--hint .tm-note-toggle__summary::before {
  content: none !important;
}

/* Hover affordance */
.tm-note-toggle--hint .tm-note-toggle__summary:hover {
  background: rgba(0,0,0,0.05);
}

@media (max-width: 420px) {
  .tm-note-toggle--hint .tm-note-toggle__summary {
    padding-right: 130px;
  }

  .tm-note-toggle--hint .tm-note-toggle__summary::after {
    content: "Tap to view";
    font-size: 11px;
    padding: 6px 26px 6px 8px;
    right: 10px;
    background-position: right 9px center;
    background-size: 10px 10px;
  }

  .tm-note-toggle--hint[open] .tm-note-toggle__summary::after {
    content: "Tap to hide";
  }
}


/* Notes body: subtle reveal */
.tm-note-toggle__body {
  animation: tmNoteReveal 160ms ease;
}

@keyframes tmNoteReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Appearance layout */
.tm-appearance-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

/* When only one card exists, force a single column and full span */
.tm-appearance-grid--1 {
  grid-template-columns: minmax(0, 1fr) !important;
}

.tm-appearance-grid--1 > .tm-subcard {
  grid-column: 1 / -1;
  width: 100% !important;
  max-width: none !important;

  /* In case some existing CSS made this a flex layout earlier */
  flex: 1 1 100% !important;
}



/* While Quick View is open, push header below it */
body.tm-qv-open #main-header,
body.tm-qv-open #top-header,
body.tm-qv-open .et-l--header,
body.tm-qv-open header.et-l--header {
  z-index: 0 !important;
  pointer-events: none; /* optional but helps prevent weird clicks */
}

/* Backdrop fade */
.tm-qv-backdrop,
#tmQuickViewModal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  transition: opacity 220ms ease;
}

/* Dialog animation */
.tm-qv-inner {
  position: relative;
  opacity: 0;
  transform: translateY(10px) scale(0.99);
  transition: opacity 220ms ease, transform 220ms ease;
  will-change: opacity, transform;
}

/* ============================================================
   Quick View (single source of truth)
   - Backdrop: .tm-qv-backdrop (inside modal markup)
   - Overlay: fixed, non-scrolling
   - Dialog: scrolls internally
============================================================ */

html.tm-qv-open,
body.tm-qv-open {
  height: 100% !important;
  overflow: hidden !important;
}

#tmQuickViewModal,
#quickViewModal,
.tm-qv-modal {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;

  background: transparent !important;
  overflow: hidden !important;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity 220ms ease, visibility 0ms linear 220ms;
}

#tmQuickViewModal.is-open,
#quickViewModal.is-open,
.tm-qv-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 220ms ease, visibility 0ms linear 0ms;
}

#tmQuickViewModal .tm-qv-backdrop,
#quickViewModal .tm-qv-backdrop,
.tm-qv-modal .tm-qv-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0,0,0,0.55) !important;
  z-index: 0 !important;
}

#tmQuickViewModal .tm-qv-inner,
#quickViewModal .tm-qv-inner,
#quickViewModal #quickViewInner {
  position: relative !important;
  z-index: 1 !important;

  width: min(92vw, 980px) !important;
  margin: 24px auto !important;
  max-height: calc(100vh - 48px) !important;

  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain;

  background: #fff;
  border-radius: 14px;
}

/* Quick View: show dialog when open */
#tmQuickViewModal.is-open .tm-qv-inner,
#quickViewModal.is-open .tm-qv-inner,
.tm-qv-modal.is-open .tm-qv-inner,
#quickViewModal.is-open #quickViewInner {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* Compare bar: make hide work even if tm-compare-bar class is missing */
#tmCompareBar.is-hidden,
#tmCompareBar.tm-hide-near-footer {
  opacity: 0 !important;
  transform: translateY(12px) !important;
  pointer-events: none !important;
}

/* ============================================================
   QUICK VIEW PATCH (paste at very bottom of site.css)
   Fixes:
   - Backdrop being stuck at opacity:0
   - Ensures modal stays above Divi/theme layers
============================================================ */

/* Kill the pseudo-backdrop approach so it can't fight the real backdrop */
body #tmQuickViewModal::before,
body #quickViewModal::before {
  content: none !important;
  display: none !important;
}

/* Force modal overlay stacking */
body #tmQuickViewModal,
body #quickViewModal,
body .tm-qv-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483647 !important;
}

/* Real backdrop element: fade properly */
body #tmQuickViewModal .tm-qv-backdrop,
body #quickViewModal .tm-qv-backdrop,
body .tm-qv-modal .tm-qv-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;

  background: rgba(0,0,0,0.55) !important;

  /* IMPORTANT: your older CSS sets opacity:0 on .tm-qv-backdrop */
  opacity: 0 !important;
  transition: opacity 220ms ease !important;

  z-index: 0 !important;
}

body #tmQuickViewModal.is-open .tm-qv-backdrop,
body #quickViewModal.is-open .tm-qv-backdrop,
body .tm-qv-modal.is-open .tm-qv-backdrop {
  opacity: 1 !important;
}

/* Dialog above backdrop */
body #tmQuickViewModal .tm-qv-inner,
body #quickViewModal .tm-qv-inner,
body .tm-qv-modal .tm-qv-inner,
body #quickViewModal #quickViewInner {
  position: relative !important;
  z-index: 1 !important;
}



/* -------------------------------------------------------------
 * Print (Compare page + general cleanup)
 * ------------------------------------------------------------*/
@media print {
  @page { margin: 4mm; }

  html, body { background: #fff !important; }
  body {
    font-size: 9px !important;
    line-height: 1.12 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hide WordPress/Divi chrome + interactive UI */
  #wpadminbar,
  .et-l--header,
  .et-l--footer,
  .et_pb_scroll_top,
  .tm-compare-bar,
  .tm-compare-actions,
  .tm-aircraft-compare-bar,
  .tm-aircraft-toolbar,
  .tm-aircraft-filterbar,
  .tm-aircraft-pagination,
  .tm-aircraft-filters,
  .tm-aircraft-cta,
  .tm-aircraft-sticky,
  .tm-aircraft-modal,
  .tm-qv,
  .tm-qv-backdrop {
    display: none !important;
  }

  /* Compare page compaction */
  .tm-compare-page { padding-top: 0 !important; }
  .compare-wrapper { padding-top: 0 !important; }
  .compare-title { margin: 0 0 8px !important; }
  .compare-grid { gap: 6px !important; padding: 0 !important; }

  .compare-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    padding: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Biggest page-break offender: hide photos + long avionics blocks */
  .compare-thumb,
  .compare-thumb img,
  .compare-avionics {
    display: none !important;
  }

  .compare-card-title { font-size: 12px !important; margin: 0 0 6px !important; }
  .compare-meta { margin: 0 !important; padding-left: 16px !important; }
  .compare-meta li { margin: 0 0 2px !important; font-size: 9px !important; }
  .compare-engine { font-size: 9px !important; }

  /* Prevent browsers from printing raw URLs after links */
  a[href]:after { content: "" !important; }
}

@media print {

  /* 1) Kill any forced full-page heights that create blank space */
  html, body { height: auto !important; }
  .tm-print, .tm-print * { min-height: 0 !important; }

  /* 2) CRITICAL: flex/grid rows often become unbreakable in print
        Stack them so the browser can flow content onto the page */
  .tm-print .tm-row,
  .tm-print .tm-grid,
  .tm-print .tm-columns,
  .tm-print .tm-cards-row,
  .tm-print .tm-two-col {
    display: block !important;
  }

  .tm-print .tm-col,
  .tm-print .tm-card {
    width: 100% !important;
  }

  /* 3) Remove "do not break" behavior that forces whole sections to the next page */
  .tm-print section,
  .tm-print .tm-section,
  .tm-print .tm-card,
  .tm-print .tm-box,
  .tm-print .tm-panel {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* 4) Keep table rows from splitting weirdly, but allow table to span pages */
  .tm-print table { page-break-inside: auto !important; }
  .tm-print thead { display: table-header-group; }
  .tm-print tr { page-break-inside: avoid; }

  /* 5) Prevent headings from being stranded at the bottom of a page */
  .tm-print h1, .tm-print h2, .tm-print h3 {
    break-after: avoid-page;
    page-break-after: avoid;
  }
}

@media print {

  /* Scope everything to your print page */
  body.tm-print-mode {
    background: #fff !important;
  }

  /* IMPORTANT: make multi-column rows break-friendly in print */
  body.tm-print-mode .tm-ws-two-up {
    display: block !important;   /* kills flex/grid behavior in print */
  }

  body.tm-print-mode .tm-ws-two-up .tm-ws-col {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Allow cards to split across pages (this is the real fix for long bullet lists) */
  body.tm-print-mode .tm-ws-card,
  body.tm-print-mode .tm-ws-bullets,
  body.tm-print-mode .tm-ws-notes {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* Keep headings from being stranded at the bottom of a page */
  body.tm-print-mode .tm-ws-card > h3 {
    break-after: avoid-page;
    page-break-after: avoid;
  }

  /* Tables: allow table to span pages; avoid splitting rows */
  body.tm-print-mode table.tm-ws-table {
    page-break-inside: auto !important;
  }
  body.tm-print-mode table.tm-ws-table thead {
    display: table-header-group;
  }
  body.tm-print-mode table.tm-ws-table tr {
    page-break-inside: avoid;
  }
}

@media print {

.tm-ws-logo { height: 0.45in; max-width: 2.0in; }


  /* 1) Allow content to break normally (override any "avoid" rules) */
  body.tm-print-mode .tm-ws-card,
  body.tm-print-mode .tm-ws-two-up,
  body.tm-print-mode .tm-ws-col,
  body.tm-print-mode .tm-ws-bullets,
  body.tm-print-mode .tm-ws-table {
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  /* 2) Flex rows often get treated as "atomic" in print -> stack columns for print */
  body.tm-print-mode .tm-ws-two-up {
    display: block !important;
  }
  body.tm-print-mode .tm-ws-two-up .tm-ws-col {
    width: 100% !important;
    min-width: 0 !important;
  }

  /* Optional: tighten spacing so it fits 1-2 pages better */
  body.tm-print-mode .tm-ws-card { margin: 0 0 10px !important; }
  body.tm-print-mode .tm-ws-card h3 { margin: 0 0 6px !important; }
  body.tm-print-mode .tm-ws-bullets { margin: 0 !important; padding-left: 16px !important; }
  body.tm-print-mode .tm-ws-bullets li { margin: 0 0 2px !important; line-height: 1.15 !important; }
}

.tm-ws-brand { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.tm-ws-logo { height: 34px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.tm-ws-title-inner { min-width: 0; }



/* Print header logo: keep it small and prevent layout blow-up */
.tm-ws-logo{
  display:block;
  width:auto;
  height:auto;
  max-width: 320px;   /* adjust 260-360 to taste */
  max-height: 70px;   /* key: prevents huge vertical spacing */
  object-fit: contain;
}

/* If the logo is inside a header/wrapper, tighten spacing */
.tm-print-header,
.tm-print-brand,
.tm-print-top{
  margin: 0 0 12px 0;
  padding: 0;
}

/* Print-specific tightening (safe even on screen) */
@media print{
  .tm-ws-logo{
    max-width: 260px;
    max-height: 60px;
  }
}

/* Mobile: stack aircraft cards 1-per-row (scoped to tm_latest_aircraft + tm_aircraft_listing_page) */
@media (max-width: 767px) {
  .tm-card-grid-host .tm-aircraft-grid,
  .tm-card-grid-host .tm-aircraft-grid.tm-aircraft-grid--count-1,
  .tm-card-grid-host .tm-aircraft-grid.tm-aircraft-grid--count-2,
  .tm-card-grid-host .tm-aircraft-grid.tm-aircraft-grid--count-3 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .tm-card-grid-host .tm-aircraft-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 767px) {
  .tm-card-grid-host .tm-aircraft-grid,
  .tm-aircraft-sales .tm-aircraft-grid,
  .tm-aircraft-results .tm-aircraft-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .tm-card-grid-host .tm-aircraft-card,
  .tm-aircraft-sales .tm-aircraft-card,
  .tm-aircraft-results .tm-aircraft-card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Mobile: 1 card per row for aircraft grids (latest + listings pages) */
@media (max-width: 767px) {
  /* Works whether the grid is CSS grid or flex */
  .tm-latest-aircraft .tm-aircraft-grid,
  .tm-aircraft-results .tm-aircraft-grid,
  .tm-aircraft-grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
  }

  .tm-aircraft-card {
    width: 100%;
    max-width: none;
  }
}
