/* Index Page Styles - Enhanced */
.listings-grid {
	display: grid;
	gap: 2rem;
	padding: 1rem;
	animation: fadeIn 0.5s ease-out forwards;
}

.listing-item {
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.listing-item:hover {
	transform: translateY(-5px);
	box-shadow: var(--hover-shadow);
}

/* Header Section */
.page-header {
	background: linear-gradient(
		135deg,
		var(--primary-light),
		rgba(255, 255, 255, 0.9)
	);
	border-radius: 15px;
	padding: 2rem;
	margin-bottom: 2rem;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-light);
	position: relative;
	overflow: hidden;
}

.page-header::after {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	opacity: 0.1;
	z-index: 0;
}

.display-4 {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--primary-dark);
	margin-bottom: 1rem;
	position: relative;
	z-index: 1;
}

.lead {
	color: var(--text-secondary);
	font-size: 1.2rem;
	margin-bottom: 0;
	position: relative;
	z-index: 1;
	max-width: 650px;
}

/* Create Auction Button */
.create-auction-btn {
	background: var(--gradient-primary);
	border: none;
	padding: 1rem 2rem;
	font-weight: 600;
	border-radius: 10px;
	transition: all 0.3s ease;
	color: var(--text-light);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	box-shadow: var(--shadow-sm);
}

.create-auction-btn:hover {
	transform: translateY(-2px);
	box-shadow: var(--hover-shadow);
	color: var(--text-light);
}

.create-auction-btn i {
	transition: transform 0.3s ease;
}

.create-auction-btn:hover i {
	transform: rotate(90deg);
}

/* Filter Card */
.filter-card {
	background: var(--card-bg);
	border-radius: 12px;
	border: 1px solid var(--border-light);
	box-shadow: var(--shadow-sm);
	transition: all 0.3s ease;
	margin-bottom: 2rem;
}

.filter-card:hover {
	box-shadow: var(--shadow-md);
}

.filter-card .form-label {
	color: var(--text-secondary);
	font-weight: 600;
	font-size: 0.9rem;
}

.filter-card .form-select,
.filter-card .form-control {
	background-color: var(--bg-secondary-form);
	border: 1px solid var(--border-color);
	color: var(--text-primary);
	border-radius: 8px;
	padding: 0.75rem;
	transition: all 0.3s ease;
}

.filter-card .form-select:focus,
.filter-card .form-control:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 0.2rem rgba(15, 91, 171, 0.15);
	background-color: var(--bg-main);
}

.filter-card .btn-outline-primary {
	color: var(--primary-color);
	border-color: var(--primary-color);
	border-radius: 8px;
	padding: 0.75rem 1.5rem;
	font-weight: 600;
	transition: all 0.3s ease;
}

.filter-card .btn-outline-primary:hover {
	background-color: var(--primary-color);
	color: var(--text-light);
	transform: translateY(-2px);
	box-shadow: var(--shadow-sm);
}

/* Empty State */
.empty-state {
	text-align: center;
	padding: 4rem 2rem;
	background: var(--card-bg);
	border-radius: 15px;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-light);
	animation: fadeIn 0.5s ease-out forwards;
}

.empty-state i {
	font-size: 4rem;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
	opacity: 0.5;
}

.empty-state h4 {
	color: var(--text-primary);
	font-weight: 700;
	margin-bottom: 1rem;
	font-size: 1.75rem;
}

.empty-state p {
	color: var(--text-secondary);
	margin-bottom: 2rem;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.empty-state .btn {
	padding: 1rem 2rem;
	font-weight: 600;
	border-radius: 10px;
}

/* Recently viewed section */
.recently-viewed-section {
	margin-top: 3rem;
	padding: 2rem;
	background: var(--card-bg);
	border-radius: 15px;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--border-light);
}

