/**
 * TPJC "Aircraft for Sale" page (the Current Availability template) --
 * extends tpjc-homepage.css, which must be enqueued first: it defines
 * the --ink/--mist/--bronze tokens, .tpjc-nav, .tpjc-foot, .tpjc-sec,
 * .tpjc-kicker, .tpjc-display, .tpjc-body, .tpjc-tlink, .tpjc-btn,
 * .tpjc-listing and the mobile rules (header dropped, everything
 * centred) this page inherits. Only what is specific to the gallery and
 * the aircraft detail view lives here.
 *
 * Prefix: .tpjc-fs-*  (for sale)
 */

/* ---------------------------------------------------- mobile chrome */

/* Phones drop the sticky header (homepage.css); the template carries a
   centred logo + nav duplicate that only shows there. */
.tpjc-mnav { display: none; }

/* ------------------------------------------------------ page header */

.tpjc-fs-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 64px;
	padding-bottom: 40px;
}
.tpjc-fs-head__copy { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.tpjc-fs-head__copy h1 { font-size: 54px; line-height: 1.08; margin: 0; }
.tpjc-fs-head__copy p { max-width: 620px; margin: 0; }
.tpjc-fs-head__count {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	text-align: right;
	gap: 8px;
	flex: none;
	padding-bottom: 6px;
}
.tpjc-fs-head__count .tpjc-num { font-size: 52px; min-width: 2ch; }

/* --------------------------------------------------------- tab rail */

.tpjc-fs-rail {
	position: sticky;
	top: calc(var(--tpjc-adminbar, 0px) + 80px);
	z-index: 50;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	gap: 40px;
	padding: 0 var(--gutter);
	background: var(--ice);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}
.tpjc-fs-tabs { display: flex; gap: 40px; overflow-x: auto; scrollbar-width: none; }
.tpjc-fs-tabs::-webkit-scrollbar { display: none; }
.tpjc-fs-tab {
	border: 0;
	background: none;
	padding: 24px 0;
	font-family: var(--disp);
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mist);
	border-bottom: 2px solid transparent;
	white-space: nowrap;
	cursor: pointer;
	transition: color 0.18s, border-color 0.18s;
}
.tpjc-fs-tab span { font-size: 11px; color: var(--mist-2); margin-left: 6px; }
.tpjc-fs-tab:hover { color: var(--ink); }
.tpjc-fs-tab.is-active { color: var(--ink); border-bottom-color: var(--bronze); }
.tpjc-fs-tab.is-active span { color: var(--bronze); }

.tpjc-fs-sort { display: flex; align-items: center; gap: 12px; flex: none; }
.tpjc-fs-sort select {
	font-family: var(--sans);
	font-size: 14px;
	color: var(--ink);
	background: #fff;
	border: 1px solid rgba(20, 28, 46, 0.22);
	padding: 9px 12px;
}

/* ---------------------------------------------------------- filters */

.tpjc-fs-filters {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	padding: 20px var(--gutter);
	border-bottom: 1px solid var(--line-soft);
}
.tpjc-fs-chips-wrap { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tpjc-fs-chips-wrap:has([data-fs-chips]) { flex: 1 1 auto; }
.tpjc-fs-chips-wrap[hidden] { display: none; }
.tpjc-fs-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.tpjc-fs-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid rgba(20, 28, 46, 0.22);
	background: #fff;
	color: var(--ink);
	padding: 9px 16px;
	font-family: var(--disp);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	cursor: pointer;
	transition: border-color 0.18s, background 0.18s, color 0.18s;
}
.tpjc-fs-chip span { font-size: 10px; color: var(--mist-2); }
.tpjc-fs-chip:hover { border-color: var(--ink); }
.tpjc-fs-chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tpjc-fs-chip.is-active span { color: rgba(255, 255, 255, 0.7); }

.tpjc-fs-budget { display: flex; align-items: center; gap: 12px; flex: none; }
.tpjc-fs-budget input { width: 180px; accent-color: var(--ink); cursor: pointer; }
.tpjc-fs-budget__label { font-size: 13.5px; color: var(--mist); min-width: 110px; }

/* ------------------------------------------------------- row heads */

