/* Planes for Sale: list of planes, listing pages, and the full-screen photo viewer. */

/* ---- Planes for Sale list ---- */
.planes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding-top: 20px; }
@media (max-width: 900px) { .planes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 580px) { .planes { grid-template-columns: minmax(0, 1fr); } }
.plane { display: grid; align-content: start; gap: 14px; border-top: 2px solid var(--ink); padding-top: 14px; }
.photo { aspect-ratio: 4 / 3; max-width: 100%; background: var(--tint); border: 1px dashed var(--leader); border-radius: 3px; display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.plane h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 4px; }
.plane p { margin: 0 0 14px; }
.plane .soft { color: var(--muted); }
.plane .price-line { font-weight: 800; font-size: 18px; margin: 0 0 6px; }
a.photo { text-decoration: none; overflow: hidden; }
.photo { position: relative; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Listing page ---- */
/* Listing: title and details, then a photo grid; tapping a photo opens a full-screen viewer. */
.page-head { padding-block: 40px 8px; }
.crumb { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.crumb a { text-underline-offset: 4px; }
.price { font-size: clamp(24px, 3.4vw, 30px); font-weight: 800; letter-spacing: -.01em; margin: 0; }
.hero-photo { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--tint); border-radius: 4px; overflow: hidden; cursor: zoom-in; aspect-ratio: 3 / 2; max-width: 840px; margin: 0 0 26px; }
.hero-photo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--accent); }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo .hint { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 3px; }
.hero-photo:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 10px; text-wrap: balance; }
.listing { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
@media (max-width: 860px) { .listing { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.about-plane { max-width: 65ch; }
.about-plane p { margin: 0 0 14px; }
.specs { margin: 0 0 26px; border-top: 2px solid var(--ink); }
.specs > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
@media (max-width: 480px) { .specs > div { grid-template-columns: minmax(0, 1fr); } }
.specs dt { font-weight: 600; color: var(--muted); }
.specs dd { margin: 0; }
.ask { border-top: 2px solid var(--ink); padding-top: 14px; display: grid; gap: 10px; }
.ask .tag { justify-self: start; font-size: 13px; font-weight: 600; color: var(--muted); border: 1px solid var(--leader); border-radius: 3px; padding: 1px 8px; }
.ask p { margin: 0; }
.ask .phone { font-size: 20px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ask .phone a { text-decoration: none; }
.ask .soft { color: var(--muted); font-size: 14px; }

/* Photo grid */
.photos-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 44px 0 12px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
.photos-head h2 { font-size: 19px; font-weight: 800; margin: 0; }
.photos-head span { font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; } }
.thumb { display: block; padding: 0; border: 0; background: var(--tint); cursor: zoom-in; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; border-radius: 3px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.thumb:hover img { transform: scale(1.03); }
.thumb:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.empty { border: 1px dashed var(--leader); background: var(--tint); color: var(--muted); border-radius: 3px; padding: 40px 16px; text-align: center; }

/* Full-screen viewer (always dark, like a lightbox) */
.lb { position: fixed; inset: 0; z-index: 100; background: #0b0f16; color: #fff; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; touch-action: pan-y; }
.lb-top { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px)); padding-bottom: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.lb-count { font-size: 15px; opacity: .8; font-variant-numeric: tabular-nums; }
.lb-stage { position: relative; min-height: 0; }
.lb-stage img { position: absolute; top: 0; bottom: 0; left: 64px; right: 64px; width: calc(100% - 128px); height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
@media (max-width: 640px) { .lb-stage img { left: 0; right: 0; width: 100%; } }
.lb-btn { font: inherit; color: #fff; background: rgba(255, 255, 255, .12); border: 0; border-radius: 999px; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; font-size: 22px; line-height: 1; }
.lb-btn:hover { background: rgba(255, 255, 255, .22); }
.lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: max(8px, env(safe-area-inset-left, 0px)); }
.lb-next { right: max(8px, env(safe-area-inset-right, 0px)); }
@media (max-width: 640px) { .lb-prev, .lb-next { background: rgba(0, 0, 0, .45); } }
.lb-strip { display: flex; gap: 6px; overflow-x: auto; padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); scrollbar-width: thin; }
.lb-strip button { flex: none; width: 72px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 3px; overflow: hidden; background: #222; cursor: pointer; opacity: .55; }
.lb-strip button[aria-current="true"] { border-color: #fff; opacity: 1; }
.lb-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (prefers-reduced-motion: reduce) { .thumb img { transition: none; } }

/* Cover photo boxes lose the dashed "coming soon" border once a photo is in */
.photo:has(img) { border: 0; }
.soft { color: var(--muted); }
.page-head h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 10px; text-wrap: balance; }

/* ---- Price picker (strut cuffs) ---- */
.picker { border-top: 3px solid var(--accent); padding-top: 14px; margin: 0 0 30px; display: grid; gap: 16px; }
.picker-h { font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
/* Plane type choices are boxes: the picked one is filled (navy, or white in dark mode), the others are muted */
.pick-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pick-plane { font: inherit; text-align: left; background: var(--tint); border: 1.5px solid var(--rule); border-radius: 6px; padding: 12px 14px 14px; color: var(--muted); cursor: pointer; display: grid; gap: 2px; align-content: start; transition: background .15s, border-color .15s, color .15s; }
.pick-plane b { font-size: 26px; font-weight: 800; letter-spacing: -.015em; line-height: 1.1; }
.pick-plane span { font-size: 14px; }
.pick-plane:hover { border-color: var(--ink); color: var(--ink); }
.pick-plane[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
@media (prefers-reduced-motion: reduce) { .pick-plane { transition: none; } }
.pick-plane:focus-visible, .seg button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pick-row { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.pick-label { font-weight: 600; color: var(--muted); min-width: 70px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1.5px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg button { font: inherit; font-weight: 600; font-size: 15px; background: transparent; color: var(--ink); border: 0; padding: 8px 16px; cursor: pointer; }
.seg button + button { border-left: 1.5px solid var(--ink); }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--on-ink); }
.seg button:disabled { color: var(--muted); opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.pick-result { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; background: var(--tint); border-radius: 4px; padding: 14px 16px; }
.pick-result > div { display: grid; }
.pick-what { font-size: 14px; color: var(--muted); }
.pick-price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.pick-price.soon { font-size: 20px; color: var(--muted); }
@media (max-width: 480px) { .pick-plane b { font-size: 22px; } .seg button { padding: 8px 12px; } }

.pick-photo { display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--tint); cursor: zoom-in; }
.pick-photo img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .2s; }
.pick-photo img.swap { opacity: .25; }
.pick-photo:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .pick-photo img { transition: none; } }

/* on pages with a price picker, the contact box beside it gets the same red line */
.listing:has(.picker) .ask { border-top: 3px solid var(--accent); }
