/**
 * Santanyi Flohmarkt - Frontend Styles
 */

/* Container */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Sale Items Grid */
.sale-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	margin: 30px 0;
}

.sale-items-grid.columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.sale-items-grid.columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.sale-items-grid.columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

/* Sale Item Card */
.sale-item-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	position: relative;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sale-item-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.sale-item-card.sold {
	opacity: 0.6;
}

.sale-item-card.reserved {
	opacity: 0.8;
}

/* Sold/Reserved Overlays */
.sold-overlay,
.reserved-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.7);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 10;
	color: #fff;
	font-weight: bold;
}

.sold-text,
.reserved-text {
	font-size: 2.5em;
	text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
	letter-spacing: 3px;
}

.sold-date {
	font-size: 1.2em;
	margin-top: 10px;
	opacity: 0.9;
}

/* Item Image */
.item-image {
	position: relative;
	height: 250px;
	overflow: hidden;
}

.item-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.sale-item-card:hover .item-image img {
	transform: scale(1.05);
}

.no-image {
	width: 100%;
	height: 100%;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 1.2em;
}

/* Item Details */
.item-details {
	padding: 20px;
}

.item-title {
	margin: 0 0 10px 0;
	font-size: 1.3em;
	line-height: 1.3;
}

.item-title a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.item-title a:hover {
	color: #007cba;
}

.item-brand {
	color: #666;
	font-size: 0.9em;
	margin: 0 0 10px 0;
}

.item-condition {
	margin: 0 0 15px 0;
	font-size: 0.9em;
}

.item-price {
	margin: 15px 0;
}

.price {
	font-size: 1.5em;
	font-weight: bold;
	color: #2e7d32;
}

.item-excerpt {
	margin: 15px 0;
	color: #666;
	line-height: 1.5;
}

.item-meta {
	margin: 15px 0;
}

.item-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.category-tag {
	background: #e3f2fd;
	color: #1976d2;
	padding: 4px 8px;
	border-radius: 12px;
	font-size: 0.8em;
	text-decoration: none;
	transition: background 0.3s ease;
}

.category-tag:hover {
	background: #bbdefb;
}

.item-actions {
	margin-top: 20px;
}

/* Buttons */
.btn {
	display: inline-block;
	padding: 10px 20px;
	background: #007cba;
	color: #fff;
	text-decoration: none;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 1em;
	transition: background 0.3s ease;
}

.btn:hover {
	background: #005a87;
}

.btn-primary {
	background: #007cba;
}

.btn-primary:hover {
	background: #005a87;
}

.btn-secondary {
	background: #666;
}

.btn-secondary:hover {
	background: #444;
}

.btn-large {
	padding: 15px 30px;
	font-size: 1.1em;
}

/* Single Item Page */
.sale-item-single {
	margin: 30px 0;
}

.sold-banner,
.reserved-banner {
	background: #d32f2f;
	color: #fff;
	padding: 20px;
	text-align: center;
	margin-bottom: 30px;
	border-radius: 8px;
}

.reserved-banner {
	background: #f57c00;
}

.sold-banner h2,
.reserved-banner h2 {
	margin: 0;
	font-size: 2.5em;
	letter-spacing: 3px;
}

.item-header {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
}

.item-gallery {
	position: relative;
}

.main-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.no-image-large {
	width: 100%;
	height: 400px;
	background: #f5f5f5;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #999;
	font-size: 1.5em;
	border-radius: 8px;
}

.item-info h1 {
	margin: 0 0 20px 0;
	color: #333;
}

.item-details p {
	margin: 8px 0;
}

.item-price-section {
	background: #f8f9fa;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
}

