/* ==========================================================
   1. Farver og fælles mål
   ========================================================== */
:root {
	--fgm-green: #087f3c;
	--fgm-green-dark: #075d30;
	--fgm-green-soft: #eaf4ec;
	--fgm-cream: #f7f1d8;
	--fgm-yellow: #f5cb00;
	--fgm-ink: #17241d;
	--fgm-muted: #5d685f;
	--fgm-line: #dce5dd;
	--fgm-radius: 16px;
	--fgm-shadow: 0 12px 34px rgba(17, 56, 34, 0.1);
}

.page-template-template-home-redesign .fgm-home {
	color: var(--fgm-ink);
	background: #fff;
}

/* ==========================================================
   2. Grundregler og tastaturfokus

   Forsidens afstand under den faste header styres af temaets
   eksisterende main-regler (100 px på desktop og 2.5em mobil).
   ========================================================== */
.fgm-home *,
.fgm-home *::before,
.fgm-home *::after {
	box-sizing: border-box;
}

.fgm-home a:focus-visible,
.fgm-home button:focus-visible {
	outline: 3px solid var(--fgm-yellow);
	outline-offset: 3px;
}

/* ==========================================================
   3. Hero
   ========================================================== */
.fgm-home-hero {
	position: relative;
	display: grid;
	min-height: clamp(340px, 43vw, 470px);
	align-items: start;
	overflow: hidden;
	background-image:
		linear-gradient(
			90deg,
			rgba(5, 47, 25, 0.92) 0%,
			rgba(5, 47, 25, 0.69) 48%,
			rgba(5, 47, 25, 0.18) 100%
		),
		var(--fgm-hero-image);
	background-position: center;
	background-size: cover;
}

.fgm-home-hero__content {
	width: min(650px, 100%);
	padding:
		clamp(34px, 4.5vw, 52px)
		clamp(22px, 6vw, 68px)
		clamp(40px, 5vw, 58px);
	color: #fff;
}

.fgm-home-eyebrow {
	margin: 0 0 8px;
	color: var(--fgm-green);
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
}

.fgm-home-hero .fgm-home-eyebrow {
	color: #fff1a5;
}

.fgm-home-hero h1 {
	max-width: 620px;
	margin: 0;
	color: #fff;
	font-size: clamp(2.25rem, 5.5vw, 4.35rem);
	font-weight: 750;
	letter-spacing: -0.035em;
	line-height: 1.02;
}

.fgm-home-hero__text {
	max-width: 590px;
	margin: 20px 0 0;
	font-size: clamp(1.02rem, 2vw, 1.25rem);
	line-height: 1.55;
}

.fgm-home-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

.fgm-button {
	display: inline-flex;
	min-height: 46px;
	align-items: center;
	justify-content: center;
	padding: 11px 18px;
	border: 2px solid transparent;
	border-radius: 999px;
	font-weight: 750;
	text-decoration: none;
	transition:
		transform 160ms ease,
		background-color 160ms ease,
		color 160ms ease;
}

.fgm-button:hover {
	transform: translateY(-2px);
}

.fgm-button--primary,
.fgm-button--primary:visited {
	background: var(--fgm-yellow);
	color: #1b261e;
}

.fgm-button--secondary,
.fgm-button--secondary:visited {
	border-color: rgba(255, 255, 255, 0.75);
	background: rgba(0, 0, 0, 0.15);
	color: #fff;
}

/* ==========================================================
   4. Fordele
   ========================================================== */
.fgm-home-benefits {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-bottom: 1px solid var(--fgm-line);
	background: #fff;
}

.fgm-home-benefits > div {
	display: flex;
	gap: 7px;
	align-items: baseline;
	justify-content: center;
	padding: 10px 14px;
	text-align: center;
}

.fgm-home-benefits > div + div {
	border-left: 1px solid var(--fgm-line);
}

.fgm-home-benefits strong {
	color: var(--fgm-green-dark);
	font-size: 0.96rem;
}

