/* Supplemental restoration styles. Load after the archived dealer stylesheet. */
:root {
  --restore-accent: #ab0000;
  --restore-border: #dcdcdc;
  --restore-muted: #555;
  --restore-focus: #0768c8;
}

[hidden] { display: none !important; }

.restore-skip {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 100;
  padding: .7rem 1rem;
  transform: translateY(-200%);
  background: #fff;
  color: #111;
  border: 2px solid #ab0000;
}
.restore-skip:focus { transform: translateY(0); }
main { min-width: 0; overflow-wrap: anywhere; }
main img { max-width: 100%; }
.restore-content-rule { margin: 1.75rem 0; border: 0; border-top: 1px solid #999; }
.WelcomeText { clear: both; padding-top: 1.5rem; }
.html-banner h3 { font-size: clamp(1.65rem, 4.6vw, 4.5rem); line-height: 1.1; }
.html-banner strong { font-size: clamp(1.1rem, 2.6vw, 2rem); white-space: normal; }
.restore-large-price { color: var(--restore-accent); font-size: 1.8rem; font-weight: 700; }

.restore-archive-bar {
  padding: .4rem 1rem;
  border-bottom: 1px solid var(--restore-border);
  background: #f2f2f2;
  color: #444;
  font-size: .8rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.restore-archive-bar p { margin: 0; }
.restore-archive-bar a { color: inherit; text-decoration: underline; }
.restore-page-note {
  margin: .75rem 0 1.25rem;
  padding: .65rem .85rem;
  border-left: 3px solid #999;
  background: #f4f4f4;
  color: #4b4b4b;
  font-size: .875rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.restore-panel {
  min-width: 0;
  margin: 1rem 0;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--restore-border);
  border-radius: .25rem;
  background: #fff;
  color: #272727;
  overflow-wrap: anywhere;
}
.restore-panel > :last-child { margin-bottom: 0; }

.restore-catalog-controls,
#restoreInventoryControls {
  display: grid;
  grid-template-columns: minmax(12rem, 2fr) repeat(4, minmax(7.5rem, 1fr)) auto;
  align-items: end;
  gap: .8rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid var(--restore-border);
  border-radius: .25rem;
  background: #fff;
}
#restoreInventoryControls > *, .restore-catalog-controls > * { min-width: 0; }
#restoreInventoryControls label, .restore-catalog-controls label {
  display: block;
  margin: 0;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
}
#restoreInventoryControls input,
#restoreInventoryControls select,
.restore-catalog-controls input,
.restore-catalog-controls select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
  margin: .3rem 0 0;
  padding: .5rem .65rem;
  border: 1px solid #b9b9b9;
  border-radius: .2rem;
  background: #fff;
  color: #272727;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
}
#restoreInventoryControls button {
  min-height: 2.75rem;
  padding: .5rem .9rem;
  white-space: normal;
}
#restoreInventoryControls [aria-invalid="true"] { border-color: var(--restore-accent); }
#r-count {
  margin: .75rem 0;
  color: var(--restore-muted);
  font-size: .9rem;
}
#r-empty {
  padding: 2rem 1rem;
  border: 1px solid var(--restore-border);
  background: #fff;
  text-align: center;
}
#restoreVehicleList { min-width: 0; }
.restore-vehicle {
  display: grid;
  grid-template-columns: minmax(12rem, 29%) minmax(0, 1fr) minmax(9rem, 17%);
  align-items: start;
  gap: 1.25rem;
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid var(--restore-border);
  border-radius: .25rem;
  background: #fff;
  color: #272727;
}
.restore-vehicle > * { min-width: 0; }
.restore-card-photo { display: block; min-width: 0; margin: 0; }
.restore-card-photo > a { display: block; }
.restore-card-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: .15rem;
  object-fit: cover;
  background: #eee;
}
.restore-card-main { overflow-wrap: anywhere; }
.restore-card-main h2, .restore-card-main h3 {
  margin: 0 0 .75rem;
  font-size: 1.25rem;
  line-height: 1.35;
}
.restore-card-main p { margin-bottom: .5rem; }
.restore-card-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem 1rem;
  margin: .75rem 0;
  padding: 0;
  color: #444;
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.restore-card-specs > * { min-width: 0; margin: 0; }
ul.restore-card-specs { list-style: none; }
.restore-card-price {
  padding-left: 1rem;
  border-left: 1px solid #e6e6e6;
  overflow-wrap: anywhere;
}
.restore-card-price strong,
.restore-card-price .restore-price {
  display: block;
  margin: .2rem 0 .5rem;
  color: var(--restore-accent);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.25;
}
.restore-card-price small { display: block; color: var(--restore-muted); line-height: 1.5; }
.restore-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0 0;
}
.restore-actions .btn,
.restore-actions button,
.restore-actions > a {
  max-width: 100%;
  min-height: 2.75rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.restore-actions .btn { display: inline-flex; align-items: center; justify-content: center; }

.restore-vdp-hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
  gap: 1.5rem;
  margin: 1rem 0 1.5rem;
}
.restore-vdp-hero > * { min-width: 0; overflow-wrap: anywhere; }
.restore-vdp-hero > a { display: block; }
.restore-vdp-hero img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: .2rem;
}
.restore-specs {
  display: grid;
  grid-template-columns: minmax(6rem, .38fr) minmax(0, .62fr);
  gap: .5rem 1rem;
  margin: 1rem 0;
  padding: 0;
  line-height: 1.5;
}
.restore-specs dt, .restore-specs dd {
  min-width: 0;
  margin: 0;
  padding: .25rem 0;
  overflow-wrap: anywhere;
}
.restore-specs dt { font-weight: 600; color: #444; }
.restore-specs dd { color: #272727; }
.restore-specs > div {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(6rem, .38fr) minmax(0, .62fr);
  gap: 1rem;
}
.restore-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.restore-gallery > * { min-width: 0; margin: 0; }
.restore-gallery a[data-zoom] { display: block; border-radius: .2rem; }
.restore-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border: 1px solid #dedede;
  border-radius: .2rem;
  background: #eee;
  object-fit: cover;
}
.restore-gallery figcaption { margin: .35rem 0 0; font-size: .8rem; line-height: 1.5; }
.restore-feature-list { columns: 2; column-gap: 2.5rem; padding-left: 1.25rem; }
.restore-feature-list li { break-inside: avoid; padding: .2rem 0; overflow-wrap: anywhere; }
.restore-missing-photo {
  display: grid;
  place-content: center;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
  margin: 0;
  padding: 1rem;
  border: 1px dashed #bbb;
  border-radius: .2rem;
  background: #f3f3f3;
  color: #555;
  text-align: center;
  font-size: .9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.restore-missing-photo > :last-child { margin-bottom: 0; }
.restore-article { min-width: 0; line-height: 1.7; overflow-wrap: anywhere; }
.restore-article img { max-width: 100%; height: auto; }
.restore-article iframe, .restore-article video { max-width: 100%; }
.restore-article table { display: block; max-width: 100%; overflow-x: auto; }
.restore-article h2, .restore-article h3 { line-height: 1.35; }
.restore-site-map { columns: 3 15rem; column-gap: 2rem; overflow-wrap: anywhere; }
.restore-site-map li { break-inside: avoid; padding: .25rem 0; }
.restore-site-map section { break-inside: avoid; margin-bottom: 1.25rem; }

.restore-disabled-form fieldset[disabled] {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 1;
}
.restore-disabled-form input:disabled,
.restore-disabled-form select:disabled,
.restore-disabled-form textarea:disabled,
.restore-disabled-form button:disabled { opacity: 1; }
.restore-disabled-form button:disabled { cursor: not-allowed; }
.restore-disabled-form .restore-form-note,
.restore-disabled-form .restore-disabled-note,
.restore-disabled-note {
  margin: 0 0 1rem;
  padding: .85rem 1rem;
  border: 1px solid #c8c8c8;
  border-left: 3px solid #777;
  border-radius: .2rem;
  background: #f4f4f4;
  color: #333;
  font-size: .9rem;
  line-height: 1.6;
}
#txtMonthlyPayment { overflow-wrap: anywhere; line-height: 1.35; }

/* Keep the original navigation colours and layout, adding separate toggles. */
.s26r_menuWrapper { position: relative; z-index: 20; }
#siteNav .dropdown { position: relative; }
#siteNav .dropdown-menu.show { display: block; visibility: visible; opacity: 1; }
#siteNav .dropdown-menu .dropdown-item { white-space: normal; overflow-wrap: anywhere; }
.restore-dropdown-toggle {
  display: inline-flex;
  flex: 0 0 2rem;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2.75rem;
  margin: 0;
  padding: .25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
}
.restore-dropdown-toggle:hover,
.restore-dropdown-toggle[aria-expanded="true"] { background: #5f0000; color: #fff; }
body.js-ready #siteNav .dropdown > .nav-link.dropdown-toggle::after { display: none; }
body:not(.js-ready) .restore-dropdown-toggle,
body:not(.js-ready) #s26r_menu .siteMenu { display: none; }

/* Manual carousel controls do not introduce animations or replace banners. */
#myCarousel { position: relative; }
.restore-carousel-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  margin: 0;
  padding: .3rem .7rem;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: .2rem;
  background: rgba(0, 0, 0, .65);
  color: #fff;
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.restore-carousel-control[data-slide="prev"] { left: .6rem; }
.restore-carousel-control[data-slide="next"] { right: .6rem; }
.restore-carousel-control:hover { background: #181818; color: #fff; }
#myCarousel .carousel-item img { max-width: 100%; height: auto; }
#myCarousel [data-slide-to][role="button"] { cursor: pointer; }

#restoreImageDialog {
  width: min(70rem, calc(100% - 2rem));
  max-width: calc(100% - 2rem);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 1rem;
  border: 1px solid #bbb;
  border-radius: .3rem;
  background: #fff;
  color: #272727;
  box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .4);
  overflow: auto;
}
#restoreImageDialog:not([open]) { display: none; }
#restoreImageDialog::backdrop { background: rgba(0, 0, 0, .8); }
#restoreImageDialog .restore-dialog-bar,
#restoreImageDialog .restore-dialog-closebar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .6rem;
}
#restoreImageDialog [data-dialog-close] {
  display: block;
  min-height: 2.75rem;
  margin: 0 0 .6rem auto;
  padding: .45rem .8rem;
  border: 1px solid #aaa;
  border-radius: .2rem;
  background: #f5f5f5;
  color: #222;
  font: inherit;
  cursor: pointer;
}
#restoreDialogImage {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  margin: 0 auto;
  object-fit: contain;
}
#restoreDialogCaption { margin: .75rem 0 0; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }

:is(.restore-panel, .restore-article, .restore-vehicle, .restore-actions, .restore-gallery, .restore-site-map) a:focus-visible,
#restoreInventoryControls :is(input, select, button):focus-visible,
#siteNav :is(a, button):focus-visible,
.siteMenu:focus-visible,
.restore-carousel-control:focus-visible,
#myCarousel [data-slide-to]:focus-visible,
#restoreImageDialog button:focus-visible,
:is(#txtLoanAmount, #txtDownPayment, #txtInterestRate, #txtYear, #ButtonCalculate):focus-visible {
  outline: 3px solid var(--restore-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}

@media (min-width: 992px) {
  #siteNav .nav-item.dropdown { display: flex; align-items: stretch; }
  #siteNav .nav-item.dropdown > .nav-link { flex: 1 1 auto; min-width: 0; }
  #siteNav .dropdown-menu { min-width: 13rem; max-width: min(24rem, 90vw); }
  body:not(.js-ready) #siteNav .dropdown:hover > .dropdown-menu,
  body:not(.js-ready) #siteNav .dropdown:focus-within > .dropdown-menu { display: block; }
}

@media (max-width: 1199.98px) {
  .restore-catalog-controls, #restoreInventoryControls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  .slidesWrapper .ResponsiveSearch {
    display: block;
    position: static;
    width: auto;
    margin: 1rem 0;
    padding: .5rem 1rem;
    background: #292929;
  }
  .slidesWrapper .ResponsiveSearch .search-wrap,
  .slidesWrapper .ResponsiveSearch .responsiveSearch { display: block !important; }
  .slidesWrapper .ResponsiveSearch .search-toggle { pointer-events: none; padding: 0; background: transparent; }
  .slidesWrapper .ResponsiveSearch #ResponsiveSearchForm { width: 100%; }
  .slidesWrapper .ResponsiveSearch :is(input, select) { min-height: 2.75rem; font-size: 1rem; }
  #s26r_menu #siteNav { display: block; }
  body.js-ready #s26r_menu #siteNav:not(.show) { display: none; }
  body.js-ready #s26r_menu #siteNav.show { display: block; }
  #siteNav .nav-item.dropdown { display: flex; flex-wrap: wrap; align-items: stretch; }
  #siteNav .nav-item.dropdown > .nav-link { flex: 1 1 calc(100% - 3rem); min-width: 0; }
  #siteNav .restore-dropdown-toggle { flex: 0 0 3rem; width: 3rem; }
  #siteNav .dropdown-menu { position: static; flex: 1 0 100%; width: 100%; min-width: 0; max-width: 100%; }
  body:not(.js-ready) #siteNav .dropdown-menu { display: block; }
  .restore-vehicle { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .restore-card-price { grid-column: 2; padding: .75rem 0 0; border-left: 0; border-top: 1px solid #e6e6e6; }
  .restore-vdp-hero { gap: 1rem; }
}

@media (max-width: 767.98px) {
  .restore-archive-bar { padding: .4rem .75rem; font-size: .75rem; }
  .restore-catalog-controls, #restoreInventoryControls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .restore-catalog-controls > :first-child, #restoreInventoryControls > :first-child { grid-column: 1 / -1; }
  .restore-vdp-hero { grid-template-columns: minmax(0, 1fr); }
  .restore-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .restore-feature-list { columns: 1; }
  .restore-panel { padding: 1rem; }
  #restoreImageDialog { width: calc(100% - 1rem); max-width: calc(100% - 1rem); padding: .65rem; }
  .restore-carousel-control[data-slide="prev"] { left: .35rem; }
  .restore-carousel-control[data-slide="next"] { right: .35rem; }
}

@media (max-width: 575.98px) {
  .slidesWrapper .ResponsiveBanner { display: block; }
  .ResponsiveFilterByType, .ResponsiveMakeList { float: none; width: 100%; }
  .FilterByType_Main ul { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; padding: 0; }
  .FilterByType_Main ul li { width: auto; margin: 0; }
  #MakeFilterDiv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem .8rem; }
  #MakeFilterDiv .FilterLink { width: auto; float: none; margin: 0; }
  .restore-vehicle { grid-template-columns: minmax(0, 1fr); gap: .85rem; padding: .85rem; }
  .restore-card-price { grid-column: auto; }
  .restore-card-specs { column-gap: .75rem; }
  .restore-actions { align-items: stretch; }
  .restore-actions .btn { flex: 1 1 auto; }
  .restore-specs { grid-template-columns: minmax(5.5rem, .4fr) minmax(0, .6fr); gap: .4rem .75rem; }
  .restore-site-map { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  #myCarousel *,
  #siteNav *,
  .restore-carousel-control,
  .restore-vehicle *,
  .restore-gallery *,
  #restoreImageDialog * {
    animation: none !important;
    transition: none !important;
  }
}
