/* Galadari Pre-Owned - new look: the car list (Buy A Car). Xtreme IT Services. */
/* Filters and cars */
.gfl-stock__body { position: relative; padding: 44px 0 88px; background: var(--gfl-bg); }
.gfl-stock__layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 32px; align-items: start; }
.gfl-filters { align-self: stretch; }
.gfl-filters__panel {
	position: sticky; top: calc(var(--gfl-top) + var(--gfl-head-h, 84px) + var(--gfl-wave-head) + 14px);
	max-height: calc(100vh - var(--gfl-top) - var(--gfl-head-h, 84px) - var(--gfl-wave-head) - 28px); overflow-y: auto; overscroll-behavior: contain;
	padding: 20px; background: #fff; box-shadow: var(--gfl-shadow);
	scrollbar-width: thin; scrollbar-color: var(--gfl-teal-100) transparent;
}
.gfl-filters__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.gfl-stock .gfl-filters__head h2 { font: 700 20px/1.2 var(--gfl-font); }
.gfl-filters__close { display: none; place-items: center; width: 44px; height: 44px; margin: -6px -8px -6px 0; padding: 0; border: 0; background: var(--gfl-bg); color: var(--gfl-teal); cursor: pointer; }
.gfl-filters__form { display: grid; gap: 6px; margin: 0; }
.gfl-field { position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 54px; padding: 6px 14px 4px; background: var(--gfl-bg); transition: background-color .2s ease, box-shadow .2s ease; }
.gfl-field:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--gfl-gold); }
.gfl-field label { display: block; margin: 0 !important; color: var(--gfl-muted); font: 600 11.5px/1.2 var(--gfl-font) !important; letter-spacing: .08em; text-transform: uppercase; }
.gfl-field select, .gfl-sort select {
	-webkit-appearance: none; appearance: none; width: 100%; height: auto; margin: 0; padding: 2px 22px 2px 0; border: 0 !important; border-radius: 0; box-shadow: none !important; outline: none;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23043b48' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 2px center;
	color: var(--gfl-ink); font: 600 15.5px/1.4 var(--gfl-font); cursor: pointer; text-overflow: ellipsis;
}
.gfl-field select:disabled { color: #9aa9ad; cursor: not-allowed; }
.gfl-field.is-set { background: var(--gfl-gold-50); box-shadow: inset 3px 0 0 var(--gfl-gold); }
.gfl-field.is-set:focus-within { background: #fff; box-shadow: inset 0 0 0 2px var(--gfl-gold); }

.gfl-check { position: relative; display: flex; align-items: center; gap: 12px; margin: 6px 0 0 !important; padding: 10px 4px; color: var(--gfl-ink); font: 600 15px/1.3 var(--gfl-font); cursor: pointer; }
.gfl-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gfl-check__box { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 2px solid var(--gfl-teal-100); background: #fff; color: transparent; transition: background-color .2s ease, border-color .2s ease; }
.gfl-check input:checked + .gfl-check__box { border-color: var(--gfl-gold); background: var(--gfl-gold); color: var(--gfl-teal-900); }
.gfl-check input:focus-visible + .gfl-check__box { box-shadow: 0 0 0 3px var(--gfl-gold-100); }
.gfl-check .gfl-i { stroke-width: 3; }

.gfl-filters__foot { display: grid; gap: 10px; margin-top: 8px; }
.gfl-filters__go { width: 100%; min-height: 52px; justify-content: center; }
.gfl-stock a.gfl-filters__clear { justify-self: center; padding: 4px; color: var(--gfl-teal) !important; font: 600 14px/1.3 var(--gfl-font); text-decoration: underline !important; text-underline-offset: 3px; }
.gfl-stock a.gfl-filters__clear:hover { color: var(--gfl-gold-600) !important; }
/* With the script the list changes as soon as a filter changes, so the button is only needed in the phone panel. */
.gfl-stock.is-live .gfl-filters__go { display: none; }

.gfl-stock__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.gfl-stock__count { color: var(--gfl-muted); font-size: 16px; }
.gfl-stock__count strong { color: var(--gfl-teal); font: 700 28px/1 var(--gfl-font); }
.gfl-stock__count #gfl-stock-word { color: var(--gfl-ink); font-weight: 600; }
.gfl-stock__tools { display: flex; align-items: center; gap: 10px; }
.gfl-stock__filterbtn { display: none; }
.gfl-stock__fcount { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; background: var(--gfl-gold); color: var(--gfl-teal-900); font-size: 13px; }
.gfl-stock__fcount[hidden] { display: none; }
.gfl-sort { display: flex; align-items: center; gap: 10px; padding: 0 12px 0 14px; min-height: 48px; background: #fff; box-shadow: var(--gfl-shadow); }
.gfl-sort label { margin: 0 !important; color: var(--gfl-muted); font: 600 13.5px/1 var(--gfl-font) !important; white-space: nowrap; }
.gfl-sort select { width: auto; min-width: 170px; font-size: 15px; }

.gfl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.gfl-chips:empty { display: none; }
.gfl-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px 6px 12px; border: 0; background: var(--gfl-teal); color: #fff; font: 600 14px/1.2 var(--gfl-font); cursor: pointer; transition: background-color .2s ease; }
.gfl-chip:hover { background: var(--gfl-teal-600); }
.gfl-chip .gfl-i { color: var(--gfl-gold); }
.gfl-chip--clear { background: transparent; color: var(--gfl-teal); text-decoration: underline; text-underline-offset: 3px; }
.gfl-chip--clear:hover { background: transparent; color: var(--gfl-gold-600); }

.gfl-stock__cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 22px; }
/* The card is display:flex, which would beat the hidden attribute. */
.gfl-stock__cars > [hidden] { display: none !important; }

.gfl-stock__empty { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; background: #fff; box-shadow: var(--gfl-shadow); color: var(--gfl-muted); text-align: center; }
.gfl-stock__empty[hidden] { display: none; }
.gfl-stock__empty > .gfl-i { color: var(--gfl-teal-600); }
.gfl-stock .gfl-stock__empty h3 { font: 700 22px/1.3 var(--gfl-font); }
.gfl-stock__empty p { max-width: 420px; }
.gfl-stock__empty .gfl-btn { margin-top: 8px; }

/* Tablet and phone: the filters open as a panel from the left (only when the script runs; without it they stay on the page). */
@media (max-width: 1100px) {
	.gfl-stock__layout { grid-template-columns: 1fr; gap: 24px; }
	.gfl-filters__panel { position: static; max-height: none; overflow: visible; }
	.gfl-stock.is-live .gfl-stock__filterbtn { display: inline-flex; }
	.gfl-stock.is-live .gfl-filters { position: fixed; inset: 0; z-index: 100000; display: none; background: rgba(2, 26, 32, .55); opacity: 0; transition: opacity .25s ease; }
	.gfl-stock.is-live .gfl-filters.is-shown { display: block; }
	.gfl-stock.is-live .gfl-filters.is-open { opacity: 1; }
	.gfl-stock.is-live .gfl-filters__panel {
		position: absolute; top: 0; bottom: 0; left: 0; width: min(420px, 92vw); max-height: none; overflow-y: auto; padding: 18px 20px 0;
		box-shadow: 0 0 40px rgba(2, 26, 32, .3); transform: translateX(-100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
	}
	.gfl-stock.is-live .gfl-filters.is-open .gfl-filters__panel { transform: none; }
	.gfl-stock.is-live .gfl-filters__close { display: grid; }
	.gfl-stock.is-live .gfl-filters__go { display: inline-flex; }
	.gfl-stock.is-live .gfl-filters__foot { position: sticky; bottom: 0; margin: 8px -20px 0; padding: 12px 20px 16px; background: #fff; box-shadow: 0 -8px 20px rgba(4, 59, 72, .08); }
}
@media (max-width: 640px) {
	.gfl-stock .gfl-pagehead__facts li:nth-child(n+3) { flex: 1 1 100%; }
	.gfl-stock__body { padding: 28px 0 64px; }
	.gfl-stock__bar { gap: 10px; }
	.gfl-stock__tools { width: 100%; }
	.gfl-stock__tools > * { flex: 1 1 0; min-width: 0; }
	.gfl-stock.is-live .gfl-stock__filterbtn { justify-content: center; min-height: 48px; padding: 0 14px; }
	.gfl-sort { padding: 0 10px; }
	.gfl-sort label { display: none; }
	.gfl-sort select { min-width: 0; }
	.gfl-stock__cars { gap: 16px; }
}
@media print {
	.gfl-filters, .gfl-stock__tools, .gfl-chips { display: none !important; }
	.gfl-stock__layout { grid-template-columns: 1fr; }
}