.fgm-home-benefits span {
	color: var(--fgm-muted);
	font-size: 0.82rem;
}

/* ==========================================================
   5. Fælles sektionsoverskrifter
   ========================================================== */
.fgm-home-section {
	padding:
		clamp(54px, 8vw, 88px)
		clamp(18px, 4vw, 42px);
}

.fgm-home-section__heading {
	max-width: 660px;
	margin: 0 auto 34px;
	text-align: center;
}

.fgm-home-section__heading h2,
.fgm-home-about h2 {
	margin: 0;
	color: var(--fgm-ink);
	font-size: clamp(1.8rem, 3.4vw, 2.6rem);
	letter-spacing: -0.025em;
	line-height: 1.12;
}

.fgm-home-section__heading > p:last-child {
	margin: 13px 0 0;
	color: var(--fgm-muted);
}

/* ==========================================================
   6. Produktkort
   ========================================================== */
.fgm-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}

.fgm-product-card {
	position: relative;
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--fgm-line);
	border-radius: var(--fgm-radius);
	background: #fff;
	box-shadow: 0 5px 18px rgba(17, 56, 34, 0.06);
	transition:
		border-color 180ms ease,
		box-shadow 180ms ease,
		transform 180ms ease;
}

.fgm-product-card:hover {
	transform: translateY(-4px);
	border-color: #b8cdbd;
	box-shadow: var(--fgm-shadow);
}

.fgm-product-card__image {
	position: relative;
	display: grid;
	aspect-ratio: 1 / 0.83;
	place-items: center;
	overflow: hidden;
	background: var(--fgm-green-soft);
}

.fgm-product-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform 240ms ease;
}

.fgm-product-card:hover .fgm-product-card__image img {
	transform: scale(1.035);
}

.fgm-product-card__placeholder {
	color: var(--fgm-green);
	font-size: 3rem;
}

.fgm-product-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--fgm-yellow);
	color: #283027;
	font-size: 0.75rem;
	font-weight: 800;
}

.fgm-product-card__body {
	display: flex;
	min-height: 165px;
	flex: 1;
	flex-direction: column;
	padding: 18px;
}

.fgm-product-card h3 {
	margin: 0;
	font-size: 1.02rem;
	line-height: 1.35;
}

.fgm-product-card h3 a,
.fgm-product-card h3 a:visited {
	color: var(--fgm-ink);
	text-decoration: none;
}

.fgm-product-card__price {
	margin: 12px 0 0;
	color: var(--fgm-green-dark);
	font-weight: 800;
}

.fgm-product-card__link,
.fgm-product-card__link:visited {
	margin-top: auto;
	padding-top: 17px;
	color: var(--fgm-green);
	font-size: 0.9rem;
	font-weight: 750;
	text-decoration: none;
}

.fgm-product-card__link:hover {
	text-decoration: underline;
}

.fgm-home-admin-note {
	padding: 16px;
	border: 1px dashed var(--fgm-green);
	background: var(--fgm-green-soft);
}

/* ==========================================================
   7. Nyheder og tilbud
   ========================================================== */
.fgm-home-promos {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-top: 30px;
}

.fgm-home-promo,
.fgm-home-promo:visited {
	display: grid;
	min-height: 150px;
	align-content: center;
	padding: 25px 28px;
	border-radius: var(--fgm-radius);
	color: #fff;
	text-decoration: none;
	box-shadow: 0 5px 18px rgba(17, 56, 34, 0.08);
	transition:
		transform 180ms ease,
		box-shadow 180ms ease;
}

.fgm-home-promo:hover {
	transform: translateY(-3px);
	box-shadow: var(--fgm-shadow);
}

