/*
 * Inventory page styles (post-type-archive-car)
 * Scope: archive-car.php + template-parts/car/card.php only.
 */

.dag-inventory {
	padding: clamp(18px, 2.6vw, 32px) 0;
}

.inventory-hero {
	margin-bottom: 18px;
}

.inventory-title {
	margin: 0;
	font-size: clamp(28px, 3.2vw, 40px);
	letter-spacing: -0.02em;
}

.inventory-lead {
	margin: 10px 0 0;
	color: var(--dag-muted, #667085);
	max-width: 72ch;
	line-height: 1.55;
}

.inventory-layout {
	display: grid;
	grid-template-columns: 360px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}

@media (max-width: 980px) {
	.inventory-layout {
		grid-template-columns: 1fr;
	}
}

/* Sidebar / filters */

.inventory-filters-collapse {
	border: 1px solid var(--dag-border, #E4E7EC);
	border-radius: 18px;
	background: var(--dag-surface, #fff);
	overflow: hidden;
}

.inventory-filters-collapse__summary {
	cursor: pointer;
	padding: 12px 14px;
	font-weight: 900;
	user-select: none;
	list-style: none;
}

.inventory-filters-collapse__summary::-webkit-details-marker {
	display: none;
}

.inventory-filters-collapse[open] > .inventory-filters-collapse__summary {
	border-bottom: 1px solid var(--dag-border, #E4E7EC);
}

@media (min-width: 981px) {
	.inventory-filters-collapse__summary {
		display: none;
	}

	.inventory-sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 16px);
		align-self: start;
	}

	.inventory-filters-collapse {
		position: static;
		border-radius: 0;
		border: none;
		background: transparent;
		overflow: visible;
	}

	.inventory-filters {
		max-height: calc(100vh - (var(--wp-admin--admin-bar--height, 0px) + 32px));
		overflow: auto;
	}
}
.inventory-filters {
	border: 1px solid var(--dag-border, #E4E7EC);
	border-radius: 18px;
	background: var(--dag-surface, #fff);
	box-shadow: 0 10px 22px rgba(16, 24, 40, 0.06);
	padding: 14px;
}

@media (max-width: 980px) {
	.inventory-filters {
		border: none;
		border-radius: 0;
		box-shadow: none;
		padding: 14px;
	}
}

.inventory-filters__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.inventory-filters__title {
	font-weight: 900;
	letter-spacing: -0.01em;
}

.inventory-filters__grid {
	display: grid;
	gap: 12px;
}

.inventory-filters__row--2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

@media (max-width: 480px) {
	.inventory-filters__row--2 {
		grid-template-columns: 1fr;
	}
}

.inventory-filters .dag-field label {
	display: inline-block;
	margin-bottom: 6px;
	font-weight: 800;
	font-size: 0.92rem;
}

/* Higher-contrast form text (Inventory only) */
.inventory-filters input[type="search"],
.inventory-filters input[type="text"],
.inventory-filters input[type="number"],
.inventory-filters select,
.inventory-topbar select {
	color: var(--dag-text, #101828);
}

.inventory-filters input[type="search"]::placeholder,
.inventory-filters input[type="text"]::placeholder,
.inventory-filters input[type="number"]::placeholder {
	color: rgba(16, 24, 40, 0.60);
	opacity: 1;
}

.inventory-filters input[type="search"],
.inventory-filters input[type="text"],
.inventory-filters input[type="number"],
.inventory-filters select {
	width: 100%;
	border-radius: 12px;
	border: 1px solid var(--dag-border, #E4E7EC);
	background: var(--dag-surface-2, #fff);
	padding: 10px 12px;
	outline: none;
	transition: box-shadow .15s ease, border-color .15s ease;
}

.inventory-filters input[type="search"]:focus,
.inventory-filters input[type="text"]:focus,
.inventory-filters input[type="number"]:focus,
.inventory-filters select:focus {
	border-color: rgba(17, 105, 255, 0.45);
	box-shadow: 0 0 0 4px rgba(17, 105, 255, 0.12);
}

.inventory-filters__hint {
	margin: 8px 0 0;
	font-size: 0.92rem;
	color: var(--dag-muted-2, #475467);
	line-height: 1.45;
}

.inventory-filters__actions {
	margin-top: 4px;
}

/* Help card */

.inventory-help {
	margin-top: 14px;
	border-radius: 18px;
}

.inventory-help__title {
	font-weight: 900;
	margin-bottom: 8px;
}

.inventory-help__row {
	margin-top: 8px;
}

.inventory-help a {
	text-decoration: none;
}

.inventory-help a:hover {
	text-decoration: underline;
}

/* Main bar */

.inventory-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--dag-border, #E4E7EC);
	border-radius: 16px;
	background: var(--dag-surface, #fff);
}

@media (max-width: 680px) {
	.inventory-bar {
		flex-direction: column;
		align-items: stretch;
	}
}

.inventory-found {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.inventory-range {
	color: var(--dag-muted, #667085);
	font-weight: 700;
	font-size: 0.95rem;
}

/* Sort / per-page top controls */

.inventory-topbar {
	display: flex;
	justify-content: flex-end;
}

.inventory-topbar__fields {
	display: flex;
	align-items: end;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: wrap;
}

.inventory-topbar__label {
	display: block;
	font-size: 0.85rem;
	font-weight: 850;
	margin-bottom: 6px;
	color: var(--dag-muted-2, #475467);
}

.inventory-topbar select {
	border-radius: 12px;
	border: 1px solid var(--dag-border, #E4E7EC);
	background: var(--dag-surface-2, #fff);
	padding: 10px 12px;
	outline: none;
	transition: box-shadow .15s ease, border-color .15s ease;
	min-width: 180px;
}

.inventory-topbar select:focus {
	border-color: rgba(17, 105, 255, 0.45);
	box-shadow: 0 0 0 4px rgba(17, 105, 255, 0.12);
}

@media (max-width: 680px) {
	.inventory-topbar__fields {
		align-items: stretch;
	}

	.inventory-topbar__field {
		flex: 1 1 220px;
	}

	.inventory-topbar select {
		min-width: 0;
		width: 100%;
	}
}

/* Applied filters summary */

.inventory-summary {
	margin: 12px 0 0;
	padding: 10px 12px;
	border: 1px solid var(--dag-border, #E4E7EC);
	border-radius: 16px;
	background: var(--dag-surface, #fff);
	display: flex;
	gap: 10px;
	align-items: baseline;
	flex-wrap: wrap;
}

.inventory-summary__label {
	font-weight: 950;
	letter-spacing: -0.01em;
}

.inventory-summary__text {
	color: var(--dag-muted, #667085);
	font-weight: 800;
}

/* Active filter chips */

.inventory-active {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 12px 0 14px;
}

.inv-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border-radius: 999px;
	border: 1px solid var(--dag-border, #E4E7EC);
	background: var(--dag-surface, #fff);
	color: inherit;
	text-decoration: none;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.inv-chip:hover {
	border-color: rgba(17, 105, 255, 0.35);
	box-shadow: 0 10px 20px rgba(16, 24, 40, 0.08);
	transform: translateY(-1px);
}

.inv-chip:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px rgba(17, 105, 255, 0.14);
	border-color: rgba(17, 105, 255, 0.55);
}

.inv-chip__label {
	font-weight: 750;
	font-size: 0.95rem;
}

.inv-chip__x {
	opacity: 0.7;
	font-size: 1.05rem;
	line-height: 1;
}

.inv-chip--reset {
	background: var(--dag-surface-2, #F8FAFC);
}

/* Cards grid */

.inventory-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 14px 0 18px;
}
@media (max-width: 620px) {
	.inventory-grid {
		grid-template-columns: 1fr;
	}
}

.inv-card {
	border: 1px solid var(--dag-border, #E4E7EC);
	border-radius: 18px;
	background: var(--dag-surface, #fff);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.inv-card:hover {
	transform: translateY(-2px);
	border-color: rgba(17, 105, 255, 0.30);
	box-shadow: 0 18px 35px rgba(16, 24, 40, 0.10);
}

.inv-card.is-sold {
	opacity: 0.92;
}

.inv-card.is-sold:hover {
	transform: none;
	box-shadow: none;
	border-color: var(--dag-border, #E4E7EC);
}

.inv-card.is-sold .inv-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(16, 24, 40, 0.38);
}

.inv-card.is-sold .inv-card__img {
	filter: grayscale(1) saturate(0.35);
}

.inv-card.is-sold .inv-card__body {
	opacity: 0.85;
}

.inv-card.is-sold .inv-card__cta {
	color: var(--dag-muted, #667085);
}

.inv-card__link {
	display: flex;
	flex-direction: column;
	min-height: 100%;
	color: inherit;
	text-decoration: none;
}

.inv-card__link:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px rgba(17, 105, 255, 0.14);
}

.inv-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--dag-surface-2, #F2F4F7);
}

.inv-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.inv-card__placeholder {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	color: var(--dag-muted, #667085);
	font-weight: 800;
}

.inv-card__badges {
	position: absolute;
	inset: 10px 10px auto 10px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	pointer-events: none;
}

.inv-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	padding: 6px 10px;
	font-weight: 900;
	font-size: 0.82rem;
	letter-spacing: 0.02em;
	background: rgb(0, 90, 5);
	border: 1px solid var(--dag-border, #E4E7EC);
}

.inv-badge--sold {
	background: rgba(255, 235, 235, 0.94);
	border-color: rgba(240, 68, 56, 0.25);
	color: #B42318;
}

.inv-badge--discount {
	background: rgba(235, 248, 255, 0.94);
	border-color: rgba(17, 105, 255, 0.22);
	color: #0B4DB8;
}

.inv-badge--count {
	background: var(--dag-surface-2, #F8FAFC);
}

.inv-card__body {
	padding: 14px 14px 12px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}

.inv-card__title {
	margin: 0;
	font-size: 1.06rem;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.inv-card__specs {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: baseline;
	color: var(--dag-muted, #667085);
	font-weight: 800;
	font-size: 0.95rem;
}

.inv-card__specs-label {
	color: var(--dag-muted, #667085);
	font-weight: 900;
}

.inv-card__specs-value {
	color: var(--dag-muted, #667085);
	font-weight: 800;
}

.inv-card__sub {
	color: var(--dag-muted, #667085);
	font-size: 0.95rem;
}

.inv-card__meta {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	border-top: 1px solid rgba(228, 231, 236, 0.9);
	padding-top: 12px;
	margin-top: auto;
}

.inv-meta__item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.inv-meta__label {
	color: var(--dag-muted, #667085);
	font-size: 0.85rem;
	font-weight: 800;
}

.inv-meta__value {
	font-weight: 900;
	letter-spacing: -0.01em;
}

.inv-price--old {
	text-decoration: line-through;
	opacity: 0.55;
	margin-right: 8px;
	font-weight: 800;
}

.inv-price--na {
	color: var(--dag-muted, #667085);
	font-weight: 800;
}

.inv-card__cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid rgba(228, 231, 236, 0.9);
	color: #0B4DB8;
	font-weight: 900;
}

.inv-card__cta-arrow {
	font-size: 1.05rem;
}

/* Pagination */

.inventory-pagination {
	margin-top: 8px;
}

.inventory-pagination ul {
	list-style: none;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.inventory-pagination li {
	margin: 0;
}

.inventory-pagination a,
.inventory-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: 12px;
	border: 1px solid var(--dag-border, #E4E7EC);
	background: var(--dag-surface, #fff);
	text-decoration: none;
	color: inherit;
	font-weight: 900;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.inventory-pagination a:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 24px rgba(16, 24, 40, 0.10);
	border-color: rgba(17, 105, 255, 0.35);
}

.inventory-pagination .current {
	background: rgba(17, 105, 255, 0.10);
	border-color: rgba(17, 105, 255, 0.35);
}

/* Empty state */

.inventory-empty {
	border-radius: 18px;
	padding: 16px;
	margin-top: 14px;
}

.inventory-empty__title {
	font-weight: 950;
	letter-spacing: -0.01em;
	font-size: 1.2rem;
	margin-bottom: 6px;
}

.inventory-empty__lead {
	margin: 0 0 10px;
	color: var(--dag-muted, #667085);
	line-height: 1.55;
}

.inventory-empty__list {
	margin: 0 0 14px;
	padding-left: 18px;
	color: var(--dag-muted, #667085);
}

.inventory-empty__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

/* Visit section */

.inventory-visit {
	margin-top: 28px;
}

.inventory-visit__title {
	margin: 0;
	font-size: 1.35rem;
	letter-spacing: -0.01em;
}

.inventory-visit__lead {
	margin: 8px 0 14px;
	color: var(--dag-muted, #667085);
}

.inventory-visit__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 980px) {
	.inventory-visit__grid {
		grid-template-columns: 1fr;
	}
}

.inventory-visit__card {
	border-radius: 18px;
}

.inventory-visit__label {
	font-weight: 900;
	margin-bottom: 6px;
}

.inventory-visit__value a {
	text-decoration: none;
}

.inventory-visit__value a:hover {
	text-decoration: underline;
}