/* ==========================================
   INVENTORY PAGE - SIDEBAR LAYOUT
   ========================================== */

.inventory-page {
	padding: 2rem 0 5rem;
	min-height: calc(100vh - var(--nav-offset));
	overflow-x: hidden;
}

/* Page Header */
.page-header {
	margin-bottom: 1.5rem;
}

.page-header h1 {
	font-family: var(--font-display);
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	color: var(--primary);
	margin: 0;
	letter-spacing: -0.01em;
}

/* Results Control Bar */
.results-control-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.5rem;
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(11, 45, 91, 0.06);
	border: 1px solid var(--gray-200);
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
	gap: 1rem;
}

.results-count {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
}

.count-number {
	font-family: var(--font-display);
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--primary);
	line-height: 1;
}

.count-text {
	font-size: 0.9375rem;
	color: var(--gray-600);
	font-weight: 500;
}

.results-controls {
	display: flex;
	gap: 2rem;
	align-items: center;
}

.control-group {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.control-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gray-700);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.control-select {
	padding: 0.625rem 2.5rem 0.625rem 1rem;
	border: 1.5px solid var(--gray-300);
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--primary);
	background: white;
	cursor: pointer;
	transition: all 0.2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230b2d5b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	min-width: 180px;
}

.control-select:hover {
	border-color: var(--primary);
	background-color: var(--primary-soft);
}

.control-select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Feature Pills Bar */
.feature-pills-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem 1.5rem;
	background: white;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(11, 45, 91, 0.06);
	border: 1px solid var(--gray-200);
	margin-bottom: 2rem;
	overflow: hidden;
}

.pills-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gray-700);
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
	flex-shrink: 0;
}

.pills-container {
	flex: 1;
	position: relative;
	overflow: hidden;
}

.pills-scroll {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	scroll-behavior: smooth;
	padding: 0.25rem 0;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.pills-scroll::-webkit-scrollbar {
	display: none;
}

.feature-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border: 1.5px solid var(--gray-300);
	border-radius: 999px;
	background: white;
	color: var(--gray-700);
	font-size: 0.875rem;
	font-weight: 500;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.feature-pill:hover {
	border-color: var(--primary);
	color: var(--primary);
	background: var(--primary-soft);
}

.feature-pill.active {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

.feature-pill.active:hover {
	background: #0a2651;
	border-color: #0a2651;
}

.feature-pill svg {
	flex-shrink: 0;
}

.pills-scroll-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: white;
	border: 1.5px solid var(--gray-300);
	border-radius: 50%;
	color: var(--primary);
	cursor: pointer;
	transition: all 0.2s ease;
	z-index: 10;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pills-scroll-btn:hover {
	background: var(--primary);
	color: white;
	border-color: var(--primary);
}

.pills-scroll-left {
	left: 0.5rem;
}

.pills-scroll-right {
	right: 0.5rem;
}

.pills-scroll-btn svg {
	flex-shrink: 0;
}

/* Vehicles Container */
.vehicles-container {
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

/* Main Layout Grid */
.inventory-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 2rem;
	align-items: start;
	width: 100%;
	max-width: 100%;
	overflow-x: hidden;
}

/* Sidebar Filters */
.filters-sidebar {
	background: white;
	border-radius: 12px;
	padding: 1.5rem;
	box-shadow: 0 2px 12px rgba(11, 45, 91, 0.06);
	border: 1px solid var(--gray-200);
	position: sticky;
	top: 100px;
	width: 280px;
	min-width: 280px;
}

.sidebar-header {
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 2px solid var(--gray-100);
}

.sidebar-header h2 {
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--primary);
	margin: 0;
}

.filter-form {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.filter-section {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	margin-bottom: 1.25rem;
}

.filter-section-sort {
	padding-top: 1rem;
	border-top: 2px solid var(--gray-100);
}

.filter-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* More Filters Toggle */
.more-filters-toggle {
	width: 100%;
	padding: 0.875rem 1rem;
	background: var(--gray-50);
	border: 1.5px solid var(--gray-200);
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--primary);
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 1rem 0 0.75rem;
}

.more-filters-toggle:hover {
	background: var(--primary-soft);
	border-color: var(--primary);
}

.more-filters-toggle .toggle-icon {
	transition: transform 0.3s ease;
}

.more-filters-toggle.active .toggle-icon {
	transform: rotate(180deg);
}

/* Advanced Filters */
.advanced-filters {
	display: none;
	flex-direction: column;
	gap: 1.25rem;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.advanced-filters.open {
	display: flex;
	max-height: 2000px;
	opacity: 1;
	margin-bottom: 1rem;
}

.filter-label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--gray-700);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1.5px solid var(--gray-200);
	border-radius: 8px;
	font-size: 0.9375rem;
	font-family: var(--font-sans);
	color: var(--gray-900);
	background: var(--surface);
	transition: all 0.2s ease;
}

