/* Ray's Classics public theme: the old site's green page, black frame and header, made fluid. */
*, *::before, *::after { box-sizing: border-box; }
:root { --page: #b4ce9c; --panel: #a4be8c; --green: #0b5a37; --red: #900; }
body { margin: 0; color: #000; background: #fff; font: 11pt/1.45 Verdana, Helvetica, Arial, sans-serif; }
img { max-width: 100%; height: auto; }
a { color: #00e; }
h1, h2, p { margin: 0 0 12px; }
.wrapper { background: var(--page); max-width: 908px; min-height: 100vh; margin: 0 auto; border: 4px solid #000; display: flex; flex-direction: column; }
main { flex: 1; padding-bottom: 20px; }

.site-header { position: relative; background: var(--green) url("/assets/header-tile-298a6593.gif") repeat-x; min-height: 90px; }
.site-header .logo { display: block; height: 90px; overflow: hidden; }
.site-header .logo img { display: block; height: 90px; width: auto; max-width: none; }
.site-header nav { position: absolute; right: 6px; bottom: 8px; display: flex; gap: 6px; }
.site-header nav a { color: #fffafa; font-weight: bold; font-size: 14px; text-decoration: none; padding: 9px 14px; border: 1px solid #cdb88a; border-radius: 4px; background: #5b4a2a; }
.site-header nav a:hover, .site-header nav a:focus-visible { background: #7a6537; color: #fff; }

.headline { padding: 20px; text-align: center; }
.headline h1 { font-size: 24px; font-weight: normal; }
.headline p { font-size: 18px; }
.page-title { text-align: center; margin: 20px 10px; font-size: 1.8em; }
.text-page { margin: 20px; }
.text-page .lead { font-size: 1.3em; font-weight: bold; }
.fine-print { margin: 24px 50px 0; font-size: .9em; }
.empty, .more { text-align: center; margin: 20px; }

.featured-card { display: block; max-width: 650px; margin: 0 auto 24px; padding: 0 10px; text-align: center; text-decoration: none; font-weight: bold; }
.featured-card img { display: block; width: 100%; border: 1px solid #000; border-radius: 5px; box-shadow: 2px 2px 5px #555; margin-bottom: 6px; }

.listing { display: flex; gap: 14px; margin: 0 10px 10px; padding-bottom: 10px; border-bottom: 1px solid #000; text-decoration: none; color: #000; }
.listing:hover { background: var(--panel); }
.listing-photo { flex: 0 0 160px; }
.listing-photo img, .no-photo { display: block; width: 160px; border: 1px solid #000; border-radius: 5px; background: var(--page); box-shadow: 2px 2px 5px #555; }
.no-photo { padding: 40px 10px; text-align: center; color: #333; }
.listing-text { flex: 1; min-width: 0; }
.listing-text h2 { font-size: 1.35em; color: #00e; overflow-wrap: anywhere; }
.badges { float: right; margin-left: 8px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px; justify-content: flex-end; max-width: 50%; }

.vehicle { display: flex; flex-direction: row-reverse; gap: 20px; padding: 20px; }
.gallery { flex: 0 0 465px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; align-content: start; }
.gallery a.main { grid-column: 1 / -1; }
.gallery img { display: block; width: 100%; border: 1px solid #000; border-radius: 5px; box-shadow: 2px 2px 5px #555; }
.gallery a.thumb img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .no-photo { grid-column: 1 / -1; width: 100%; }
.details { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.details h1 { font-size: 1.8em; color: var(--red); text-align: center; }
.details .badges { float: none; justify-content: center; max-width: none; margin: 0 0 12px; }
.details dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 0 0 16px; }
.details dd { margin: 0; font-weight: bold; }
.details .price { color: var(--red); font-size: 1.2em; }
.details .fine-print { margin: 20px 0 0; font-size: .8em; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox img { position: absolute; inset: 0; margin: auto; max-width: 96vw; max-height: 92vh; }
.lightbox button { position: absolute; background: rgba(0, 0, 0, .55); color: #fff; border: 0; font-size: 34px; line-height: 1; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; }
.lightbox .prev { left: 8px; top: 50%; margin-top: -26px; }
.lightbox .next { right: 8px; top: 50%; margin-top: -26px; }
.lightbox .close { right: 8px; top: 8px; }
.lightbox .count { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; color: #fff; }

.site-footer { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; padding: 14px 16px; background: var(--panel); border-top: 1px solid #000; }

@media (max-width: 700px) {
  .wrapper { border-width: 0; }
  .site-header .logo, .site-header .logo img { height: 64px; }
  .site-header nav { position: static; padding: 6px; flex-wrap: wrap; justify-content: center; background: var(--green); }
  .site-header nav a { flex: 1; text-align: center; padding: 11px 8px; }
  .vehicle { flex-direction: column; padding: 12px; }
  .gallery { flex: none; }
  .listing-photo { flex-basis: 110px; }
  .listing-photo img, .no-photo { width: 110px; }
  .listing-text h2 { font-size: 1.1em; }
  .fine-print { margin: 20px 14px 0; }
  .headline h1 { font-size: 20px; }
  .headline p { font-size: 16px; }
}

/* Parts */
.part-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 10px 16px; padding: 10px; background: var(--panel); border: 1px solid #000; border-radius: 5px; }
.part-search input, .part-search select, .part-search button { font: inherit; padding: 8px; min-height: 40px; border: 1px solid #333; border-radius: 4px; background: #fff; }
.part-search input[type=search] { flex: 3 1 200px; }
.part-search input[type=number] { flex: 1 1 90px; }
.part-search select { flex: 2 1 150px; }
.part-search button { background: var(--green); color: #fff; font-weight: bold; cursor: pointer; padding: 8px 18px; }
.part-search a { align-self: center; }
