/* ==========================================================================
   Mobile.de Plugin – Base Styles (Best-Practice, gekapselt auf Plugin-Markup)
   Datei: md-mobilede-styles.css
 ========================================================================= */

/* Wrapper (Default: 2-zeiliger Untertitel + etwas höhere Karte) */
.md-vehicle-grid-wrap{
  width:100%;
}

/* Grid */
.md-vehicle-grid-wrap .md-vehicle-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:24px;
}

/* Responsive */
@media (max-width: 1024px){
  .md-vehicle-grid-wrap .md-vehicle-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px){
  .md-vehicle-grid-wrap .md-vehicle-grid{
    grid-template-columns:1fr;
    gap:18px;
  }
}

/* Card */
.md-vehicle-grid-wrap .md-vehicle-card{
  background-color:#ffffff;
  border-radius:1rem;
  box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  width:100%;
  text-decoration:none;
  transition:background .3s, border .3s, box-shadow .3s, transform .4s;
  font-family:Poppins, sans-serif;
  color:#000000;
  overflow:hidden;
}

.md-vehicle-grid-wrap .md-vehicle-card:hover{
  box-shadow: 0px 0px 10px 0px rgba(50, 75, 155, 1);
}

/* --------------------------------------------------------------------------
   Höhen-Varianten
   - 2 Zeilen: etwas höher, damit der Untertitel nicht gequetscht wirkt
   - 1 Zeile: -Höhe
 -------------------------------------------------------------------------- */

/* Default: 2 Zeilen */
.md-vehicle-grid-wrap:not(.md-subtitle-lines-1) .md-vehicle-card{
  height:480px !important;
  min-height:480px !important;
}

/* : 1 Zeile */
.md-vehicle-grid-wrap.md-subtitle-lines-1 .md-vehicle-card{
  height:465px !important;
  min-height:465px !important;
}

/* Image area */
.md-vehicle-grid-wrap .md-vehicle-card__image{
  position:relative;
  width:100%;
  height:305px !important;
  overflow:hidden;
}

.md-vehicle-grid-wrap .md-vehicle-card__image-img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:30% center;
  display:block;
  transition: all 0.3s;
}

.md-vehicle-grid-wrap .md-vehicle-card:hover .md-vehicle-card__image-img{
    transform: scale(1.1);
}

.md-vehicle-grid-wrap .md-vehicle-card__image-placeholder{
  width:100%;
  height:100%;
  background:#f1f2f3;
}

/* Year badge */
.md-vehicle-grid-wrap .md-vehicle-card__year{
  position:absolute;
  bottom:0;
  right:0;
  background-color:#324b9b;
  color:#ffffff;
  font-family:Poppins, sans-serif;
  font-size:20pt;
  font-weight:600;
  padding:0.5rem 0.9rem 0.7rem 0.9rem;
}

/* Content */
.md-vehicle-grid-wrap .md-vehicle-card__content{
  padding:2rem 0rem 0rem 1.3rem;
  letter-spacing: 0px;
  line-height: 0;
  letter-spacing:0;
  color:#000000;
}

.md-vehicle-grid-wrap .md-vehicle-card__title{
  font-size:19pt;
  font-weight:600;
  margin-bottom:1.5rem;
  line-height: 0;
  letter-spacing:0;
  color:#000000;
}

/* Subtitle */
.md-vehicle-grid-wrap .md-vehicle-card__subtitle{
  font-size:9.8pt;
  font-weight:300;
  margin-bottom:1.2rem;
  line-height: 0;
  letter-spacing:0;
  color:#000000;

 /* Helps Safari/Chrome do clean clipping inside flexible layouts */
  min-width:0;
  overflow:hidden;
  text-overflow:clip;
}