.filter-input::placeholder {
	color: var(--gray-400);
}

.filter-input:focus,
.filter-select:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px var(--primary-soft);
}

.filter-select {
	cursor: pointer;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235b6b7d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.5rem;
}

/* Filter Actions */
.filter-actions {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--gray-200);
}

.apply-filters-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1rem;
	background: var(--primary);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	width: 100%;
}

.apply-filters-btn:hover {
	background: #083358;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(11, 45, 91, 0.3);
}

.clear-filters-btn {
	display: block;
	padding: 0.75rem 1rem;
	background: transparent;
	color: var(--accent);
	border: 1.5px solid var(--accent);
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	text-align: center;
	text-decoration: none;
}

.clear-filters-btn:hover {
	background: var(--accent);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(200, 29, 37, 0.3);
}

/* Active Filter Count Badge */
.filter-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	background: var(--accent);
	color: white;
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 10px;
	margin-left: 0.5rem;
}

/* Vehicles Container */
.vehicles-container {
	position: relative;
}

/* Vehicles Grid */
.vehicles-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

/* Vehicle Card */
.vehicle-card {
	background: white;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(11, 45, 91, 0.06);
	border: 1px solid var(--gray-200);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.vehicle-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(11, 45, 91, 0.12);
}

/* Vehicle Image Wrapper */
.vehicle-image-wrapper,
.vehicle-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4/3;
	overflow: hidden;
	background: #f5f5f5;
	isolation: isolate;
	border-radius: 12px 12px 0 0;
}

.vehicle-image-wrapper img,
.vehicle-image img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	transition: transform 0.4s ease;
	z-index: 1;
}

.vehicle-card:hover .vehicle-image-wrapper img,
.vehicle-card:hover .vehicle-image img {
	transform: scale(1.05);
}

/* Badge Group */
.badge-group {
	position: absolute;
	top: 1rem;
	left: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	z-index: 3;
}

.badge {
	position: absolute;
	top: 1rem;
	left: 1rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(8px);
	width: fit-content;
	z-index: 3;
}

.badge-group .badge {
	position: static;
}

.badge-featured {
	background: var(--accent);
	color: white;
}

.badge-new {
	background: var(--primary);
	color: white;
}

.badge-deal {
	background: #10b981;
	color: white;
}

/* Card Actions */
.card-actions {
	position: absolute;
	top: 1rem;
	right: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	z-index: 10;
	opacity: 0;
	transform: translateX(10px);
	transition: all 0.3s ease;
	pointer-events: none;
}

.card-actions.visible,
.vehicle-card:hover .card-actions {
	opacity: 1;
	transform: translateX(0);
	pointer-events: auto;
}

.action-btn {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	flex-shrink: 0;
	z-index: 11;
	pointer-events: auto;
}

.action-btn:hover {
	background: var(--primary);
	transform: scale(1.1);
	box-shadow: 0 6px 16px rgba(11, 45, 91, 0.25);
}

.action-btn:hover svg {
	stroke: white;
}

.action-btn svg {
	stroke: var(--gray-700);
	transition: stroke 0.2s ease;
}

