/*
Theme Name:  MarktPlaner
Theme URI:   https://heimartmarkt.de
Description: Minimales Theme für MarktPlaner SaaS – öffentliche Marktübersicht, WooCommerce-Buchung. Logo und Primärfarbe per Customizer individualisierbar.
Version:     1.1.5
Author:      MarktPlaner
Text Domain: marktplaner-theme
*/

/* ═══════════════════════════════════════════════════════════
   CSS Custom Properties – werden per functions.php befüllt
   ═══════════════════════════════════════════════════════════ */
:root {
	--mp-primary:      #16a34a;
	--mp-primary-dark: #15803d;
	--mp-primary-bg:   #f0fdf4;
	--mp-text:         #111827;
	--mp-text-muted:   #6b7280;
	--mp-border:       #e5e7eb;
	--mp-surface:      #ffffff;
	--mp-bg:           #f9fafb;
	--mp-radius:       10px;
	--mp-font:         -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ═══════════════════════════════════════════════════════════
   Reset & Base
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
	margin: 0; padding: 0;
	font-family: var(--mp-font);
	font-size: 16px; line-height: 1.6;
	color: var(--mp-text);
	background: var(--mp-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mp-primary); }
a:hover { color: var(--mp-primary-dark); }

/* ═══════════════════════════════════════════════════════════
   Layout
   ═══════════════════════════════════════════════════════════ */
.mp-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}
.mp-content { padding: 40px 0 60px; }

/* ═══════════════════════════════════════════════════════════
   Header
   ═══════════════════════════════════════════════════════════ */