.tpjc-fs-row-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	margin-bottom: 26px;
}
.tpjc-fs-row-head__title { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.tpjc-fs-row-head__title h2 { font-size: 26px; margin: 0; }
.tpjc-fs-row-head__title .tpjc-body { font-size: 14px; color: var(--mist); }
.tpjc-fs-row-head .tpjc-tlink { flex: none; }

.tpjc-fs-excl { padding-bottom: 0; }
.tpjc-fs-market { padding-top: 64px; }
.tpjc-fs-market .tpjc-fs-row-head { border-top: 1px solid var(--line); padding-top: 34px; }

/* ------------------------------------------------------------ grids */

.tpjc-fs-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px 28px;
}

/* ------------------------------------------------------------- card */

.tpjc-fs-card__ph { position: relative; display: block; width: 100%; }
.tpjc-fs-card .tpjc-listing__t { font-size: 20px; }
.tpjc-fs-card__body { display: flex; flex-direction: column; gap: 6px; }
.tpjc-fs-card__price {
	font-family: var(--disp);
	font-size: 17px;
	font-weight: 400;
	color: var(--ink);
	margin-top: 4px;
	display: block;
}

/* Photo box: the ice fill shows while the lead photo is being fetched,
   then the image paints over it. No photo on file becomes a deliberate
   state -- a bronze mark and a line of copy -- not a broken image. */
.tpjc-fs-ph {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	width: 100%;
	aspect-ratio: 3 / 2;
	background: var(--ice-2);
	border-radius: 2px;
	overflow: hidden;
}
/* Whole photo, never cropped: feed photos arrive in every shape and a
   forced crop takes noses and tails off. */
.tpjc-fs-ph .tpjc-listing__ph {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: contain;
	background: var(--ice-2);
}
.tpjc-fs-ph.is-none { background: var(--ice); border: 1px solid var(--line); }
.tpjc-fs-ph__mark {
	display: block;
	width: 28px;
	height: 28px;
	border: 1px solid var(--bronze);
	transform: rotate(45deg);
}
.tpjc-fs-ph.is-none .tpjc-kicker { font-size: 10px; letter-spacing: 0.18em; }

.tpjc-fs-tag {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: rgba(20, 28, 46, 0.82);
	color: #fff;
	font-family: var(--disp);
	font-size: 9px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	padding: 5px 10px;
}
.tpjc-fs-tag--excl { background: var(--bronze); }
.tpjc-fs-tag--sold { background: var(--bronze); }
.tpjc-fs-gallery__main .tpjc-fs-tag { top: 16px; left: 16px; font-size: 10px; padding: 7px 12px; }

/* -------------------------------------------------------- show more */

.tpjc-fs-more { display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 54px; }
.tpjc-fs-more .tpjc-btn { height: 52px; padding: 0 44px; }
.tpjc-fs-more .tpjc-body { font-size: 13px; color: var(--mist); }

/* ----------------------------------------------------------- detail */

.tpjc-fs-crumb {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
	font-family: var(--disp);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--mist);
}
.tpjc-fs-crumb .sep { color: #9aa6b8; }
.tpjc-fs-crumb .cur { color: var(--ink); }

.tpjc-fs-detail__split {
	display: grid;
	grid-template-columns: minmax(0, 1.9fr) minmax(320px, 1fr);
	gap: 48px;
	align-items: start;
}

.tpjc-fs-gallery { display: flex; flex-direction: column; gap: 14px; }
.tpjc-fs-gallery__main {
	position: relative;
	margin: 0;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: var(--ice-2);
	border-radius: 2px;
	overflow: hidden;
}
.tpjc-fs-gallery__main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpjc-fs-gallery__count {
	position: absolute;
	bottom: 16px;
	right: 16px;
	background: rgba(20, 28, 46, 0.72);
	color: #fff;
	font-family: var(--disp);
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	padding: 6px 12px;
}
.tpjc-fs-gallery__thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.tpjc-fs-gallery__thumb {
	padding: 0;
	border: 1px solid var(--line);
	background: var(--ice-2);
	border-radius: 2px;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	cursor: pointer;
}
.tpjc-fs-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpjc-fs-gallery__thumb.is-active { border: 2px solid var(--bronze); }

.tpjc-fs-info { display: flex; flex-direction: column; gap: 22px; padding-top: 4px; }
.tpjc-fs-info h1 { font-size: 38px; line-height: 1.1; margin: 0; }
.tpjc-fs-info__sub {
	font-family: var(--disp);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--mist);
	margin-top: -10px;
}
.tpjc-fs-info__price {
	font-family: var(--disp);
	font-size: 30px;
	font-weight: 300;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--line);
}
.tpjc-fs-facts { margin: 0; display: flex; flex-direction: column; }
.tpjc-fs-facts > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 13px 0;
	border-bottom: 1px solid var(--line-soft);
}
.tpjc-fs-facts dt { font-size: 14px; color: var(--mist); }
.tpjc-fs-facts dd { margin: 0; font-size: 14px; font-weight: 500; text-align: right; }
.tpjc-fs-info__cta { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.tpjc-fs-info__cta .tpjc-btn { height: 54px; width: 100%; }
.tpjc-fs-info__note { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--mist); }