.current-price {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.price-label {
	font-size: 1.2em;
	color: #666;
}

.price-amount {
	font-size: 2.5em;
	font-weight: bold;
	color: #2e7d32;
}

.original-price {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.original-price-label {
	color: #666;
}

.original-price-amount {
	text-decoration: line-through;
	color: #999;
	font-size: 1.2em;
}

.savings {
	color: #2e7d32;
	font-weight: bold;
	font-size: 1.1em;
}

.item-condition {
	margin: 20px 0;
}

.condition-badge {
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.9em;
	font-weight: bold;
	margin-left: 10px;
}

.condition-new { background: #c8e6c9; color: #2e7d32; }
.condition-like-new { background: #dcedc8; color: #558b2f; }
.condition-excellent { background: #f0f4c3; color: #827717; }
.condition-good { background: #fff3e0; color: #ef6c00; }
.condition-fair { background: #ffecb3; color: #f57f17; }
.condition-poor { background: #ffcdd2; color: #c62828; }

.contact-section {
	background: #e8f5e8;
	padding: 20px;
	border-radius: 8px;
	margin: 20px 0;
}

.contact-section h3 {
	margin: 0 0 15px 0;
	color: #2e7d32;
}

.contact-info {
	background: #fff;
	padding: 15px;
	border-radius: 4px;
	border-left: 4px solid #2e7d32;
}

.item-actions {
	display: flex;
	gap: 15px;
	margin: 30px 0;
}

/* Item Content */
.item-content {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	margin: 40px 0;
}

.item-description h2,
.item-specifications h2 {
	margin: 0 0 20px 0;
	color: #333;
	border-bottom: 2px solid #007cba;
	padding-bottom: 10px;
}

.specifications-table {
	width: 100%;
	border-collapse: collapse;
}

.specifications-table td {
	padding: 12px;
	border-bottom: 1px solid #e0e0e0;
}

.specifications-table td:first-child {
	width: 40%;
	font-weight: bold;
}

.status-badge {
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.9em;
	font-weight: bold;
}

.status-available { background: #c8e6c9; color: #2e7d32; }
.status-reserved { background: #fff3e0; color: #ef6c00; }
.status-sold { background: #ffcdd2; color: #c62828; }

.item-categories-tags {
	margin: 30px 0;
}

.item-categories h3,
.item-tags h3 {
	margin: 0 0 15px 0;
	color: #333;
}

.category-tags,
.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.item-tag {
	background: #e1f5fe;
	color: #0277bd;
	padding: 6px 12px;
	border-radius: 16px;
	text-decoration: none;
	font-size: 0.9em;
	transition: background 0.3s ease;
}

.item-tag:hover {
	background: #b3e5fc;
}

.contact-form-section {
	background: #f8f9fa;
	padding: 30px;
	border-radius: 8px;
	margin: 40px 0;
}

.contact-form-section h2 {
	margin: 0 0 20px 0;
	color: #333;
}

.contact-details {
	background: #fff;
	padding: 20px;
	border-radius: 4px;
	border-left: 4px solid #007cba;
}

/* Archive Page */
.sale-items-archive {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 40px;
}

.archive-header {
	margin-bottom: 40px;
}

.archive-title {
	margin: 0 0 15px 0;
	color: #333;
}

.archive-description {
	color: #666;
	font-size: 1.1em;
	line-height: 1.6;
}

.archive-filters {
	background: #f8f9fa;
	padding: 30px;
	border-radius: 8px;
	margin-bottom: 40px;
}

.filter-section {
	margin-bottom: 30px;
}

.filter-section:last-child {
	margin-bottom: 0;
}

.filter-section h3 {
	margin: 0 0 15px 0;
	color: #333;
}

.status-filters,
.category-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.filter-btn {
	padding: 8px 16px;
	background: #fff;
	color: #333;
	text-decoration: none;
	border: 1px solid #ddd;
	border-radius: 20px;
	transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
	background: #007cba;
	color: #fff;
	border-color: #007cba;
}

.pagination {
	text-align: center;
	margin: 40px 0;
}

.pagination a,
.pagination span {
	display: inline-block;
	padding: 10px 15px;
	margin: 0 5px;
	background: #fff;
	color: #333;
	text-decoration: none;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
	background: #007cba;
	color: #fff;
	border-color: #007cba;
}

.no-items-found {
	text-align: center;
	padding: 60px 20px;
}

.no-items-found h2 {
	margin: 0 0 15px 0;
	color: #333;
}

.no-items-found p {
	color: #666;
	margin-bottom: 30px;
}

/* Archive Sidebar */
.archive-sidebar {
	background: #f8f9fa;
	padding: 30px;
	border-radius: 8px;
	height: fit-content;
}

.widget {
	margin-bottom: 30px;
}

.widget:last-child {
	margin-bottom: 0;
}

.widget h3 {
	margin: 0 0 20px 0;
	color: #333;
	border-bottom: 2px solid #007cba;
	padding-bottom: 10px;
}

.stats-list,
.category-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.stats-list li,
.category-list li {
	padding: 8px 0;
	border-bottom: 1px solid #e0e0e0;
}

.stats-list li:last-child,
.category-list li:last-child {
	border-bottom: none;
}

.category-list a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.category-list a:hover {
	color: #007cba;
}

/* Responsive Design */
@media (max-width: 768px) {
	.sale-items-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.sale-items-grid.columns-2,
	.sale-items-grid.columns-3,
	.sale-items-grid.columns-4 {
		grid-template-columns: 1fr;
	}
	
	.item-header {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.item-content {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.sale-items-archive {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.archive-sidebar {
		order: -1;
	}
	
	.status-filters,
	.category-filters {
		flex-direction: column;
	}
	
	.filter-btn {
		text-align: center;
	}
	
	.item-actions {
		flex-direction: column;
	}
	
	.btn {
		width: 100%;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.container {
		padding: 0 15px;
	}
	
	.sold-text,
	.reserved-text {
		font-size: 2em;
		letter-spacing: 2px;
	}
	
	.price-amount {
		font-size: 2em;
	}
	
	.item-details {
		padding: 15px;
	}
	
	.archive-filters {
		padding: 20px;
	}
	
	.archive-sidebar {
		padding: 20px;
	}
}