.mp-header {
	background: var(--mp-surface);
	border-bottom: 1px solid var(--mp-border);
	position: sticky; top: 0; z-index: 100;
	box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.mp-header-inner {
	display: flex; align-items: center;
	gap: 20px; height: 64px;
}
.mp-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mp-logo img { height: 36px; width: auto; }
.mp-logo-text { font-size: 18px; font-weight: 700; color: var(--mp-text); }
.mp-logo-text span { color: var(--mp-primary); }

.mp-header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.mp-header-nav a {
	display: flex; align-items: center; gap: 5px;
	padding: 7px 14px; border-radius: 8px;
	font-size: 14px; font-weight: 500; color: var(--mp-text-muted);
	text-decoration: none; transition: all .15s;
}
.mp-header-nav a:hover { background: var(--mp-primary-bg); color: var(--mp-primary); }

/* Warenkorb-Zähler */
.mp-cart-count {
	background: var(--mp-primary); color: #fff;
	font-size: 11px; font-weight: 700;
	min-width: 18px; height: 18px; border-radius: 99px;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0 5px;
}

/* ═══════════════════════════════════════════════════════════
   Hero / Seiten-Titel
   ═══════════════════════════════════════════════════════════ */
.mp-hero {
	background: linear-gradient(135deg, var(--mp-primary) 0%, var(--mp-primary-dark) 100%);
	color: #fff; padding: 48px 0 40px;
}
.mp-hero h1 { margin: 0 0 8px; font-size: 32px; font-weight: 800; }
.mp-hero p  { margin: 0; font-size: 17px; opacity: .88; }

/* ═══════════════════════════════════════════════════════════
   Markt-Übersicht: Suche & Filter
   ═══════════════════════════════════════════════════════════ */
.mp-search-bar {
	background: var(--mp-surface);
	border-bottom: 1px solid var(--mp-border);
	padding: 16px 0;
	position: sticky; top: 64px; z-index: 99;
}
.mp-search-inner {
	display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.mp-search-input {
	flex: 1; min-width: 200px;
	padding: 10px 14px;
	border: 1.5px solid var(--mp-border); border-radius: var(--mp-radius);
	font-size: 14px; font-family: var(--mp-font);
	transition: border-color .15s;
}
.mp-search-input:focus { outline: none; border-color: var(--mp-primary); }
.mp-sort-select {
	padding: 10px 14px;
	border: 1.5px solid var(--mp-border); border-radius: var(--mp-radius);
	font-size: 14px; font-family: var(--mp-font);
	background: #fff; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   Markt-Kacheln
   ═══════════════════════════════════════════════════════════ */
.mp-markets-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-top: 28px;
}
.mp-market-card {
	background: var(--mp-surface);
	border: 1px solid var(--mp-border);
	border-radius: 14px;
	overflow: hidden;
	transition: box-shadow .2s, transform .2s;
	text-decoration: none; color: inherit;
	display: flex; flex-direction: column;
}
.mp-market-card:hover {
	box-shadow: 0 8px 28px rgba(0,0,0,.1);
	transform: translateY(-2px);
	color: inherit;
}
.mp-market-card-img {
	height: 160px; background: var(--mp-primary-bg);
	display: flex; align-items: center; justify-content: center;
	font-size: 48px; overflow: hidden;
}
.mp-market-card-img img { width: 100%; height: 100%; object-fit: cover; }
.mp-market-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.mp-market-card-title { font-size: 17px; font-weight: 700; color: var(--mp-text); margin: 0; }
.mp-market-card-date  { font-size: 13px; color: var(--mp-primary); font-weight: 600; }
.mp-market-card-loc   { font-size: 13px; color: var(--mp-text-muted); }
.mp-market-card-desc  { font-size: 13px; color: var(--mp-text-muted); line-height: 1.5;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-market-card-footer {
	padding: 12px 18px; border-top: 1px solid var(--mp-border);
	display: flex; align-items: center; justify-content: space-between;
}
.mp-market-card-cat {
	font-size: 12px; font-weight: 600; color: var(--mp-primary);
	background: var(--mp-primary-bg); padding: 3px 10px; border-radius: 99px;
}
.mp-market-card-arrow { font-size: 18px; color: var(--mp-text-muted); }

/* Kein Ergebnis */
.mp-no-results { text-align: center; padding: 60px 20px; color: var(--mp-text-muted); }
.mp-no-results-icon { font-size: 48px; margin-bottom: 12px; }

/* ═══════════════════════════════════════════════════════════
   Einzel-Seite (Markt-Shortcode)
   ═══════════════════════════════════════════════════════════ */
.mp-page-title {
	font-size: 28px; font-weight: 800; margin: 0 0 4px; color: var(--mp-text);
}
.mp-page-subtitle { color: var(--mp-text-muted); font-size: 14px; margin: 0 0 24px; }
.mp-page-content { background: var(--mp-surface); border-radius: 14px;
	border: 1px solid var(--mp-border); overflow: hidden; }

/* ═══════════════════════════════════════════════════════════
   WooCommerce Basis
   ═══════════════════════════════════════════════════════════ */
.woocommerce { max-width: 100%; }
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #payment #place_order,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	background: var(--mp-primary) !important;
	color: #fff !important;
	border-radius: var(--mp-radius) !important;
	border: none !important;
	font-weight: 600 !important;
	padding: 11px 22px !important;
	font-size: 14px !important;
	transition: background .15s !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover { background: var(--mp-primary-dark) !important; }

/* ═══════════════════════════════════════════════════════════
   Footer
   ═══════════════════════════════════════════════════════════ */
.mp-footer {
	background: var(--mp-surface);
	border-top: 1px solid var(--mp-border);
	padding: 24px 0;
	margin-top: 40px;
}
.mp-footer-inner {
	display: flex; align-items: center; justify-content: space-between;
	flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--mp-text-muted);
}
.mp-footer-links { display: flex; gap: 16px; }
.mp-footer-links a { color: var(--mp-text-muted); text-decoration: none; }
.mp-footer-links a:hover { color: var(--mp-primary); }

/* ═══════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
	.mp-hero { padding: 32px 0 28px; }
	.mp-hero h1 { font-size: 24px; }
	.mp-markets-grid { grid-template-columns: 1fr; gap: 14px; }
	.mp-header-inner { height: 56px; }
	.mp-logo-text { font-size: 16px; }
	.mp-container { padding: 0 16px; }
}

/* ── Suche: Zurücksetzen-Button + Ergebnis-Info ─────────────────── */
.mp-clear-btn {
	padding: 9px 14px; border-radius: var(--mp-radius); font-size: 13px;
	color: var(--mp-text-muted); text-decoration: none; white-space: nowrap;
	border: 1.5px solid var(--mp-border); transition: all .15s;
}
.mp-clear-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
.mp-search-result-info { font-size: 14px; color: var(--mp-text-muted); margin: 0 0 16px; }

/* ── Rechtliche Seiten (Impressum / Datenschutz) ────────────────── */
.mp-legal-page { max-width: 760px; margin: 0 auto; background: var(--mp-surface);
	border: 1px solid var(--mp-border); border-radius: 14px; padding: 36px 40px; }
.mp-legal-content { line-height: 1.7; color: var(--mp-text); font-size: 15px; }
.mp-legal-content h2 { margin-top: 28px; font-size: 18px; }
.mp-legal-content p { margin: 0 0 14px; }
.mp-legal-content a { word-break: break-word; }
@media (max-width: 600px) {
	.mp-legal-page { padding: 22px 18px; }
}

/* ── Markt-Einzelansicht ────────────────────────────────────────── */
.mp-single-back { display: inline-block; margin-bottom: 14px; font-size: 13px;
	color: var(--mp-text-muted); text-decoration: none; }
.mp-single-back:hover { color: var(--mp-primary); }
.mp-single-content { margin-bottom: 20px; line-height: 1.65; color: var(--mp-text); }