.tpjc-fs-detail--missing .tpjc-sec__head { padding: 40px 0 80px; }
.tpjc-fs-detail--missing .tpjc-btn { margin-top: 12px; }

/* ------------------------------------------------- model pages */

.tpjc-fs-model-facts { padding-top: 0; }
.tpjc-fs-model-stats {
	margin: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid var(--ink);
	border-bottom: 1px solid var(--line);
}
.tpjc-fs-model-stats > div { padding: 22px 24px 22px 0; border-right: 1px solid var(--line-soft); }
.tpjc-fs-model-stats > div:last-child { border-right: 0; }
.tpjc-fs-model-stats > div + div { padding-left: 24px; }
.tpjc-fs-model-stats dt {
	font-family: var(--disp);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--mist);
	margin-bottom: 8px;
}
.tpjc-fs-model-stats dd { margin: 0; font-family: var(--disp); font-size: 22px; font-weight: 300; color: var(--ink); line-height: 1.2; }

.tpjc-fs-model-copy__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	gap: 48px;
	max-width: 1080px;
}
.tpjc-fs-model-copy__grid .tpjc-kicker { display: block; margin-bottom: 14px; }
.tpjc-fs-model-copy__grid .tpjc-body { margin: 0 0 18px; }
.tpjc-body--lg { font-size: 19px; line-height: 1.65; }

.tpjc-fs-model-list .tpjc-fs-row-head { border-top: 1px solid var(--line); padding-top: 34px; }
.tpjc-fs-model-sold .tpjc-fs-row-head { border-top: 1px solid var(--line); padding-top: 34px; }
.tpjc-fs-model-sold .tpjc-fs-info__note { max-width: 820px; margin-top: 18px; }

.tpjc-fs-models { display: flex; flex-wrap: wrap; gap: 10px; }
.tpjc-fs-models__item {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 2px;
	text-decoration: none;
	color: var(--ink);
	font-family: var(--disp);
	font-size: 14px;
	letter-spacing: 0.02em;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.tpjc-fs-models__item:hover { border-color: var(--ink); background: var(--ice); color: var(--ink); }
.tpjc-fs-models__item .c { font-size: 12px; color: var(--mist); }
.tpjc-fs-models--col { flex-direction: column; align-items: stretch; gap: 0; }
.tpjc-fs-models--col .tpjc-fs-models__item {
	justify-content: space-between;
	border: 0;
	border-bottom: 1px solid var(--line-soft);
	border-radius: 0;
	padding: 11px 0;
}
.tpjc-fs-models--col .tpjc-fs-models__item:hover { background: transparent; color: var(--bronze); }

.tpjc-fs-bymodel .tpjc-fs-row-head { border-top: 1px solid var(--line); padding-top: 34px; }
.tpjc-fs-bymodel__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 36px 40px;
}
.tpjc-fs-bymodel__maker .tpjc-kicker { display: block; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }

@media (max-width: 1100px) {
	.tpjc-fs-model-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tpjc-fs-model-stats > div:nth-child(2n) { border-right: 0; }
	.tpjc-fs-bymodel__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.tpjc-fs-model-copy__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	.tpjc-fs-bymodel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.tpjc-fs-model-stats { grid-template-columns: minmax(0, 1fr); }
	.tpjc-fs-model-stats > div { padding: 16px 0; border-right: 0; border-bottom: 1px solid var(--line-soft); }
	.tpjc-fs-model-stats > div + div { padding-left: 0; }
	.tpjc-fs-model-stats > div:last-child { border-bottom: 0; }
	.tpjc-fs-bymodel__grid { grid-template-columns: minmax(0, 1fr); }
	.tpjc-fs-models { justify-content: center; }
	.tpjc-fs-models--col .tpjc-fs-models__item { justify-content: space-between; }
}

/* ------------------------------------------------------ breakpoints */

@media (max-width: 1100px) {
	.tpjc-fs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tpjc-fs-detail__split { grid-template-columns: minmax(0, 1fr); }
	.tpjc-fs-head__copy h1 { font-size: 44px; }
}

