/* ===== Dealership features (inventory, listing pages, forms) ===== */
.btn { display: inline-block; background: #c0392b; color: #fff; border: none; padding: 10px 22px; border-radius: 4px; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 15px; font-family: inherit; }
.btn:hover { background: #a93226; }
.btn.secondary { background: #1a3a5c; }
.btn.secondary:hover { background: #13304d; }
.btn-link { color: #1a3a5c; font-weight: 600; margin-left: 10px; }
.center { text-align: center; }
.hint { font-size: 14px; color: #666; margin: -10px 0 20px; }

/* Inventory cards (now clickable) */
a.vehicle-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.card-img { position: relative; }
.card-img img { display: block; }
.no-photo { height: 200px; background: #e9ecef; display: flex; align-items: center; justify-content: center; color: #888; font-weight: 600; }
.listing-no { position: absolute; top: 10px; left: 10px; background: rgba(26,58,92,.92); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 4px; }
.featured-tag { position: absolute; top: 10px; right: 10px; background: #ffd700; color: #1a3a5c; font-weight: 700; font-size: 12px; padding: 3px 9px; border-radius: 4px; }
.vehicle-info { flex: 1; display: flex; flex-direction: column; }
.vehicle-info .view-link { margin-top: 8px; color: #1a3a5c; font-weight: 700; font-size: 14px; }
.vehicle-card.is-sold img { filter: grayscale(.6); opacity: .8; }
.status.pending { background: #f39c12; color: #fff; }

/* Filters */
form.filters { align-items: flex-end; }
.filter-group.grow { flex: 1 1 220px; }
.filter-group.grow input { width: 100%; }
.filter-actions { display: flex; align-items: center; }
.result-count { color: #555; margin: -10px 0 15px; font-weight: 600; }

/* Listing detail */
.listing-page { padding-top: 20px; }
.crumbs { margin-bottom: 15px; }
.crumbs a { color: #1a3a5c; font-weight: 600; text-decoration: none; }
.listing-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.listing-head h1 { color: #1a3a5c; font-size: 2rem; line-height: 1.2; }
.listing-head .sub { color: #666; }
.listing-no-inline { display: inline-block; background: #1a3a5c; color: #fff; font-weight: 700; font-size: 13px; padding: 3px 10px; border-radius: 4px; margin-bottom: 6px; }
.head-price { text-align: right; }
.big-price { font-size: 2rem; margin-top: 4px; }
.listing-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 30px; align-items: start; }
.gallery { margin-bottom: 25px; }
.main-photo { background: #000; border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; position: relative; }
.main-photo img { width: 100%; height: 100%; object-fit: contain; }
.main-photo.no-photo { background: #e9ecef; }
.main-photo.is-sold::after { content: 'SOLD'; position: absolute; top: 22px; right: -42px; transform: rotate(45deg); background: #e74c3c; color: #fff; font-weight: 800; padding: 6px 50px; letter-spacing: 2px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-top: 10px; }
.thumb { border: 3px solid transparent; border-radius: 6px; padding: 0; cursor: pointer; background: none; overflow: hidden; aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.active { border-color: #c0392b; }
.section-title { color: #1a3a5c; font-size: 1.3rem; margin-bottom: 12px; }
.section-sub { color: #1a3a5c; margin: 20px 0 8px; }
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #eee; font-size: 15px; }
.specs th { width: 42%; color: #555; font-weight: 600; }
.specs tr:nth-child(odd) { background: #f8f9fa; }
.option-list { columns: 2; list-style: none; }
.option-list li::before { content: '✓ '; color: #27ae60; font-weight: 700; }
.as-is { font-size: 14px; color: #666; font-style: italic; }
.inquiry { position: sticky; top: 20px; }
.inquiry-card { background: #fff; border-radius: 8px; padding: 22px; box-shadow: 0 2px 10px rgba(0,0,0,.12); border-top: 4px solid #c0392b; }
.inquiry-card h2 { color: #1a3a5c; font-size: 1.25rem; margin-bottom: 12px; }
.inquiry-card .field { margin-bottom: 12px; }
.inquiry-card .submit { width: 100%; }
.call-btn { display: block; text-align: center; background: #1a3a5c; color: #fff; padding: 12px; border-radius: 4px; font-weight: 700; text-decoration: none; font-size: 1.1rem; }
.or { text-align: center; color: #777; margin: 10px 0; font-size: 14px; }

/* Alerts */
.alert { padding: 14px 18px; border-radius: 6px; margin-bottom: 18px; }
.alert.ok { background: #e8f6ee; border-left: 4px solid #27ae60; color: #1d5e3a; }
.alert.err { background: #fdecea; border-left: 4px solid #e74c3c; color: #8a1f14; }

/* Contact */
.contact-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 25px; align-items: start; }
.contact-info .intro { margin-bottom: 15px; padding: 20px; }
.contact-info h3 { color: #1a3a5c; margin-bottom: 6px; }

@media (max-width: 860px) {
  .listing-grid, .contact-layout { grid-template-columns: 1fr; }
  .inquiry { position: static; }
  .head-price { text-align: left; }
  .option-list { columns: 1; }
}

/* Floating "Edit this page" button (admins only) */
.admin-edit-btn { position: fixed; right: 18px; bottom: 18px; z-index: 1000; background: #c0392b; color: #fff; font-weight: 700; padding: 11px 18px; border-radius: 30px; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.admin-edit-btn:hover { background: #a93226; }
.footer-hours { margin-top: 8px; }
.notice p + p { margin-top: 10px; }
.as-is p { font-size: 14px; color: #666; font-style: italic; }

/* Sold vehicles: stamp + struck-through details */
.sold-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 5px solid #e74c3c; color: #e74c3c; background: rgba(255,255,255,.88); font-size: 2.1rem; font-weight: 900; letter-spacing: 4px; padding: 2px 18px; border-radius: 6px; }
.vehicle-card.is-sold h3, .vehicle-card.is-sold .vehicle-info p { text-decoration: line-through; color: #888; }
.vehicle-card.is-sold .price { color: #e74c3c; letter-spacing: 2px; }
.sold-divider { grid-column: 1 / -1; color: #888; font-size: 1.2rem; border-top: 2px dashed #ccc; padding-top: 18px; margin-top: 10px; text-transform: uppercase; letter-spacing: 1px; }
.listing-page.is-sold .listing-head h1, .listing-page.is-sold .listing-head .sub, .listing-page.is-sold .specs td, .listing-page.is-sold .option-list li, .listing-page.is-sold .description-text { text-decoration: line-through; color: #888; }
.sold-banner { background: #e74c3c; color: #fff; font-weight: 800; text-align: center; padding: 12px; border-radius: 6px; margin-bottom: 18px; letter-spacing: 1px; }
.pager { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 30px 0 10px; }
.pager a { padding: 8px 14px; border-radius: 4px; background: #fff; color: #1a3a5c; text-decoration: none; font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.pager a.on { background: #1a3a5c; color: #fff; }
.video-wrap { margin-top: 14px; }
.video-wrap video { width: 100%; border-radius: 8px; background: #000; max-height: 520px; }
.media-tabs { display: flex; gap: 6px; margin-top: 10px; }
.media-tabs button { border: none; background: #e9ecef; color: #1a3a5c; font-weight: 700; padding: 8px 14px; border-radius: 4px; cursor: pointer; font: inherit; font-weight: 700; }
.media-tabs button.on { background: #1a3a5c; color: #fff; }

/* Public form uploader */
.up-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.up-tile { position: relative; border-radius: 6px; overflow: hidden; background: #eee; aspect-ratio: 4 / 3; }
.up-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-tile.done::after { content: '✓'; position: absolute; top: 6px; right: 6px; background: #27ae60; color: #fff; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.up-tile.err img { opacity: .35; }
.up-tile .up-err { position: absolute; inset: auto 4px 4px 4px; font-size: 11px; line-height: 1.2; }
.up-prog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 6px; background: rgba(255,255,255,.7); border-radius: 3px; overflow: hidden; }
.up-prog i { display: block; height: 100%; width: 0; background: #2c5aa0; transition: width .2s; }
.up-tile.done .up-prog { display: none; }
.up-prog.big { position: static; height: 10px; margin: 10px 0 4px; background: #e9ecef; }
.up-err { color: #c0392b; font-weight: 600; }
.up-count, .up-msg { margin-top: 8px; font-size: 14px; color: #555; font-weight: 600; }
.submit:disabled { background: #999; cursor: wait; }

/* Page builder blocks */
.blocks > * { margin-bottom: 26px; }
.blk-heading { color: #1a3a5c; margin-top: 10px; }
h3.blk-heading { font-size: 1.3rem; }
.blk-text p + p, .callout p + p, .blk-imgtext p + p, .blk-person p + p { margin-top: 12px; }
.blk-image img { display: block; width: 100%; border-radius: 8px; }
.blk-image.w-medium { max-width: 720px; } .blk-image.w-small { max-width: 400px; }
.blk-image.a-center { margin-left: auto; margin-right: auto; } .blk-image.a-right { margin-left: auto; }
.blk-image figcaption { color: #666; font-size: 14px; margin-top: 6px; text-align: center; font-style: italic; }
.blk-imgtext { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; background: #fff; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.blk-imgtext.img-right > img { order: 2; }
.blk-imgtext img { width: 100%; border-radius: 8px; }
.blk-imgtext h2 { color: #1a3a5c; margin-bottom: 10px; }
.blk-gallery h2, .blk-video h2 { color: #1a3a5c; margin-bottom: 12px; }
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.gal-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; transition: transform .2s; }
.gal-item:hover img { transform: scale(1.03); }
.blk-video video { width: 100%; max-height: 560px; background: #000; border-radius: 8px; }
.embed { position: relative; padding-top: 56.25%; border-radius: 8px; overflow: hidden; background: #000; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.big-btn { padding: 14px 32px; font-size: 1.05rem; }
.callout { border-left: 5px solid #c0392b; }
.callout.c-blue { border-color: #2c5aa0; } .callout.c-gold { border-color: #ffd700; } .callout.c-green { border-color: #27ae60; }
.callout .tag { display: inline-block; background: #ffd700; color: #1a3a5c; font-size: 12px; font-weight: bold; padding: 3px 10px; border-radius: 4px; margin-bottom: 12px; text-transform: uppercase; }
.blk-person { display: flex; gap: 24px; align-items: flex-start; }
.blk-person img, .person-ph { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.person-ph { background: #e9ecef; display: flex; align-items: center; justify-content: center; font-size: 60px; }
.blk-person h3 { color: #1a3a5c; font-size: 1.4rem; }
.blk-person .role { color: #c0392b; font-weight: 700; margin-bottom: 8px; }
.blk-contact .contact-grid { margin-bottom: 15px; }
.blk-divider { border: none; border-top: 2px solid #dfe3e8; margin: 10px 0; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000; display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 4px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.15); color: #fff; border: none; font-size: 34px; width: 54px; height: 54px; border-radius: 50%; cursor: pointer; }
.lb-x { top: 16px; right: 16px; font-size: 22px !important; } .lb-prev { left: 16px; } .lb-next { right: 16px; }
@media (max-width: 760px) {
  .blk-imgtext { grid-template-columns: 1fr; padding: 16px; } .blk-imgtext.img-right > img { order: 0; }
  .blk-person { flex-direction: column; align-items: center; text-align: center; }
}

/* Seller-friendly form touches */
.missing input, .missing select, .missing textarea { border-color: #e74c3c !important; background: #fff6f5; }
fieldset.missing legend, .field.missing label { color: #c0392b; }
fieldset.missing .checks { outline: 2px solid #e74c3c; outline-offset: 6px; border-radius: 4px; }
.draft-note .btn-link { background: none; border: none; color: #1a3a5c; text-decoration: underline; cursor: pointer; font: inherit; font-weight: 700; }
.done-card { text-align: center; max-width: 640px; margin: 0 auto; }
.done-check { width: 70px; height: 70px; border-radius: 50%; background: #27ae60; color: #fff; font-size: 38px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.done-card h2 { color: #1a3a5c; margin-bottom: 8px; }
.done-card h3 { color: #1a3a5c; margin: 20px 0 8px; }
.done-card .ref { background: #f4f7fb; border-radius: 6px; padding: 12px; margin: 14px 0; }
.next-steps { text-align: left; display: inline-block; margin: 0 0 20px 20px; }
.next-steps li { margin: 4px 0; }
.done-card .btn { margin: 4px; }
.vehicle-info .status { align-self: flex-start; }

/* Menu: wraps neatly with many pages; collapses to a button on phones */
.header-container { gap: 20px; }
nav ul { flex-wrap: wrap; justify-content: flex-end; gap: 6px 22px; }
nav a { white-space: nowrap; }
.menu-toggle { display: none; background: #1a3a5c; color: #fff; border: none; padding: 10px 16px; border-radius: 6px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 900px) {
  .header-container { flex-direction: row !important; flex-wrap: wrap; justify-content: space-between; }
  .menu-toggle { display: block; }
  .header-container nav { display: none; width: 100%; }
  .header-container nav.open { display: block; }
  .header-container nav ul { flex-direction: column; gap: 0; align-items: stretch; }
  .header-container nav a { display: block; padding: 12px 6px; border-top: 1px solid #eef0f3; }
  .logo { height: 60px; }
}