.fgm-home-promo--news {
	background: linear-gradient(135deg, #087f3c, #075d30);
}

.fgm-home-promo--sale {
	background: linear-gradient(135deg, #665200, #8a6c00);
}

.fgm-home-promo span {
	color: #fff1a5;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.fgm-home-promo strong {
	margin-top: 4px;
	font-size: 1.45rem;
	line-height: 1.2;
}

.fgm-home-promo small {
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.82);
	font-size: 0.88rem;
}

/* ==========================================================
   8. Kategorioversigt
   ========================================================== */
.fgm-home-directory {
	padding-top: clamp(45px, 6vw, 68px);
	padding-bottom: clamp(45px, 6vw, 68px);
	background: var(--fgm-cream);
}

.fgm-home-directory .fgm-home-section__heading {
	margin-bottom: 18px;
}

.fgm-directory-list,
.fgm-directory-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fgm-directory-list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 24px;
}

.fgm-directory-list > li {
	min-width: 0;
}

.fgm-directory-list a,
.fgm-directory-list a:visited {
	display: inline-block;
	color: var(--fgm-ink);
	line-height: 1.08;
	text-decoration: none;
}

.fgm-directory-list a:hover {
	color: var(--fgm-green);
	text-decoration: underline;
}

.fgm-directory-list > li > a {
	margin-bottom: 5px;
	color: var(--fgm-green-dark);
	font-size: 1.06rem;
	font-weight: 800;
}

.fgm-directory-list .sub-menu {
	display: grid;
	gap: 0;
}

/*
 * Temaet giver normalt alle undermenulinks en fast højde
 * på 1.8em. Her nulstilles den kun i kategorioversigten.
 */
.fgm-directory-list .sub-menu li {
	min-height: 0;
	margin: 0;
	padding: 0;
}

.fgm-directory-list .sub-menu li > a,
.fgm-directory-list .sub-menu li > a:visited {
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 1px 0;
	line-height: 1.1;
}

.fgm-directory-list .sub-menu .sub-menu {
	margin: 2px 0 1px 10px;
	padding-left: 12px;
	border-left: 2px solid rgba(8, 127, 60, 0.2);
}

.fgm-directory-list .sub-menu a {
	font-size: 0.84rem;
}

.fgm-directory-list > .is-mega-group {
	grid-column: 1 / -1;
}

@media (min-width: 601px) {
	.fgm-directory-list > .is-mega-group {
		order: -1;
	}
}

.fgm-directory-list > .is-mega-group > .sub-menu {
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px 26px;
}

.fgm-directory-list > .is-mega-group > .sub-menu > li > a {
	margin-bottom: 5px;
	color: var(--fgm-green-dark);
	font-weight: 800;
}

.fgm-directory-toggle {
	display: none;
}

/* ==========================================================
   9. Om butikken og kontakt
   ========================================================== */
.fgm-home-about {
	display: grid;
	grid-template-columns:
		minmax(0, 1.7fr)
		minmax(260px, 0.8fr);
	gap: clamp(28px, 6vw, 70px);
	align-items: start;
	background: #fff;
}

.fgm-home-about__text {
	margin-top: 22px;
	color: #3f4b43;
	font-size: 1.01rem;
	line-height: 1.72;
}

.fgm-home-about__text > :first-child {
	margin-top: 0;
}

.fgm-home-about__text > :last-child {
	margin-bottom: 0;
}

.fgm-home-contact {
	padding: 28px;
	border-radius: var(--fgm-radius);
	background: var(--fgm-green-dark);
	color: #fff;
	box-shadow: var(--fgm-shadow);
}

.fgm-home-contact h2 {
	color: #fff;
	font-size: 1.5rem;
}

.fgm-home-contact address {
	margin-top: 20px;
	font-style: normal;
	line-height: 1.65;
}

.fgm-home-contact a,
.fgm-home-contact a:visited {
	color: #fff1a5;
}

.fgm-home-contact__note {
	margin-bottom: 0;
	color: rgba(255, 255, 255, 0.76);
	font-size: 0.88rem;
}

/* ==========================================================
   10. Tablet
   ========================================================== */