/* Vehicle Content */
.vehicle-content,
.vehicle-info {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

/* Vehicle Title Row */
.vehicle-title-row,
.vehicle-header {
	margin-bottom: 1rem;
}

.vehicle-title h3,
.vehicle-header h2 {
	font-family: var(--font-display);
	font-size: 1.375rem;
	font-weight: 700;
	color: var(--gray-900);
	margin: 0 0 0.25rem 0;
	line-height: 1.2;
}

.vehicle-subtitle,
.vehicle-trim {
	font-size: 0.9375rem;
	color: var(--gray-600);
	margin: 0;
	font-weight: 500;
}

.vehicle-year {
	display: none;
}

/* Vehicle Specs */
.vehicle-specs,
.vehicle-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 1rem 0;
	border-top: 1px solid var(--gray-200);
	border-bottom: 1px solid var(--gray-200);
	margin-bottom: auto;
}

.spec-item,
.stat {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--gray-700);
	white-space: nowrap;
	font-weight: 500;
}

.spec-item svg,
.stat svg {
	color: var(--gray-400);
	flex-shrink: 0;
}

/* Vehicle Features */
.vehicle-features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding: 0.75rem 0;
}

.feature-tag {
	padding: 0.375rem 0.75rem;
	background: var(--gray-100);
	color: var(--gray-700);
	font-size: 0.8125rem;
	font-weight: 600;
	border-radius: 6px;
	border: 1px solid var(--gray-200);
	transition: all 0.2s ease;
}

.feature-tag:hover {
	background: var(--primary-soft);
	color: var(--primary);
	border-color: var(--primary);
}

/* Vehicle Footer */
.vehicle-footer,
.vehicle-bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
}

.price-section {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.price-label {
	display: none;
}

.price-value,
.vehicle-price {
	font-family: var(--font-display);
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--primary);
	line-height: 1;
}

