/* Overlay behind mMega Menus */
.mega-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.mega-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.nav-wrap {
  z-index:9999;
}
.mega {
  z-index:9500;
}
.nav-wrap {
  z-index: 9999;
}
.mega {
  z-index: 9500;
}
#showroomToggle {
  cursor: pointer;
}

/* Mega Container */
.mega {
  width: 94%;
  position: fixed; 
  left: 3%;
  right: 3%;
  top: var(--navwrap-h, 80px);  /* set by JS */
  max-height: calc(100vh - var(--navwrap-h, 80px));
  overflow: auto;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  z-index: 50;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

/* Visible State */
.mega.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (min-width: 768px) {
    .mega.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
        top: 115px;
    }
}
.mega-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Radio Filter Pills (Simple) */
#megaShowroom label {
  user-select: none;
}
#megaShowroom input[type="radio"] {
  appearance: none;
  min-width: 18px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #9ca3af;
  display: grid;
  place-items: center;
}
#megaShowroom input[type="radio"]::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #111;
  transform: scale(0);
  transition: transform .12s ease;
}
@media (max-width: 767px) {
  #megaShowroom input[type="radio"]::after {
    width: 10px;
    height: 10px;
  }
}
#megaShowroom input[type="radio"]:checked {
  border-color: #111;
}
#megaShowroom input[type="radio"]:checked::after {
  transform: scale(1);
}
.car-card-img {
    transform: rotateY(180deg);
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}

/* Custom Showroom Radios */
.sr-radio {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #9ca3af;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#srFilters label, #srFilters label input {
  cursor: pointer;
}
#srFilters span {
  color: #333;
  line-height: 1;
  position: relative;
  top: 1px;
}

.sr-radio::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
  transform: scale(0);
  transition: transform .12s ease;
}
.sr-radio:checked {
  border-color: #111;
}
.sr-radio:checked::after {
  transform: scale(1);
}

/* Hover underline */
.filter-link {
  position: relative;
  display: inline-block;
  font-size: 12px;
  opacity: .95;
  margin-top: 4px;
  letter-spacing: .02em;
  color: #333;
}
.filter-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease;
}
.filter-link:hover::before {
  width: 100%;
}
.filter-links a.filter-link:not(:last-child)::after {
  content: ">";
  margin-left: 6px;
  color: #000;
  opacity: 0.6;
}

/* Dropdown Container */
.nav-dropdown {
  position: relative;
}
/* Panel */
.dropdown {
  position: absolute;
  top: 185%;
  left: 0;
  width: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  border-radius: 2px;
  transform: translateY(50px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 9800;
}
/* Visible State */
.dropdown.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* Items */
.dropdown-link {
  display: block;
  padding: 14px 18px;
  color: #0f172a;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}
.dropdown-link:last-child {
  border-bottom: 0;
}
.dropdown-link:hover {
  color: #e11d2e !important;
}
/* Container must be relative */
.nav-dropdown {
  position: relative;
}

/* Panel */
.dropdown-panel {
  position: absolute;
  top: calc(100% + 28px);
  left: 0;
  width: 260px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  border-radius: 2px;
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  z-index: 9999;
}
@media (max-width: 767px) {
  .dropdown-panel {
    top: 100% !important;
  }
}
#navMobile .dropdown-panel {
  position: static;
  width: 100%;
  transform: none;
  opacity: 1;
  pointer-events: auto;
  box-shadow: none;
  border: 0;
  margin-top: 0;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (max-width: 767px) {
  .mega.mega-inline {
    position: static;
    width: 100%;
    left: auto;
    right: auto;
    top: auto;
    max-height: none;
    overflow: visible;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    box-shadow: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    margin: 0;
  }
}
/* Visible */
.dropdown-panel.is-open{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
/* optional alignments per class */
.dropdown-panel.align-left  {
  left: 0;
  right: auto;
}
.dropdown-panel.align-right {
  right: 0;
  left: auto;
}
/* Items */
.dropdown-link {
  display: block;
  padding: 14px 18px;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}
.dropdown-link:last-child {
  border-bottom: 0;
}
.dropdown-link:hover {
  color: #e11d2e !important;
}

/* Cars */
.new-car {
  position: absolute;
  top: 0;
  right: 0;
  border: 1px solid #eb1111;
  border-radius: 5px;
  padding: 0.1vh 1vh;
  color: #eb1111;
  font-size: 1.8vh;
}

/* Mobile: Showroom-Button wie Link rendern */
#showroomToggleMobile {
  background: none;
    border-bottom: 1px solid #e5e7eb;
  color: inherit;
  font: inherit;
  padding-left: 16px;
  padding-right: 16px;
  cursor: pointer;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#navToggle{
  border: 0;
  font-size: 25px;
}
.nav-main .item {
  font-size: 1.8vh;
}