@media (max-width: 820px) {
	.fgm-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fgm-directory-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fgm-home-about {
		grid-template-columns: 1fr;
	}

	.fgm-home-promos {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================
   11. Mobil
   ========================================================== */
@media (max-width: 600px) {
	.fgm-home-hero {
		min-height: 430px;
		align-items: end;
		background-image:
			linear-gradient(
				0deg,
				rgba(5, 47, 25, 0.94) 0%,
				rgba(5, 47, 25, 0.7) 54%,
				rgba(5, 47, 25, 0.18) 100%
			),
			var(--fgm-hero-image);
	}

	.fgm-home-hero__content {
		padding: 42px 20px;
	}

	.fgm-home-actions,
	.fgm-button {
		width: 100%;
	}

	.fgm-home-benefits {
		grid-template-columns: 1fr;
	}

	.fgm-home-benefits > div {
		display: grid;
		grid-template-columns:
			minmax(95px, 0.7fr)
			minmax(0, 1fr);
		padding: 9px 16px;
		text-align: left;
	}

	.fgm-home-benefits > div + div {
		border-top: 1px solid var(--fgm-line);
		border-left: 0;
	}

	.fgm-home-section {
		padding: 52px 16px;
	}

	.fgm-product-grid {
		gap: 12px;
	}

	.fgm-home-promos {
		gap: 12px;
		margin-top: 20px;
	}

	.fgm-home-promo,
	.fgm-home-promo:visited {
		min-height: 128px;
		padding: 20px;
	}

	.fgm-product-card__body {
		min-height: 150px;
		padding: 14px;
	}

	.fgm-product-card h3 {
		font-size: 0.94rem;
	}

	.fgm-product-card__price,
	.fgm-product-card__link {
		font-size: 0.84rem;
	}

	.fgm-directory-list {
		display: block;
	}

	.fgm-directory-list .menu-item-has-children {
		position: relative;
	}

	.fgm-directory-list > li {
		border-bottom: 1px solid rgba(8, 127, 60, 0.2);
	}

	.fgm-directory-list > li:first-child {
		border-top: 1px solid rgba(8, 127, 60, 0.2);
	}

	.fgm-directory-list > li > a {
		display: block;
		margin: 0;
		padding: 16px 48px 16px 2px;
	}

	.fgm-directory-list .menu-item-has-children > .sub-menu,
	.fgm-directory-list > .is-mega-group > .sub-menu {
		display: none;
		padding: 0 4px 18px 14px;
	}

	.fgm-directory-list .menu-item-has-children.is-open > .sub-menu,
	.fgm-directory-list > .is-mega-group.is-open > .sub-menu {
		display: grid;
		grid-template-columns: 1fr;
	}

	.fgm-directory-list .sub-menu .menu-item-has-children > a {
		display: block;
		padding: 7px 42px 7px 0;
		font-weight: 750;
	}

	.fgm-directory-list .sub-menu .sub-menu {
		margin-left: 0;
		padding: 4px 0 10px 13px;
	}

	.fgm-directory-toggle {
		position: absolute;
		top: 1px;
		right: 0;
		display: grid;
		width: 40px;
		height: 40px;
		padding: 0;
		place-items: center;
		border: 0;
		border-radius: 50%;
		background: rgba(8, 127, 60, 0.09);
		color: var(--fgm-green-dark);
		font-size: 1.25rem;
		line-height: 1;
		cursor: pointer;
	}

	.fgm-directory-list > li > .fgm-directory-toggle {
		top: 8px;
	}

	.fgm-directory-list .menu-item-has-children.is-open >
	.fgm-directory-toggle {
		transform: rotate(45deg);
	}

	.fgm-home-contact {
		padding: 24px 20px;
	}
}

/* ==========================================================
   12. Reduceret bevægelse
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
	.fgm-home *,
	.fgm-home *::before,
	.fgm-home *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}