.recently-viewed-title {
	font-size: 1.5rem;
	color: var(--text-primary);
	margin-bottom: 1.5rem;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.card-body {
	color: var(--text-primary);
}

.recently-viewed-title i {
	color: var(--primary-color);
}

/* Form elements dark mode support */
[data-theme='dark'] .card-body {
	background: var(--card-bg);
}

[data-theme='dark'] .page-header {
	background: linear-gradient(
		135deg,
		rgba(15, 23, 42, 0.8),
		rgba(30, 41, 59, 0.8)
	);
	border-color: var(--border-color);
}

[data-theme='dark'] .display-4 {
	color: var(--text-primary);
}

[data-theme='dark'] .empty-state {
	background-color: var(--card-bg);
	border-color: var(--border-color);
}

[data-theme='dark'] .filter-card {
	background-color: var(--card-bg);
	border-color: var(--border-color);
}

[data-theme='dark'] .recently-viewed-section {
	background-color: var(--card-bg);
	border-color: var(--border-color);
}

[data-theme='dark'] .form-select {
	background-color: var(--bg-secondary-form);
	border-color: var(--border-color);
	color: var(--text-primary);
}

[data-theme='dark'] .btn-outline-primary {
	color: var(--primary-light);
	border-color: var(--primary-color);
}

[data-theme='dark'] .btn-outline-primary:hover {
	background-color: var(--primary-color);
	color: var(--text-light);
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

[data-theme='dark'] .form-label {
	color: var(--text-secondary);
}

/* Desktop and Tablet (≥768px) */
@media (min-width: 768px) {
	.listings-grid {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}

	.card {
		height: 100%;
		display: flex;
		flex-direction: column;
	}

	.auction-card .row {
		flex-direction: row;
		height: 100%;
	}

	.image-container {
		border-radius: 0.375rem 0 0 0.375rem;
		max-height: 220px;
		height: 100%;
		object-fit: cover;
	}
}

/* Mobile (<768px) */
@media (max-width: 767px) {
	.listings-grid {
		grid-template-columns: 1fr;
		gap: 1.25rem;
	}

	.auction-card {
		margin-bottom: 1rem;
	}

	.auction-card .row {
		flex-direction: column;
	}

	.col-md-4,
	.col-md-8 {
		width: 100%;
	}

	.image-container {
		border-radius: 0.375rem 0.375rem 0 0;
		max-height: 200px;
		width: 100%;
	}

	.card-body {
		padding: 1.25rem;
	}

	.page-header {
		padding: 1.5rem;
		text-align: center;
	}

	.display-4 {
		font-size: 1.75rem;
		margin-bottom: 0.75rem;
	}

	.lead {
		font-size: 1rem;
		margin: 0 auto 1.5rem;
	}

	.card-title {
		font-size: 1.25rem;
	}

	.price-tag {
		font-size: 1.1rem;
	}

	.description-text {
		font-size: 0.95rem;
	}

	.empty-state {
		padding: 3rem 1rem;
	}

	.empty-state h4 {
		font-size: 1.5rem;
	}

	.filter-card .form-select,
	.filter-card .form-control {
		font-size: 0.95rem;
	}
}

/* Small Mobile (<576px) */
@media (max-width: 576px) {
	.listings-grid {
		padding: 0.5rem;
		gap: 1rem;
	}

	.card-body {
		padding: 1rem;
	}

	.card-title {
		font-size: 1.1rem;
	}

	.empty-state {
		padding: 2rem 1rem;
	}

	.empty-state i {
		font-size: 3rem;
	}

	.empty-state h4 {
		font-size: 1.25rem;
	}

	.empty-state p {
		font-size: 0.95rem;
	}

	.filter-card {
		padding: 0.75rem;
	}

	.page-header {
		padding: 1.25rem;
	}

	.display-4 {
		font-size: 1.5rem;
	}

	.create-auction-btn {
		padding: 0.75rem 1.5rem;
		font-size: 0.95rem;
	}

	.recently-viewed-title {
		font-size: 1.25rem;
	}
}
