/*
Theme Name: Gutschein Marien
Description: Eigenständiges, schlankes Theme für gutschein.automarien.de — kein Elementor nötig. Header/Footer im Marien-Familien-Design (dunkel, roter Akzent), eigenes WooCommerce-Styling für Produkt, Warenkorb und Kasse.
Author: VOAP
Version: 1.0.0
Text Domain: gutschein-marien
*/

:root {
	--gm-primary: #b91400;
	--gm-primary-dark: #8f0f00;
	--gm-black: #0d0d0d;
	--gm-dark: #161616;
	--gm-text: #e9e9e9;
	--gm-muted: #a3a3a3;
	--gm-border: #2a2a2a;
	--gm-white: #ffffff;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Poppins", sans-serif;
	color: #1a1a1a;
	background: #fff;
}

h1, h2, h3, h4, h5, h6,
.gm-logo, .gm-nav a, .gm-cta,
.woocommerce div.product .product_title,
.woocommerce table.shop_table th {
	font-family: "Montserrat", sans-serif;
}

a {
	color: var(--gm-primary);
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

.gm-container {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ===== Header ===== */

.gm-topbar {
	background: var(--gm-black);
	color: var(--gm-muted);
	font-size: 13px;
}

.gm-topbar .gm-container {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 20px;
	padding-top: 8px;
	padding-bottom: 8px;
}

.gm-topbar a {
	color: var(--gm-white);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* Telefon-/Mail-Icons immer rot — nur die direkten Links, nicht die
   Social-Icons (die liegen verschachtelt in .gm-socials). */
.gm-topbar .gm-container > a svg {
	color: var(--gm-primary);
}

.gm-topbar .gm-socials {
	display: flex;
	gap: 10px;
	margin-right: auto;
}

/* Social-Icons: kein Hintergrund, weiß, beim Hover rot */
.gm-topbar .gm-socials a {
	width: auto;
	height: auto;
	background: none;
	color: var(--gm-white);
	justify-content: center;
}

.gm-topbar .gm-socials a:hover {
	color: var(--gm-primary);
}

.gm-contacts {
	display: flex;
	align-items: center;
	gap: 20px;
}

.gm-header {
	background: var(--gm-dark);
	border-bottom: 1px solid var(--gm-border);
	/* Notwendig, damit das mobile Dropdown-Menü (position:absolute, top:100%)
	   sich relativ zum Header aufspannt statt — mangels positioniertem
	   Vorfahren — relativ zum gesamten Dokument (top:100% der Seitenhöhe =
	   landet unten beim Footer). */
	position: relative;
	z-index: 50;
}

.gm-header .gm-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 14px;
	padding-bottom: 14px;
}

.gm-logo {
	flex: 0 0 20%;
	max-width: 20%;
}

.gm-logo img {
	display: block;
	max-height: 48px;
	width: auto;
	max-width: 100%;
}

.gm-nav {
	display: flex;
	align-items: center;
	gap: 28px;
	flex: 1;
	justify-content: center;
}

.gm-nav ul {
	list-style: none;
	display: flex;
	gap: 28px;
	margin: 0;
	padding: 0;
}

.gm-nav li {
	position: relative;
}

.gm-nav a {
	color: var(--gm-text);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 8px 0;
	display: inline-block;
	border-bottom: 2px solid transparent;
}

.gm-nav a:hover,
.gm-nav .current-menu-item > a {
	color: var(--gm-white);
	border-bottom-color: var(--gm-primary);
}

.gm-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--gm-dark);
	border: 1px solid var(--gm-border);
	min-width: 180px;
	list-style: none;
	margin: 0;
	padding: 6px 0;
	z-index: 20;
}

.gm-nav li:hover > .sub-menu {
	display: block;
}

.gm-nav .sub-menu a {
	display: block;
	padding: 8px 16px;
	text-transform: none;
	border-bottom: none;
}

.gm-cta {
	display: inline-block;
	background: var(--gm-primary);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 12px 22px;
	border-radius: 2px;
	white-space: nowrap;
}

.gm-cta:hover {
	background: var(--gm-primary-dark);
	color: #fff;
}

.gm-menu-toggle {
	display: none;
	background: none;
	border: none;
	color: var(--gm-text);
	font-size: 26px;
	cursor: pointer;
}

@media (max-width: 600px) {
	/* Kompaktere Seitenränder auf kleinen Screens — 24px auf beiden Seiten
	   sind auf einem 390px-Telefon spürbar viel (~12% der Breite). */
	.gm-container {
		padding: 0 14px;
	}
}

@media (max-width: 900px) {
	.gm-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		/* Ohne eigenen z-index rutscht das Menü optisch hinter später im DOM
		   folgende Inhalte (z. B. das Produktbild) statt immer obenauf zu
		   liegen. */
		z-index: 100;
		background: var(--gm-dark);
		flex-direction: column;
		padding: 16px 24px;
	}
	.gm-nav.is-open {
		display: flex;
	}
	.gm-nav ul {
		flex-direction: column;
		gap: 4px;
		width: 100%;
	}
	.gm-nav .sub-menu {
		position: static;
		border: none;
		background: transparent;
		padding-left: 12px;
	}
	.gm-header .gm-container {
		flex-wrap: wrap;
	}
	.gm-menu-toggle {
		display: block;
	}

	/* Logo etwas größer, Beratungs-Button weg (Kundenwunsch: auf Mobil
	   braucht der schmale Header den Platz, der Button wiederholt sich eh
	   im Footer/auf der Kontaktseite). */
	.gm-logo {
		flex: 0 0 38%;
		max-width: 38%;
	}
	.gm-cta {
		display: none;
	}

	/* Topbar: Social-Icons und Kontaktzeile dürfen untereinander umbrechen,
	   aber Telefon+Email bleiben als Einheit zusammen auf einer Zeile
	   (kleinere Schrift statt Umbruch mitten im Kontakt). */
	.gm-topbar .gm-container {
		flex-wrap: wrap;
		justify-content: center;
		text-align: center;
		row-gap: 6px;
	}
	.gm-topbar {
		font-size: 12px;
	}
	.gm-contacts {
		gap: 14px;
	}
}

/* ===== Footer ===== */

.gm-footer {
	background: #050505;
	color: var(--gm-white);
	padding-top: 56px;
}

.gm-footer-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 40px;
	padding-bottom: 40px;
}

.gm-footer h3 {
	color: var(--gm-white);
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--gm-border);
}

.gm-footer p,
.gm-footer li {
	font-size: 14px;
	line-height: 1.5;
	margin: 0 0 4px;
	color: var(--gm-white);
}

.gm-footer ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gm-footer a {
	color: var(--gm-white);
}

.gm-footer a:hover {
	color: var(--gm-primary);
}

.gm-footer-contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.gm-footer-contact .gm-icon {
	color: var(--gm-primary);
	flex-shrink: 0;
	width: 16px;
	text-align: center;
}

.gm-footer-bottom {
	border-top: 1px solid var(--gm-border);
	padding: 18px 0;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	font-size: 14px;
	color: var(--gm-white);
}

.gm-footer-bottom a {
	color: var(--gm-white);
}

.gm-footer-bottom a:hover {
	color: var(--gm-primary);
}

.gm-footer-bottom .gm-legal a + a {
	margin-left: 16px;
	padding-left: 16px;
	border-left: 1px solid var(--gm-white);
}

@media (max-width: 900px) {
	.gm-footer-grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 560px) {
	.gm-footer-grid {
		grid-template-columns: 1fr;
	}
}