.btn-primary,
.btn-view {
	padding: 0.75rem 1.5rem;
	background: var(--primary);
	color: white;
	text-decoration: none;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.btn-primary:hover,
.btn-view:hover {
	background: var(--primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(11, 45, 91, 0.2);
}

/* No Results State */
.no-results {
	text-align: center;
	padding: 4rem 2rem;
	background: white;
	border-radius: 12px;
	border: 1px solid var(--gray-200);
}

.no-results svg {
	width: 80px;
	height: 80px;
	color: var(--gray-300);
	margin-bottom: 1.5rem;
}

.no-results h3 {
	font-family: var(--font-display);
	font-size: 1.5rem;
	color: var(--gray-900);
	margin-bottom: 0.5rem;
}

.no-results p {
	color: var(--gray-600);
	margin-bottom: 1.5rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
	.inventory-layout {
		grid-template-columns: 260px 1fr;
		gap: 1.5rem;
	}
}

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

	.filters-sidebar {
		position: static;
		margin-bottom: 2rem;
	}

	.vehicles-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

@media (max-width: 768px) {
	.inventory-page {
		padding: 1.5rem 0 4rem;
	}

	.page-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.sidebar-header h2 {
		font-size: 1.125rem;
	}

	.filter-group {
		gap: 0.375rem;
	}

	.clear-filters-btn {
		width: 100%;
	}

	.filter-bar {
		padding: 1.25rem;
	}

	.filter-item {
		flex: 1 1 100%;
	}

	.clear-filters-btn {
		width: 100%;
	}
}

@media (max-width: 640px) {
	.vehicles-grid {
		grid-template-columns: 1fr;
		gap: 1.5rem;
	}

	.results-control-bar {
		flex-direction: column;
		align-items: stretch;
		padding: 1rem;
	}

	.results-controls {
		flex-direction: column;
		gap: 1rem;
		width: 100%;
	}

	.control-group {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
	}

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

	.feature-pills-bar {
		padding: 1rem;
	}

	.pills-label {
		font-size: 0.8125rem;
	}

	.feature-pill {
		font-size: 0.8125rem;
		padding: 0.45rem 0.875rem;
	}

	.vehicle-title h3,
	.vehicle-header h2 {
		font-size: 1.25rem;
	}

	.vehicle-year {
		font-size: 1rem;
		padding: 0.4rem 0.75rem;
	}

	.price-value,
	.vehicle-price {
		font-size: 1.5rem;
	}

	.vehicle-footer,
	.vehicle-bottom {
		flex-direction: column;
		align-items: stretch;
	}

	.btn-primary,
	.btn-view {
		width: 100%;
		text-align: center;
	}

	.card-actions {
		opacity: 1;
		transform: translateX(0);
	}
}

@media (max-width: 560px) {
	.page-header h1 {
		font-size: 1.75rem;
	}

	.filter-bar {
		padding: 1rem;
	}

	.filter-input,
	.filter-select {
		padding: 0.625rem 0.875rem;
		font-size: 0.875rem;
	}

	.vehicle-content,
	.vehicle-info {
		padding: 1.25rem;
	}

	.vehicle-specs,
	.vehicle-stats {
		flex-direction: column;
		gap: 0.75rem;
	}

	.spec-item {
		grid-column: span 2;
	}
	
	.inventory-page {
		padding: 1rem 0 3rem;
	}
	
	.sidebar-header h2 {
		font-size: 1rem;
	}
	
	.filter-label {
		font-size: 0.8125rem;
	}
	
	.apply-filters-btn {
		padding: 0.75rem 1.25rem;
		font-size: 0.875rem;
	}
	
	.pagination-container {
		margin: 2rem 0 1.5rem;
		padding-top: 2rem;
	}
	
	.pagination-info {
		font-size: 0.875rem;
	}
}

/* ==========================================
   PAGINATION STYLES
   ========================================== */

.pagination-container {
	margin: 4rem 0 3rem;
	padding-top: 3rem;
	border-top: 1px solid var(--gray-200);
}

.pagination-info {
	text-align: center;
	color: var(--text-secondary);
	font-size: 0.9375rem;
	margin-bottom: 1.5rem;
	font-weight: 500;
}

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.pagination-numbers {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.pagination-number {
	min-width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text-primary);
	background: white;
	border: 1px solid var(--gray-200);
	transition: all 0.2s ease;
	text-decoration: none;
	cursor: pointer;
}

.pagination-number:hover {
	background: var(--gray-50);
	border-color: var(--primary);
	color: var(--primary);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(11, 45, 91, 0.1);
}

.pagination-number.active {
	background: var(--primary) !important;
	color: white !important;
	border-color: var(--primary) !important;
	cursor: default;
	box-shadow: 
		0 4px 16px rgba(11, 45, 91, 0.4),
		0 0 0 4px rgba(11, 45, 91, 0.15) !important;
	font-weight: 700;
	transform: scale(1.15);
	pointer-events: none;
}

.pagination-ellipsis {
	color: var(--text-secondary);
	padding: 0 0.25rem;
	font-weight: 600;
}

.pagination-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	border-radius: 8px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--text-primary);
	background: white;
	border: 1px solid var(--gray-200);
	transition: all 0.2s ease;
	text-decoration: none;
	cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
	background: var(--primary);
	border-color: var(--primary);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(11, 45, 91, 0.2);
}

.pagination-btn.disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.pagination-btn svg {
	width: 16px;
	height: 16px;
}

/* Mobile Pagination Styles */
@media (max-width: 768px) {
	.pagination-container {
		margin: 2rem 0;
		padding-top: 2rem;
	}

	.pagination {
		gap: 0.5rem;
	}

	.pagination-btn span {
		display: none;
	}

	.pagination-btn {
		padding: 0.625rem;
		min-width: 2.5rem;
		justify-content: center;
	}

	.pagination-number {
		min-width: 2.25rem;
		height: 2.25rem;
		font-size: 0.875rem;
	}

	.pagination-info {
		font-size: 0.875rem;
		margin-bottom: 1rem;
	}
}