/* Default: 2 Zeilen (inkl. kleiner Reserve) */
.md-vehicle-grid-wrap:not(.md-subtitle-lines-1) .md-vehicle-card__subtitle{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

/* 1 Zeile () */
.md-vehicle-grid-wrap.md-subtitle-lines-1 .md-vehicle-card__subtitle{
  display:block;
  white-space:nowrap;
  overflow:visible;
 /* wirkt "sauber", weil es nicht mitten im Glyphen schneidet */
  text-overflow:ellipsis;

}

.md-vehicle-grid-wrap .md-vehicle-card__subtitle--empty{
 visibility:hidden; /* nimmt Platz ein, aber zeigt nichts */
}

/* Meta row */
.md-vehicle-grid-wrap .md-vehicle-card__meta{
  font-size:9.8pt;
  font-weight:300;
  margin-top:0.25rem;
  display:flex;
  gap:0.5rem;
  line-height:0;
  letter-spacing:0;
  color:#000000;
}

.md-vehicle-grid-wrap .md-vehicle-card__meta-item{
  flex:1;
  display:flex;
  align-items:center;
  gap:0.5rem;
 min-width:0; /* ermöglicht Ellipsis in Child */
  line-height:0;
  
}

.md-vehicle-grid-wrap .md-vehicle-card__meta-item span{
  display:block;
  overflow:visible;
  white-space:nowrap;
}

.md-vehicle-grid-wrap .md-vehicle-card__meta-item--gear{
 margin-left:-3.3rem; /* -Offset beibehalten */
}

.md-vehicle-grid-wrap .md-vehicle-card__icon{
  width:1.6rem;
  height:auto;
  object-fit:contain;
  flex:0 0 auto;
}

/* Price */
.md-vehicle-grid-wrap .md-vehicle-card__price{
  font-size:19pt;
  font-weight:600;
  margin-top:0;
  color:#000000;
}

/* Price row + VAT label (MwSt. ausweisbar) */
.md-vehicle-grid-wrap .md-vehicle-card__price-row{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  margin-top:1.7rem;
}

/* Move top margin to the row to keep both texts on the same height */
.md-vehicle-grid-wrap .md-vehicle-card__price-row .md-vehicle-card__price{
  margin-top:0;
}

.md-vehicle-grid-wrap .md-vehicle-card__vat{
  margin-right:1.3rem;
  font-size:9.8pt;
  font-weight:300;
  line-height:0;
  letter-spacing:0;
  color:#000000;
}

/* Load more button */
.md-vehicle-grid-wrap .md-vehicle-load-more{
  font-family: "Poppins", Sans-serif;
  font-size: 15px;
  font-weight: 400;
  margin-top:22px;
  border-radius:1rem;
  border-color:#FFFFFF;
  border-style: solid;
  border-width: 1px 1px 1px 1px;
  background-color: #FFFFFF00;
  transition-duration: 250ms;
  color:#FFFFFF;
  transition:transform .2s, box-shadow .2s, background .2s;
  padding: 022px 50px 022px 50px;
  display: block;
  margin: 2rem auto 0 auto;
}

.md-vehicle-grid-wrap .md-vehicle-load-more:hover{
  background-color: #324B9B;
  border-color: #324B9B;
  color: #FFFFFF;
  border-radius:1rem;
}



/* Loading-State: keine Inline-Styles nötig; verhindert Hover-Stuck nach Klick */
.md-vehicle-grid-wrap .md-vehicle-load-more.md-is-loading,
.md-vehicle-grid-wrap .md-vehicle-load-more.md-is-loading:hover{
  background-color: transparent;
  border-color: #FFFFFF;
  color: #FFFFFF;
  cursor: default;
  transform: none;
  box-shadow: none;
}
.md-vehicle-grid-wrap .md-vehicle-load-more-status{
  background-color: #324B9B;
  border-color: #324B9B;
  color: #FFFFFF;
  border-radius:1rem;
}

/* ============================================================================
   Slider: [md_vehicle_slider]
   Lightweight native scroll slider (no external libs)
   ========================================================================== */

/* ==========================================================================
   Slider: [md_vehicle_slider]
   - 1 Karte pro Slide (100%)
   - Smooth transitions wie Elementor (transform transition)
   - Prev/Next Arrows + Dots
   - Autoplay wird via JS gesteuert, Pause bei Hover
   ========================================================================== */

.md-vehicle-slider{
  position:relative;
  width:100%;
}

.md-vehicle-slider__viewport{
  overflow:hidden;
  width:100%;
}

.md-vehicle-slider__track{
  display:flex;
  width:100%;
  transform:translateX(0%);
  transition:transform .5s ease;
  will-change:transform;
}

.md-vehicle-slider__slide{
  flex:0 0 100%;
  width:100%;
  box-sizing:border-box;
  display:flex;
  justify-content:center;
}

/* Card width im Slider: wie eine Grid-Karte auf Desktop */
.md-vehicle-slider .md-vehicle-card{
  width:100%;
  max-width:24rem;
}

/* Arrows */
/* Elementor-like arrows: icon-only, transparent, no button chrome */
.md-vehicle-slider__arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  z-index:50;

  width:44px;
  height:44px;

  appearance:none;
  -webkit-appearance:none;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0;
  border-radius:0 !important;

  display:flex;
  align-items:center;
  justify-content:center;

  color:rgba(0,0,0,.55) !important;
  cursor:pointer;
  user-select:none;
  line-height:0;

  pointer-events:auto !important;
}

.md-vehicle-slider__arrow i{
  font-size:28px;
  line-height:1;
  display:block;
}

.md-vehicle-slider__arrow:hover{
  color:rgba(0,0,0,.9) !important;
}

.md-vehicle-slider__arrow:disabled{
  opacity:.25;
  cursor:default;
}

.md-vehicle-slider__arrow:disabled:hover{
  color:rgba(0,0,0,.55) !important;
  opacity:.25;
}

.md-vehicle-slider__arrow i{
  font-size:28px;
  line-height:1;
  display:block;
}

.md-vehicle-slider__arrow:hover{
  opacity:.75;
}

.md-vehicle-slider__arrow:disabled{
  opacity:.25;
  cursor:default;
}

.md-vehicle-slider__arrow:disabled:hover{
  opacity:.25;
}


.md-vehicle-slider__arrow--prev{ left:-6px; }
.md-vehicle-slider__arrow--next{ right:-6px; }

.md-vehicle-slider__arrow:disabled{
  opacity:.4;
  cursor:default;
}

/* Dots */
.md-vehicle-slider__dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin-top:14px;
}

/* Elementor-like dots: icon-only, transparent, clickable */
.md-vehicle-slider__dots{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  margin-top:14px;
}

.md-vehicle-slider__dot{
  appearance:none;
  -webkit-appearance:none;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding:0 !important;
  margin:0;
  line-height:0;
  cursor:pointer;
  pointer-events:auto;
  display:flex;
  align-items:center;
  justify-content:center;
}

.md-vehicle-slider__dot svg{
  width:7px;
  height:7px;
  fill:rgba(0,0,0,.25);
  display:block;
}

.md-vehicle-slider__dot:hover svg{
  fill:rgba(0,0,0,.55);
}

.md-vehicle-slider__dot.md-is-active svg{
  fill:rgba(0,0,0,.9);
}


.md-vehicle-slider__arrow:focus-visible, .md-vehicle-slider__dot:focus-visible{ outline:2px solid currentColor; outline-offset:2px; }


/* Arrow color like dots */
.md-vehicle-slider__arrow{
  color: rgba(0,0,0,.55);
}
.md-vehicle-slider__arrow:hover{
  color: rgba(0,0,0,.9);
  opacity: 1;
}
.md-vehicle-slider__arrow:disabled{
  color: rgba(0,0,0,.25);
  opacity: 1;
}

/* ======================================================================
   V17.2.1 – Detail: Container (boxed, per CSS-Variable steuerbar)
   Du kannst die Breite z.B. in Elementor per Custom CSS überschreiben:
   selector { --md-detail-max-width: 750px; }
   ====================================================================== */

.md-vehicle-detail{
  --md-detail-max-width: 1200px;
}