@media (max-width: 860px) {
	.tpjc-mnav { display: block; padding-top: 18px; border-bottom: 1px solid var(--line-soft); background: #fff; }
	.tpjc-mnav__logo { display: flex; justify-content: center; }
	.tpjc-mnav__logo img { width: 154px; height: 48px; display: block; }
	.tpjc-mnav .tpjc-nav__links--mobile { padding-top: 14px; padding-bottom: 20px; }

	.tpjc-fs-head { flex-direction: column; align-items: center; text-align: center; gap: 24px; }
	.tpjc-fs-head__copy { align-items: center; }
	.tpjc-fs-head__copy h1 { font-size: 34px; }
	.tpjc-fs-head__count { align-items: center; text-align: center; padding-bottom: 0; }

	.tpjc-fs-rail { top: var(--tpjc-adminbar, 0px); flex-direction: column; gap: 0; }
	.tpjc-fs-tabs { gap: 22px; }
	.tpjc-fs-tab { padding: 18px 0; font-size: 11.5px; }
	.tpjc-fs-sort { padding: 12px 0 14px; justify-content: center; border-top: 1px solid var(--line-soft); }

	.tpjc-fs-filters { flex-direction: column; align-items: stretch; gap: 18px; }
	.tpjc-fs-chips-wrap, .tpjc-fs-chips, .tpjc-fs-budget { justify-content: center; }
	.tpjc-fs-budget__label { min-width: 0; }

	.tpjc-fs-row-head { flex-direction: column; align-items: center; text-align: center; gap: 10px; }
	.tpjc-fs-row-head__title { flex-direction: column; align-items: center; gap: 6px; }

	.tpjc-fs-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.tpjc-fs-card__body { align-items: center; text-align: center; }

	.tpjc-fs-crumb { justify-content: center; }
	.tpjc-fs-info { align-items: center; text-align: center; }
	.tpjc-fs-info__price { width: 100%; }
	.tpjc-fs-facts { width: 100%; }
	.tpjc-fs-facts > div { flex-direction: column; align-items: center; gap: 4px; }
	.tpjc-fs-facts dd { text-align: center; }
	.tpjc-fs-info__cta { width: 100%; }
	.tpjc-fs-gallery__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ================================================================
 * Legacy [tpjc_inventory] shortcode grid -- unchanged, still used on
 * pages that haven't moved to the template yet.
 * ================================================================ */

.tpjc-avail__head { padding-bottom: 12px; }
.tpjc-avail__toolbar { margin-bottom: 28px; }
.tpjc-avail__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 24px;
}
.tpjc-avail-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 20px;
	padding: 28px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: box-shadow .2s ease, transform .2s ease;
}
.tpjc-avail-card:hover { box-shadow: 0 16px 40px rgba(20, 28, 46, 0.08); transform: translateY(-2px); }
.tpjc-avail-card__title { font-family: var(--disp); font-weight: 400; font-size: 21px; line-height: 1.25; color: var(--ink); margin: 4px 0 0; }
.tpjc-avail-card__meta { font-size: 15px; color: var(--mist); margin: 0; }
.tpjc-avail-card__price { font-family: var(--disp); font-weight: 500; font-size: 17px; color: var(--bronze); margin: 10px 0 6px; }
.tpjc-avail-card .tpjc-tlink { margin-top: auto; padding-top: 8px; }
.tpjc-avail__grid:empty + .tpjc-avail__empty,
.tpjc-inventory__status--empty { display: block; padding: 48px 0; text-align: center; }
@media (max-width: 640px) {
	.tpjc-avail__grid { grid-template-columns: 1fr; }
	.tpjc-avail-card { padding: 22px; }
}

/* ------------------------------------------------- new-this-week chip */
.tpjc-fs-chip--new.is-active { background: var(--bronze); border-color: var(--bronze); }

/* -------------------------------------------------- recently sold view */
.tpjc-fs-sold { padding-top: 24px; }
.tpjc-fs-sold__list { max-width: 820px; border-top: 1px solid var(--ink); }
.tpjc-fs-sold__list .tpjc-row { padding: 18px 0; }
.tpjc-fs-sold__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; margin-top: 40px; }
.tpjc-row--sold .tpjc-row__tag { font-family: var(--disp); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bronze); text-align: right; }

/* `hidden` must always win, whatever the host theme loads. */
.tpjc-fs [hidden], .tpjc-fs-more[hidden] { display: none !important; }