.md-vehicle-detail__container{
  width: 100%;
  max-width: var(--md-detail-max-width);
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ======================================================================
   V17.2 – Detail: Vehicle Gallery (Main Image + Thumbnails + Lightbox)
   Markup kommt aus [md_vehicle_gallery]
   ====================================================================== */

.md-vehicle-detail .md-vehicle-gallery,
.md-vehicle-gallery{
  width: 100%;
  margin: 0 0;
}

.md-vehicle-gallery__main{
  width: 100%;
  margin-bottom: 12px;
}

.md-vehicle-gallery__main-btn{
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.md-vehicle-gallery__main-img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Thumbnails: 4 sichtbar, Navigation per Pfeile + Swipe (horizontal scroll) */
.md-vehicle-gallery__thumbs-wrap{
  display: flex;
  align-items: center;
  gap: 10px;
}

.md-vehicle-gallery__thumbs-arrow{
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: rgba(0,0,0,.45) !important;
  line-height: 0;
}
.md-vehicle-gallery__thumbs-arrow i{
  font-size: 28px;
  line-height: 1;
  display: block;
}
.md-vehicle-gallery__thumbs-arrow:hover{
  color: rgba(0,0,0,.75) !important;
}

.md-vehicle-gallery__thumbs-viewport{
  flex: 1 1 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.md-vehicle-gallery__thumbs-viewport::-webkit-scrollbar{ display:none; }

.md-vehicle-gallery__thumbs-track{
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
}

.md-vehicle-gallery__thumb{
  flex: 0 0 calc((100% - 30px)/4); /* 4 thumbs sichtbar */
  max-width: calc((100% - 30px)/4);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.md-vehicle-gallery__thumb img{
  width: 100%;
  height: auto;
  display: block;
}

.md-vehicle-gallery__thumb.md-is-active{
  outline: 2px solid rgba(0,0,0,.55);
  outline-offset: 2px;
}

@media (max-width: 767px){
  .md-vehicle-gallery__thumbs-arrow{
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 26px;
  }
  .md-vehicle-gallery__thumb{
    flex-basis: calc((100% - 24px)/4);
    max-width: calc((100% - 24px)/4);
  }
}


/* ===================== Lightbox ===================== */

/* Scroll lock wenn Lightbox offen */
html.md-lb-lock,
html.md-lb-lock body{
  overflow: hidden !important;
}

.md-vehicle-lightbox{
  display: none;
}

.md-vehicle-lightbox.md-is-open{
  display: block;
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.md-vehicle-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.75);
}

.md-vehicle-lightbox__dialog{
  position: relative;
  max-width: 1100px;
  margin: 5vh auto;
  padding: 16px;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  grid-template-rows: auto auto;
  gap: 12px;
  align-items: center;
}

.md-vehicle-lightbox__close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;

  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;

  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255,255,255,.65) !important;
  font-size: 28px;
  line-height: 1;
}
.md-vehicle-lightbox__close:hover{
  color: rgba(255,255,255,.9) !important;
}

.md-vehicle-lightbox__img{
  grid-column: 2;
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.md-vehicle-lightbox__arrow{
  width: 56px;
  height: 56px;

  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;

  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255,255,255,.65) !important;
  line-height: 0;
}
.md-vehicle-lightbox__arrow i{
  font-size: 38px;
  line-height: 1;
  display: block;
}
.md-vehicle-lightbox__arrow:hover{
  color: rgba(255,255,255,.9) !important;
}

.md-vehicle-lightbox__arrow--prev{
  grid-column: 1;
}

.md-vehicle-lightbox__arrow--next{
  grid-column: 3;
}

.md-vehicle-lightbox__thumbs-wrap{
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.md-vehicle-lightbox__thumbs-arrow{
  flex: 0 0 42px;
  width: 42px;
  height: 42px;

  appearance: none;
  -webkit-appearance: none;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;

  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: rgba(255,255,255,.65) !important;
  line-height: 0;
}
.md-vehicle-lightbox__thumbs-arrow i{
  font-size: 28px;
  line-height: 1;
  display: block;
}
.md-vehicle-lightbox__thumbs-arrow:hover{
  color: rgba(255,255,255,.9) !important;
}

.md-vehicle-lightbox__thumbs-viewport{
  flex: 1 1 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.md-vehicle-lightbox__thumbs-viewport::-webkit-scrollbar{ display:none; }

.md-vehicle-lightbox__thumbs-track{
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
}

.md-vehicle-lightbox__thumb{
  flex: 0 0 calc((100% - 30px)/4);
  max-width: calc((100% - 30px)/4);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
  border-radius: 6px;
  overflow: hidden;
}

.md-vehicle-lightbox__thumb img{
  width: 100%;
  height: auto;
  display: block;
}

.md-vehicle-lightbox__thumb.md-is-active{
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 2px;
}

@media (max-width: 767px){
  .md-vehicle-lightbox__dialog{
    margin: 0;
    min-height: 100vh;
    max-width: none;
    border-radius: 0;
    padding: 12px;
    grid-template-columns: 44px 1fr 44px;
  }
  .md-vehicle-lightbox__arrow{
    width: 44px;
    height: 44px;
    line-height: 44px;
    font-size: 30px;
  }
  .md-vehicle-lightbox__thumb,
  .md-vehicle-gallery__thumb{
    width: 90px;
  }
}


/* V17.2.4 Gallery constrained, container normal */
/* Keep overall detail page container wide, but constrain only the gallery width */
.md-vehicle-detail .md-vehicle-gallery{
  max-width: 750px;
}

/* If the gallery sits in an Elementor 50% container, don't auto-center; let Elementor handle alignment */
.md-vehicle-detail .md-vehicle-gallery{
  margin-left: 0;
  margin-right: 0;
}


/* === V4.1 Gallery Arrow Hover Background Override (no pink backgrounds) === */
.md-vehicle-gallery__thumbs-arrow,
.md-vehicle-gallery__thumbs-arrow:hover,
.md-vehicle-gallery__thumbs-arrow:focus,
.md-vehicle-gallery__thumbs-arrow:active,
.md-vehicle-lightbox__arrow,
.md-vehicle-lightbox__arrow:hover,
.md-vehicle-lightbox__arrow:focus,
.md-vehicle-lightbox__arrow:active,
.md-vehicle-lightbox__thumbs-arrow,
.md-vehicle-lightbox__thumbs-arrow:hover,
.md-vehicle-lightbox__thumbs-arrow:focus,
.md-vehicle-lightbox__thumbs-arrow:active,
.md-vehicle-lightbox__close,
.md-vehicle-lightbox__close:hover,
.md-vehicle-lightbox__close:focus,
.md-vehicle-lightbox__close:active{
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

/* Ensure icon uses currentColor consistently */
.md-vehicle-gallery__thumbs-arrow i,
.md-vehicle-lightbox__arrow i,
.md-vehicle-lightbox__thumbs-arrow i,
.md-vehicle-lightbox__close i{
  color: inherit !important;
}


/* === V6: Unify arrow icon glyph weight (use same icon and rotate for prev) === */
.md-vehicle-gallery__thumbs-arrow--prev i,
.md-vehicle-lightbox__arrow--prev i,
.md-vehicle-lightbox__thumbs-arrow--prev i{
  transform: rotate(180deg);
  display: block;
}

/* Normalize icon rendering to avoid different stroke/fill weights */
.md-vehicle-gallery__thumbs-arrow i,
.md-vehicle-lightbox__arrow i,
.md-vehicle-lightbox__thumbs-arrow i,
.md-vehicle-lightbox__close i{
  opacity: 1 !important;
  filter: none !important;
}


/* === V7 Lightbox: full viewport height + centered image + smaller arrows === */

/* Make the lightbox dialog always use the full viewport height */
.md-vehicle-lightbox__dialog{
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 auto !important;
  max-width: 1100px;
  box-sizing: border-box;
  grid-template-rows: 1fr auto !important; /* image area + thumbs */
  align-items: center;
}

/* Center the image and keep it contained (supports mixed aspect ratios) */
.md-vehicle-lightbox__img{
  width: 100%;
  height: auto;
  max-height: calc(100vh - 190px) !important; /* leave room for thumbs + padding */
  object-fit: contain;
  justify-self: center;
  align-self: center;
}

/* Smaller arrows in hero/lightbox mode (desktop + mobile) */
.md-vehicle-lightbox__arrow{
  width: 44px !important;
  height: 44px !important;
}

.md-vehicle-lightbox__arrow i{
  font-size: 30px !important;
}

/* Keep thumbs visible at the bottom, even on small screens */
@media (max-width: 767px){
  .md-vehicle-lightbox__dialog{
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    max-width: none !important;
  }

  .md-vehicle-lightbox__img{
    max-height: calc(100vh - 170px) !important;
  }
}



/* === V9 CLEAN Lightbox Full Viewport (no auto-open) === */

.md-vehicle-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.md-vehicle-lightbox.is-open {
  display: flex;
}

.md-vehicle-lightbox__dialog {
  width: calc(100vw - 80px);
  height: 100vh;
  max-width: none;
  margin: 0 auto;
  display: grid;
  grid-template-rows: 1fr auto;
  align-items: center;
}

.md-vehicle-lightbox__img {
  max-height: calc(100vh - 180px);
  width: 100%;
  object-fit: contain;
  align-self: center;
  justify-self: center;
}

/* smaller arrows */
.md-vehicle-lightbox__arrow {
  width: 44px;
  height: 44px;
}

.md-vehicle-lightbox__arrow i {
  font-size: 28px;
}

@media (max-width: 767px) {
  .md-vehicle-lightbox__dialog {
    width: calc(100vw - 32px);
  }

  .md-vehicle-lightbox__img {
    max-height: calc(100vh - 160px);
  }
}


/* === V10 Lightbox Thumbnail Visibility Fix === */

/* Reduce image height slightly so thumbnail row is always fully visible */
.md-vehicle-lightbox__img {
  max-height: calc(100vh - 240px) !important;
}

/* Slightly ensure thumbnail area has breathing space */
.md-vehicle-lightbox__thumbs {
  padding-bottom: 10px;
}

@media (max-width: 767px) {
  .md-vehicle-lightbox__img {
    max-height: calc(100vh - 210px) !important;
  }
}


/* === V11 Lightbox responsive split: 80vh image / 20vh thumbnails (variable by viewport) === */

.md-vehicle-lightbox__dialog{
  height: 100vh !important;
  max-height: 100vh !important;
  display: grid !important;
  grid-template-rows: 80vh 20vh !important;
}

/* Image always centered, can be smaller depending on aspect ratio */
.md-vehicle-lightbox__img{
  max-height: 80vh !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  align-self: center !important;
  justify-self: center !important;
}

/* Thumbnail row always visible */
.md-vehicle-lightbox__thumbs{
  height: 20vh !important;
  max-height: 20vh !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  padding-bottom: 10px !important;
}

/* If thumbs overflow, keep them usable without pushing layout */
.md-vehicle-lightbox__thumbs-inner,
.md-vehicle-lightbox__thumbs .md-vehicle-lightbox__thumbs-track,
.md-vehicle-lightbox__thumbs .md-vehicle-lightbox__thumbs-list{
  max-height: 100% !important;
}


/* === V12 Lightbox Thumbnail Refinement === */

/* Keep thumbnail row at 20vh but scale inner thumbs nicely */
.md-vehicle-lightbox__thumbs {
  height: 20vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow: hidden;
  padding: 10px 0;
  box-sizing: border-box;
}

/* Make thumbnails visually smaller inside the 20vh area */
.md-vehicle-lightbox__thumbs img {
  max-height: 14vh;
  width: auto;
  object-fit: cover;
  border-radius: 6px;
}

@media (max-width: 767px) {
  .md-vehicle-lightbox__thumbs img {
    max-height: 12vh;
  }
}


/* === V13 Lightbox: VH-based thumbs that truly fit in 20vh === */

.md-vehicle-lightbox__thumbs-wrap{
  height: 20vh !important;
  align-items: center;
}

.md-vehicle-lightbox__thumbs-viewport{
  height: 100% !important;
}

.md-vehicle-lightbox__thumbs-track{
  height: 100% !important;
  align-items: center;
  padding-bottom: 0 !important;
}

/* Buttons get a fixed vh-height so they can't grow taller than the thumb row */
.md-vehicle-lightbox__thumb{
  flex: 0 0 auto !important;
  width: clamp(120px, 18vw, 220px) !important;
  max-width: none !important;
  height: 14vh !important;
  max-height: 14vh !important;
}

.md-vehicle-lightbox__thumb img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

@media (max-width: 767px){
  .md-vehicle-lightbox__thumb{
    width: clamp(90px, 30vw, 160px) !important;
    height: 12vh !important;
    max-height: 12vh !important;
  }
}


/* === V14 Lightbox: thumbs padding + spacing (avoid left clip) === */

/* Give the viewport inner padding so first/last thumb never sits under arrows */
.md-vehicle-lightbox__thumbs-viewport{
  padding: 0 56px !important;
  box-sizing: border-box;
}

/* More spacing between thumbnails */
.md-vehicle-lightbox__thumbs-track{
  gap: 22px !important;
}

/* Slightly smaller thumbs so the row fits comfortably between arrows */
.md-vehicle-lightbox__thumb{
  width: clamp(105px, 16vw, 190px) !important;
  height: 13vh !important;
  max-height: 13vh !important;
}

@media (max-width: 767px){
  .md-vehicle-lightbox__thumbs-viewport{
    padding: 0 44px !important;
  }
  .md-vehicle-lightbox__thumbs-track{
    gap: 16px !important;
  }
  .md-vehicle-lightbox__thumb{
    width: clamp(88px, 26vw, 140px) !important;
    height: 11vh !important;
    max-height: 11vh !important;
  }
}


/* === V15 Lightbox: fix first-thumb clipping (scroll padding + snap center) === */

/* The scroll container: add real inner space + tell scrollIntoView/snap about it */
.md-vehicle-lightbox__thumbs-viewport{
  padding: 0 18px !important;              /* visible breathing room */
  scroll-padding-left: 18px !important;     /* prevents partial clipping when snapping/scrollIntoView */
  scroll-padding-right: 18px !important;
  box-sizing: border-box !important;
}

/* Slightly more spacing between thumbs */
.md-vehicle-lightbox__thumbs-track{
  gap: 24px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Make snap behavior center-based to avoid edge clipping on first/last items */
.md-vehicle-lightbox__thumb{
  scroll-snap-align: center !important;
  width: clamp(96px, 14vw, 175px) !important;
  height: 12.5vh !important;
  max-height: 12.5vh !important;
}

@media (max-width: 767px){
  .md-vehicle-lightbox__thumbs-viewport{
    padding: 0 14px !important;
    scroll-padding-left: 14px !important;
    scroll-padding-right: 14px !important;
  }
  .md-vehicle-lightbox__thumbs-track{
    gap: 18px !important;
  }
  .md-vehicle-lightbox__thumb{
    width: clamp(84px, 24vw, 132px) !important;
    height: 10.5vh !important;
    max-height: 10.5vh !important;
  }
}


/* === V16 Lightbox: ensure last thumbnail never clips === */

/* Add end padding to the scrolling content itself (works even when arrows overlap) */
.md-vehicle-lightbox__thumbs-track{
  padding-left: 18px !important;
  padding-right: 18px !important;
  box-sizing: border-box !important;
}

/* Give a bit more right scroll-padding to account for the right arrow hit-area */
.md-vehicle-lightbox__thumbs-viewport{
  scroll-padding-right: 36px !important;
}

@media (max-width: 767px){
  .md-vehicle-lightbox__thumbs-track{
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .md-vehicle-lightbox__thumbs-viewport{
    scroll-padding-right: 28px !important;
  }
}


/* === Way 1: Keep "outside" outline look without clipping (overlay ring) === */
.md-vehicle-lightbox__thumbs-wrap{
  position: relative;
}

.md-vehicle-lightbox__thumb-active-ring{
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border: 2px solid rgba(255,255,255,.85);
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
  box-sizing: border-box;
}

.md-vehicle-lightbox__thumb-active-ring.md-is-visible{
  opacity: 1;
}

.md-vehicle-lightbox__thumb.md-is-active{
  outline: none;
  outline-offset: 0;
}



/* === V16.5 Lightbox: more breathing room to bottom edge (match top spacing) === */
/* Add responsive vertical padding to the dialog so thumbs don't hug the bottom on smaller viewports. */

.md-vehicle-lightbox__dialog{
  padding-top: clamp(16px, 3vh, 32px) !important;
  padding-bottom: clamp(16px, 3vh, 32px) !important;
  box-sizing: border-box !important;
}

/* Ensure the image respects the new padding so it doesn't push thumbs down */
.md-vehicle-lightbox__img{
  max-height: calc(100vh - 20vh - (2 * clamp(16px, 3vh, 32px))) !important;
}


/* === V16.6 Lightbox: enforce equal top/bottom viewport inset so thumbs never touch window === */
/* If dialog content gets taller than viewport, margins/padding can visually disappear.
   Solution: cap dialog height and use a consistent viewport inset for both top and bottom. */

.md-vehicle-lightbox{
  --md-lb-inset: clamp(16px, 3vh, 32px);
}

/* Keep the whole dialog inside the viewport with equal inset */
.md-vehicle-lightbox__dialog{
  margin: var(--md-lb-inset) auto !important;
  max-height: calc(100vh - (2 * var(--md-lb-inset))) !important;
  padding-top: var(--md-lb-inset) !important;
  padding-bottom: var(--md-lb-inset) !important;
  overflow: hidden; /* prevents content pushing beyond inset */
}

/* Make sure the big image never pushes the thumbs below the dialog */
.md-vehicle-lightbox__img{
  max-height: calc(100vh - 20vh - (2 * var(--md-lb-inset)) - 24px) !important;
}


/* === V16.7 Lightbox: prevent bottom outline clipping on large viewports === */
/* Root cause: dialog overflow:hidden clips the active thumb outline/ring at the bottom.
   Fix: allow overflow on dialog and instead add explicit bottom space to the thumbs area. */

.md-vehicle-lightbox__dialog{
  overflow: visible !important;
}

/* Give the thumbnail strip its own bottom breathing room so nothing touches/clips at window edge */
.md-vehicle-lightbox__thumbs-wrap{
  padding-bottom: var(--md-lb-inset) !important;
  box-sizing: border-box !important;
}

/* Recompute image height so it doesn't push thumbs into the bottom padding */
.md-vehicle-lightbox__img{
  max-height: calc(100vh - 20vh - (3 * var(--md-lb-inset)) - 24px) !important;
}


/* === V16.8 Lightbox: consistent top/bottom inset via flex-centering (fix bottom hugging) ===
   Reason: dialog margin-based inset breaks once total content height approaches viewport;
   thumbs (20vh) + image can push the dialog down so bottom inset collapses.
   Fix: make the lightbox container a flex box with padding inset; keep dialog at max-height 100% of that area.
*/

.md-vehicle-lightbox{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--md-lb-inset) !important;
  box-sizing: border-box !important;
}

.md-vehicle-lightbox__dialog{
  margin: 0 !important;
  max-height: 100% !important; /* within the padded flex container */
  height: 100% !important;
}

/* Make sure the grid uses the available height: image area grows, thumbs stay 20vh */
.md-vehicle-lightbox__dialog{
  grid-template-rows: 1fr 20vh !important;
}

.md-vehicle-lightbox__img{
  max-height: 100% !important;
  align-self: center;
}

/* Thumbs wrap fills the 20vh row and keeps its own inner padding without pushing outside */
.md-vehicle-lightbox__thumbs-wrap{
  height: 100% !important;
  padding-bottom: 0 !important; /* padding handled by lightbox container inset */
}


/* === V16.9 Fix: prevent lightbox auto-opening (don't force display:flex when closed) ===
   V16.8 made .md-vehicle-lightbox display:flex!important which overrides the closed state (hidden).
   The gallery JS uses .md-is-open to show the lightbox, so we scope display/flex to that class.
*/

.md-vehicle-lightbox{
  display: none !important; /* closed by default */
}

/* Only when open */
.md-vehicle-lightbox.md-is-open{
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: var(--md-lb-inset) !important;
  box-sizing: border-box !important;
}


/* === V16.10 Lightbox: force full 100vh layout so thumbnails never disappear === */
/* Make the open lightbox a full-height flex container, and the dialog a 2-row grid:
   - row 1: image (fills remaining space, can shrink)
   - row 2: thumbs (always visible, fixed min height, up to 20vh)
*/

.md-vehicle-lightbox.md-is-open{
  height: 100vh !important;
  min-height: 100vh !important;
}

.md-vehicle-lightbox.md-is-open .md-vehicle-lightbox__dialog{
  height: 100% !important;
  max-height: 100% !important;
  display: grid !important;
  grid-template-rows: minmax(0, 1fr) minmax(96px, 20vh) !important;
}

/* Ensure the image area can shrink and doesn't push the thumbs out */
.md-vehicle-lightbox__imgwrap,
.md-vehicle-lightbox__main{
  min-height: 0 !important;
}

.md-vehicle-lightbox__img{
  max-height: 100% !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

/* Thumbs row is always present */
.md-vehicle-lightbox__thumbs-wrap{
  min-height: 96px !important;
  height: 100% !important;
  align-self: stretch !important;
}


/* === V16.11 Lightbox Variant A: mathematically equal top/bottom spacing ===
   Enforce a single viewport inset variable and compute dialog height from it.
   This guarantees identical top and bottom gaps regardless of content. */

.md-vehicle-lightbox{
  --md-lb-inset: clamp(16px, 3vh, 32px);
}

/* Fullscreen overlay with equal padding on all sides */
.md-vehicle-lightbox.md-is-open{
  padding: var(--md-lb-inset) !important;
  box-sizing: border-box !important;
  height: 100vh !important;
  min-height: 100vh !important;
}

/* Dialog occupies exactly the padded area (so top gap == bottom gap) */
.md-vehicle-lightbox.md-is-open .md-vehicle-lightbox__dialog{
  height: calc(100vh - (2 * var(--md-lb-inset))) !important;
  max-height: calc(100vh - (2 * var(--md-lb-inset))) !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Ensure no extra bottom spacing is introduced by thumbs container */
.md-vehicle-lightbox__thumbs-wrap,
.md-vehicle-lightbox__thumbs-viewport,
.md-vehicle-lightbox__thumbs-track{
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}


/* === V16.12 Lightbox Variant B: optically balanced spacing (top/bottom look equal) ===
   Keep overall fullscreen geometry, but:
   - make top inset slightly larger than bottom inset (visual compensation)
   - slightly reduce thumbs row height so the bottom doesn't feel heavier
*/

.md-vehicle-lightbox{
  --md-lb-inset-top: clamp(18px, 3.2vh, 36px);
  --md-lb-inset-bottom: clamp(14px, 2.4vh, 28px);
  --md-lb-thumbs-h: minmax(88px, 18vh);
}

/* Override Variant A padding with compensated top/bottom */
.md-vehicle-lightbox.md-is-open{
  padding-top: var(--md-lb-inset-top) !important;
  padding-bottom: var(--md-lb-inset-bottom) !important;
}

/* Dialog fits within the asymmetric insets */
.md-vehicle-lightbox.md-is-open .md-vehicle-lightbox__dialog{
  height: calc(100vh - (var(--md-lb-inset-top) + var(--md-lb-inset-bottom))) !important;
  max-height: calc(100vh - (var(--md-lb-inset-top) + var(--md-lb-inset-bottom))) !important;
}

/* Keep thumbs always visible but a touch smaller */
.md-vehicle-lightbox.md-is-open .md-vehicle-lightbox__dialog{
  grid-template-rows: minmax(0, 1fr) var(--md-lb-thumbs-h) !important;
}

/* Add a subtle separator gap so the bottom block feels less "stuck" */
.md-vehicle-lightbox__thumbs-wrap{
  padding-top: clamp(6px, 0.8vh, 10px) !important;
}


/* === V16.13 Detail-Gallery tweaks === */
/* 1) Fixed main gallery height (embedded on detail page) */
.md-vehicle-gallery__main{
  height: 500px; /* requested fixed height */
}
.md-vehicle-gallery__main-btn{
  height: 100%;
}
.md-vehicle-gallery__main-img{
  height: 100%;
  object-fit: contain; /* keep full image visible */
}

/* 2) Consistent thumbnail boxes (independent of image aspect ratio) */
.md-vehicle-gallery__thumb{
  height: 72px;
}
.md-vehicle-gallery__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover; /* fill box consistently */
  display: block;
}

/* 3) Active outline without edge clipping: use overlay ring like Lightbox */
.md-vehicle-gallery__thumb.md-is-active{
  outline: none;
  outline-offset: 0;
}
.md-vehicle-gallery__thumbs-wrap{
  position: relative;
}
.md-vehicle-gallery__thumb-active-ring{
  position: absolute;
  left: 0;
  top: 0;
  border: 2px solid rgba(255, 255, 255, 0.55);
  pointer-events: none;
  box-sizing: border-box;
  border-radius: 6px;
  opacity: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity .12s ease;
  z-index: 5;
}
.md-vehicle-gallery__thumb-active-ring.md-is-visible{ opacity: 1; }


/* === V16.14 Gallery tweaks === */

/* Thumbnails: fixed height 80px */
.md-vehicle-gallery__thumb{
  height: 80px !important;
}
.md-vehicle-gallery__thumb img{
  height: 100% !important;
}

/* Main image: fill the 500px box (zoom/crop as needed) */
.md-vehicle-gallery__main img{
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 1rem;
}


/* === V16.15 Gallery: reduce overall height by 100px (main from 500px -> 400px) === */
.md-vehicle-gallery__main{
  height: 400px !important;
}


/* --- Detail: Beschreibung (Shortcode [md_vehicle_description]) --- */
.md-vehicle-description {
  white-space: normal;
}
.md-vehicle-description ul,
.md-vehicle-description ol {
  margin: 0.75em 0 0.75em 1.25em;
  padding: 0;
  list-style: disc;
}
.md-vehicle-description li {
  display: list-item !important;
  margin: 0.15em 0;
}
/* Falls das Theme Separatoren via ::before einfügt (z.B. ' - '), deaktivieren wir das hier. */
.md-vehicle-description li::before {
  content: none !important;
}

/* Beschreibung: robuste "Pseudo-Markdown" Darstellung ohne ul/li (verhindert Theme-Overrides) */
.md-vehicle-description .md-desc-line{
  display:block;
  margin: 0.15em 0;
}
.md-vehicle-description .md-desc-gap{
  display:block;
  height: 0.75em;
}
.md-vehicle-description .md-desc-hr{
  margin: 0.9em 0;
}
.md-vehicle-description .md-desc-list{
  margin: 0.35em 0 0.6em 0;
}
.md-vehicle-description .md-desc-item{
  display:block;
  margin: 0.12em 0;
  padding-left: 1.1em;
  position: relative;
}
.md-vehicle-description .md-desc-item::before{
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
}


/* --- Description formatting (mobile.de-like) --- */
.md-vehicle-description.md-desc { line-height: 1.5; }
.md-vehicle-description.md-desc .md-desc-heading { font-weight: 700; margin: 14px 0 6px; }
.md-vehicle-description.md-desc .md-desc-paragraph { margin: 0 0 10px; }
.md-vehicle-description.md-desc .md-desc-hr { border: 0; border-top: 1px solid rgba(0,0,0,.12); margin: 12px 0; }
.md-vehicle-description.md-desc .md-desc-list { margin: 0 0 12px 18px; padding: 0; }
.md-vehicle-description.md-desc .md-desc-list li { display: list-item !important; list-style: disc !important; margin: 0 0 6px; }
.md-vehicle-description.md-desc .md-desc-list li::before { content: none !important; }
.md-vehicle-description.md-desc strong { font-weight: 700 !important; }


.md-vehicle-description strong{font-weight:700 !important;}

/* Gallery Pfeile weiß */
.md-vehicle-gallery .slick-prev,
.md-vehicle-gallery .slick-next {
    color: #ffffff !important;
}

.md-vehicle-gallery .slick-prev:before,
.md-vehicle-gallery .slick-next:before {
    color: #ffffff !important;
}

.md-vehicle-gallery .slick-prev svg,
.md-vehicle-gallery .slick-next svg {
    fill: #ffffff !important;
}

/* Gallery Thumbnail-Pfeile (Prev/Next) weiß */
.md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow,
.md-vehicle-detail .md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow{
    color: #ffffff !important;
}

.md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow .icon,
.md-vehicle-detail .md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow .icon{
    color: inherit !important;
}

/* Gallery Pfeile Styling + Hover */
.md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow,
.md-vehicle-detail .md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow{
    color: rgba(255,255,255,0.75) !important; /* dunkleres Weiß */
    transition: all 0.25s ease;
}

.md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow:hover,
.md-vehicle-detail .md-vehicle-gallery .md-vehicle-gallery__thumbs-arrow:hover{
    color: #ffffff !important; /* helles Weiß */
    transform: scale(1.08);
}

/* Thumbnail Outline Farbe angepasst */
.md-vehicle-gallery__thumb,
.md-vehicle-gallery__thumb.slick-current,
.md-vehicle-gallery__thumb:hover {
    border-color: rgba(255,255,255,0.75) !important;
}


/* ==========================================================================
   Fahrzeug-Archiv Toolbar
   ========================================================================== */
.md-vehicle-archive-wrap .md-vehicle-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin:0 0 28px;
  padding:7px 7px 7px 30px;
  background:#fff;
  border:1px solid rgba(17,24,39,.08);
  border-radius:1rem;
  box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
}

.md-vehicle-archive-wrap .md-vehicle-toolbar__count{
  font-size:16px;
  font-weight:500;
  line-height:1.3;
  color:#161616;
}

.md-vehicle-archive-wrap .md-vehicle-toolbar__actions{
  margin-left:auto;
}

.md-vehicle-archive-wrap .md-vehicle-sort-wrap{
  position:relative;
  display:inline-block;
}

.md-vehicle-archive-wrap .md-vehicle-sort-select{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  clip-path:inset(50%);
  border:0;
  white-space:nowrap;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-width:220px;
  height:48px;
  padding:0 16px;
  border:1px solid #d1d5db;
  border-radius:1rem;
  background:#f7f7f8;
  color:#161616;
  font-size:15px;
  font-weight:500;
  line-height:1.2;
  cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
  transition:border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger:hover{
  background-color:#fff;
  border:1px solid #d1d5db;
  border-radius:1rem;
  border-color:#d1d5db;
  color:#161616;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger:hover .md-vehicle-sort-trigger__label,
.md-vehicle-archive-wrap .md-vehicle-sort-trigger:hover .md-vehicle-sort-trigger__icon,
.md-vehicle-archive-wrap .md-vehicle-sort-trigger:focus .md-vehicle-sort-trigger__label,
.md-vehicle-archive-wrap .md-vehicle-sort-trigger:focus-visible .md-vehicle-sort-trigger__label,
.md-vehicle-archive-wrap .md-vehicle-sort-wrap.is-open .md-vehicle-sort-trigger .md-vehicle-sort-trigger__label{
  color:#111827;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger:focus,
.md-vehicle-archive-wrap .md-vehicle-sort-trigger:focus-visible,
.md-vehicle-archive-wrap .md-vehicle-sort-wrap.is-open .md-vehicle-sort-trigger{
  outline:none;
  border-color:#324B9B;
  border-radius:1rem;
  box-shadow:0 0 0 3px rgba(50,75,155,.16);
  background-color:#fff;
  color:#111827;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger__label{
  display:block;
  text-align:left;
  white-space:nowrap;
  color:#111827;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger__icon{
  position:relative;
  width:12px;
  height:12px;
  flex:0 0 12px;
}

.md-vehicle-archive-wrap .md-vehicle-sort-trigger__icon::before{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:7px;
  height:7px;
  border-right:2px solid #374151;
  border-bottom:2px solid #374151;
  transform:translate(-50%, -62%) rotate(45deg);
  transform-origin:center;
  transition:transform .2s ease;
}

.md-vehicle-archive-wrap .md-vehicle-sort-wrap.is-open .md-vehicle-sort-trigger__icon::before{
  transform:translate(-50%, -38%) rotate(-135deg);
}

.md-vehicle-archive-wrap .md-vehicle-sort-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:30;
  min-width:260px;
  padding:8px;
  border:1px solid rgba(17,24,39,.10);
  border-radius:1rem;
  background:#fff;
  box-shadow:0 18px 40px rgba(0,0,0,.18);
  opacity:0;
  visibility:hidden;
  transform:translateY(6px);
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.md-vehicle-archive-wrap .md-vehicle-sort-wrap.is-open .md-vehicle-sort-dropdown{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
  pointer-events:auto;
}

.md-vehicle-archive-wrap .md-vehicle-sort-option{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:#111827;
  font-size:15px;
  font-weight:500;
  line-height:1.3;
  text-align:left;
  cursor:pointer;
  transition:background-color .16s ease, color .16s ease;
}

.md-vehicle-archive-wrap .md-vehicle-sort-option:hover{
  background:#f3f6ff;
  color:#111827;
  border-color:transparent;
}

.md-vehicle-archive-wrap .md-vehicle-sort-option:focus,
.md-vehicle-archive-wrap .md-vehicle-sort-option:focus-visible{
  outline:none;
  background:#f3f6ff;
  box-shadow:0 0 0 2px rgba(50,75,155,.16) inset;
}

.md-vehicle-archive-wrap .md-vehicle-sort-option__check{
  width:16px;
  height:16px;
  flex:0 0 16px;
  position:relative;
}

.md-vehicle-archive-wrap .md-vehicle-sort-option.is-selected .md-vehicle-sort-option__check::before{
  content:'';
  position:absolute;
  left:2px;
  top:2px;
  width:9px;
  height:5px;
  border-left:2px solid #324B9B;
  border-bottom:2px solid #324B9B;
  transform:rotate(-45deg);
}

.md-vehicle-archive-wrap .md-vehicle-sort-option.is-selected{
  color:#324B9B;
  background:#f5f7ff;
}

@media (max-width: 767px){
  .md-vehicle-archive-wrap .md-vehicle-toolbar{
    align-items:stretch;
    padding:14px;
  }

  .md-vehicle-archive-wrap .md-vehicle-toolbar__actions{
    margin-left:0;
    width:100%;
  }

  .md-vehicle-archive-wrap .md-vehicle-sort-wrap,
  .md-vehicle-archive-wrap .md-vehicle-sort-trigger,
  .md-vehicle-archive-wrap .md-vehicle-sort-dropdown{
    width:100%;
    min-width:0;
  }

  .md-vehicle-archive-wrap .md-vehicle-sort-dropdown{
    left:0;
    right:auto;
  }
}


