/* Block content: page and article text, landing page sections, and the few block styles the
   theme offers. Width and alignment come from WordPress' constrained layout (theme.json). */

.entry-content > * + * {
	margin-block-start: var(--wp--style--block-gap, 1.25rem);
}

.entry-content > :first-child {
	margin-block-start: 0;
}

/* Prose rules carry no class weight (:where), so components placed in content, such as the
   product card, keep their own heading, list and image styles. */

:where(.entry-content) h2 {
	margin-top: 2.25rem;
}

:where(.entry-content) h3 {
	margin-top: 1.75rem;
}

:where(.entry-content) ul,
:where(.entry-content) ol {
	padding-left: 1.4em;
}

:where(.entry-content) li + li {
	margin-top: 0.3em;
}

:where(.entry-content) img {
	border-radius: var(--utomhus-radius);
}

.entry-content figcaption {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.entry-content--single {
	max-width: var(--wp--style--global--content-size);
}

.entry-image {
	margin: 0 0 1.75rem;
}

.entry-image img {
	width: 100%;
	max-height: 520px;
	object-fit: cover;
	border-radius: var(--utomhus-radius);
}

/* ---- Landing page sections ---- */

.entry-content > .section,
.entry-content > .wp-block-cover.alignfull,
.entry-content > .wp-block-group.alignfull {
	margin-block: 0;
}

.section {
	padding-block: clamp(2rem, 1.25rem + 2vw, 3rem);
}

/* Under a page title (the page template's header), the first section needs no top padding:
   the header already gives the space. */
.page-header + .entry-content > .section:first-child {
	padding-block-start: 0.5rem;
}

/* A single image placed straight in a section spans it (the page kit's "Image"). */
.section > .wp-block-image img {
	width: 100%;
	height: auto;
}

/* Text placed straight in a wide section keeps a readable line length. */
.section > :is(p, .wp-block-list) {
	max-width: 48rem;
}

/* Facts under an intro, and image-and-text rows that follow each other, get room between. */
.section > * + .facts {
	margin-block-start: var(--wp--preset--spacing--60);
}

.wp-block-media-text + .wp-block-media-text {
	margin-block-start: var(--wp--preset--spacing--70);
}

/* Section header: an optional eyebrow, the one title, an optional lead, and an optional
   "Se alle" link on the right, level with the header's last line. */
.section-header {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	column-gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.section-header > * {
	grid-column: 1;
	margin: 0;
}

.section-header > .eyebrow {
	margin-bottom: 0.35rem;
}

.section-header > .lead {
	margin-top: 0.6rem;
}

.section-header > .section-header__link {
	grid-column: 2;
	grid-row: 1 / span 3;
	align-self: end;
}

.section-header h2 {
	font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem);
}

/* Eyebrow: the short line above a title. Lead: the intro text under it. */
.eyebrow {
	margin-bottom: 0.4rem;
	color: var(--wp--preset--color--primary);
	font-size: var(--utomhus-text-xs);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.eyebrow + :is(h1, h2, h3, h4) {
	margin-block-start: 0 !important;
}

.lead {
	max-width: 48rem;
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.section-header__link a {
	color: var(--wp--preset--color--primary);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.section-header__link a::after {
	content: " →";
}

.section-header__link a:hover {
	text-decoration: underline;
}

/* Tinted band (group block style "Farget bånd"): the section's background reaches the screen
   edges (a spread shadow, clipped to the section's height, so nothing overflows sideways)
   while its content keeps the page's edges. */
.is-style-tinted {
	background: var(--wp--preset--color--surface-warm);
	box-shadow: 0 0 0 100vmax var(--wp--preset--color--surface-warm);
	clip-path: inset(0 -100vmax);
}

/* Light panel (group block style "Lys flate") inside article text. */
.is-style-surface {
	background: var(--wp--preset--color--surface);
}

.wp-block-group.is-style-surface {
	padding: var(--wp--preset--spacing--60) var(--utomhus-gutter);
}

/* Cards (group block style "Kort"): a rounded panel. A first image fills the card's top edge
   at a 4:3 crop, so titles in a row line up. "Kort med hel figur" shows the image whole
   (portraits, cut-outs, diagrams). Cards on a tinted band are white. */
:is(.wp-block-group, .wp-block-column):is(.is-style-card, .is-style-card-contain) {
	--card-padding: var(--wp--preset--spacing--50);
	padding: var(--card-padding);
	overflow: hidden;
	border-radius: var(--utomhus-radius);
	background: var(--wp--preset--color--surface);
}

/* Cards in a grid or carousel are compact; a panel on its own (in article text) keeps the
   normal spacing. */
:is([class*="grid-columns-"], .carousel__track) > :is(.is-style-card, .is-style-card-contain) > * + * {
	margin-block-start: 0.6rem;
}

:is(.is-style-card, .is-style-card-contain) > .wp-block-image:first-child {
	aspect-ratio: 4 / 3;
	margin: calc(-1 * var(--card-padding)) calc(-1 * var(--card-padding)) 0;
}

:is(.is-style-card, .is-style-card-contain) > .wp-block-image:first-child + * {
	margin-block-start: 1.1rem;
}

:is(.is-style-card, .is-style-card-contain) > .wp-block-image:first-child img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.is-style-card-contain > .wp-block-image:first-child {
	padding: var(--card-padding) var(--card-padding) 0;
}

.is-style-card-contain > .wp-block-image:first-child img {
	object-fit: contain;
}

:is(.is-style-card, .is-style-card-contain) h3 {
	font-size: var(--wp--preset--font-size--large);
}

:is(.is-style-card, .is-style-card-contain) h4 {
	margin-block-start: 1rem;
	font-size: 0.9375rem;
}

.is-style-tinted :is(.is-style-card, .is-style-card-contain) {
	background: var(--wp--preset--color--white);
}

/* Banners: cover blocks with large headings, as on the front page. */
.wp-block-cover {
	min-height: 360px;
	padding: var(--wp--preset--spacing--60) var(--utomhus-gutter);
	border-radius: 0;
}

.wp-block-cover:not(.alignfull) {
	border-radius: var(--utomhus-radius);
	overflow: hidden;
}

.wp-block-cover .wp-block-cover__inner-container {
	max-width: var(--utomhus-max);
	color: var(--wp--preset--color--white);
}

.wp-block-cover h1,
.wp-block-cover h2,
.wp-block-cover h3 {
	color: inherit;
}

.wp-block-cover .wp-block-buttons {
	justify-content: center;
}

.wp-block-cover .has-accent-color,
.wp-block-cover .eyebrow {
	color: var(--wp--preset--color--accent);
}

/* Banner slider: a group of cover blocks marked "slider" scrolls sideways; theme.js adds
   buttons. Without JS the slides can be swiped. */
.slider {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	border-radius: var(--utomhus-radius);
}

.slider::-webkit-scrollbar {
	display: none;
}

.slider > * {
	margin: 0 !important;
	scroll-snap-align: start;
}

.slider .wp-block-cover {
	min-height: clamp(280px, 38vw, 460px);
}

/* Front page hero: the category panel beside the slider. The grid's children carry no
   margins (the group's flow layout would give the slider a top margin), so the panel and the
   slider share their top and bottom edges. */
.hero {
	display: grid;
	grid-template-columns: var(--utomhus-sidebar) minmax(0, 1fr);
	gap: var(--wp--preset--spacing--50);
	align-items: stretch;
}

.wp-block-group.hero > * {
	margin: 0;
}

/* The panel is the side menu ([utomhus_categories layout="list"]), stretched to the row. */
.hero__categories {
	display: flex;
	flex-direction: column;
}

.hero__categories > .side-nav {
	flex: 1;
}

/* theme.js wraps the slider for its buttons; the wrapper passes the row height on. */
.hero .slider-wrap {
	display: flex;
	flex-direction: column;
}

.hero .slider {
	flex: 1;
}

.hero .slider .wp-block-cover {
	min-height: clamp(320px, 36vw, 480px);
	padding-inline: clamp(1.5rem, 5vw, 4rem);
}

/* Hero slides and banners: text left-aligned over a gradient that darkens the left side only. */
.hero .wp-block-cover .wp-block-cover__background,
.wp-block-cover.banner .wp-block-cover__background {
	background: linear-gradient(90deg, rgb(0 0 0 / 0.62), rgb(0 0 0 / 0.3) 50%, rgb(0 0 0 / 0) 85%) !important;
	opacity: 1 !important;
}

.hero .wp-block-cover__inner-container > *,
.wp-block-cover.banner .wp-block-cover__inner-container > * {
	max-width: 34rem;
	margin-left: 0 !important;
}

.hero .wp-block-cover h2,
.wp-block-cover.banner h2 {
	font-size: clamp(1.75rem, 1rem + 2.4vw, 2.75rem);
	line-height: 1.1;
}

.wp-block-cover.banner h1 {
	font-size: clamp(2rem, 1.1rem + 2.8vw, 3.25rem);
	line-height: 1.05;
}

.hero .wp-block-cover .wp-block-buttons,
.wp-block-cover.banner .wp-block-buttons {
	justify-content: flex-start;
}

/* Banners (cover blocks marked "banner"): wide and rounded, between sections. */
.wp-block-cover.banner {
	min-height: clamp(320px, 32vw, 440px);
	padding-inline: clamp(1.5rem, 5vw, 4rem);
}

/* Short banner: a call to action between sections. */
.wp-block-cover.banner--short {
	min-height: clamp(240px, 22vw, 320px);
}

.entry-content > .wp-block-cover.banner {
	margin-block: 0;
}

/* A banner that opens a page sits below the header like a section's content. */
.entry-content > .wp-block-cover.banner:first-child {
	margin-top: clamp(1.25rem, 0.75rem + 1.5vw, 2rem);
}

/* A banner and a tinted band both have their own background, so they get space between them
   (next to a white section, the section's own padding gives the space). */
.entry-content > .wp-block-cover.banner + .is-style-tinted,
.entry-content > .is-style-tinted + .wp-block-cover.banner {
	margin-top: clamp(2rem, 1.25rem + 2vw, 3rem);
}

@media (max-width: 900px) {
	.hero {
		grid-template-columns: minmax(0, 1fr);
	}

	.hero__categories {
		display: none;
	}
}

/* Slide dots, added by theme.js to sliders with more than one slide. */
.slider-wrap {
	position: relative;
}

.slider-dots {
	position: absolute;
	bottom: 1rem;
	left: 50%;
	z-index: 2;
	display: flex;
	gap: 0.4rem;
	transform: translateX(-50%);
}

.slider-dots__dot {
	width: 0.5rem;
	height: 0.5rem;
	padding: 0;
	border: 0;
	border-radius: var(--utomhus-radius-pill);
	background: rgb(255 255 255 / 0.55);
	cursor: pointer;
	transition: width 0.2s ease, background-color 0.2s ease;
}

.slider-dots__dot[aria-current="true"] {
	width: 1.5rem;
	background: var(--wp--preset--color--white);
}

/* Trust bar: the shop's selling points (icon boxes) in one rounded band under the hero. */
.trust-bar {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1rem 1.5rem;
	padding: 1.25rem 1.5rem;
	border-radius: var(--utomhus-radius);
	background: var(--wp--preset--color--surface-warm);
}

.wp-block-group.trust-bar > * {
	margin: 0;
}

.trust-bar .icon-box[class*="icon-box--"] {
	grid-template-columns: 2.75rem 1fr;
	align-content: center;
	column-gap: 0.75rem;
}

/* The icon sits on a tinted circle (::after) in the first column. */
.trust-bar .icon-box[class*="icon-box--"]::before,
.trust-bar .icon-box[class*="icon-box--"]::after {
	grid-row: 1 / span 2;
	grid-column: 1;
	align-self: center;
	justify-self: center;
}

.trust-bar .icon-box[class*="icon-box--"]::before {
	position: relative;
	z-index: 1;
	width: 1.4rem;
	height: 1.4rem;
}

.trust-bar .icon-box[class*="icon-box--"]::after {
	content: "";
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: color-mix(in srgb, var(--wp--preset--color--brand) 16%, transparent);
}

.trust-bar .icon-box h3 {
	font-size: 0.9375rem;
}

.trust-bar .icon-box p {
	font-size: var(--utomhus-text-xs);
}

@media (max-width: 1100px) {
	.trust-bar {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Phones: one row that swipes sideways. */
@media (max-width: 760px) {
	.trust-bar {
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-auto-columns: 72%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.trust-bar::-webkit-scrollbar {
		display: none;
	}

	.trust-bar > * {
		scroll-snap-align: start;
	}
}

/* Category tiles ([utomhus_categories]): an image per category, the name below. Category
   photos fill the tile; product images (the fallback) sit contained on the light tile. */
.category-tiles {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-tile {
	margin: 0;
}

.category-tile a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.category-tile__image {
	display: block;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: var(--utomhus-radius);
	background: var(--wp--preset--color--surface);
	isolation: isolate;
}

.category-tile__image img {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.category-tile--product .category-tile__image img {
	padding: 0.75rem;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.category-tile a:hover img {
	transform: scale(1.04);
}

.category-tile__name {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-top: 0.6rem;
	font-weight: 600;
}

.category-tile__name::after {
	opacity: 0.4;
}

.category-tile a:hover .category-tile__name {
	color: var(--wp--preset--color--primary);
}

@media (max-width: 760px) {
	.category-tiles {
		grid-auto-flow: column;
		grid-template-columns: none;
		grid-auto-columns: 42%;
		gap: 0.75rem;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}

	.category-tiles::-webkit-scrollbar {
		display: none;
	}

	.category-tile {
		scroll-snap-align: start;
	}
}

/* Promo cards (columns marked "promo-cards"): equal cards; images sit in a frame of one size,
   so the titles, texts and buttons of the cards line up. */
.promo-cards > .wp-block-column {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	padding: 0 var(--wp--preset--spacing--50) var(--wp--preset--spacing--50);
	border-radius: var(--utomhus-radius);
	background: var(--wp--preset--color--surface);
}

.wp-block-columns.promo-cards > .wp-block-column > * {
	margin: 0 0 0.75rem;
}

/* overflow: hidden lets the aspect ratio win over the image's own height. */
.wp-block-columns.promo-cards .wp-block-image {
	aspect-ratio: 16 / 9;
	margin: 0 calc(var(--wp--preset--spacing--50) * -1) 1.25rem;
	overflow: hidden;
	background: var(--wp--preset--color--white);
}

.promo-cards .wp-block-image img {
	width: 100%;
	height: 100%;
	border-radius: 0;
	object-fit: contain;
}

.promo-cards h2 {
	font-size: var(--wp--preset--font-size--x-large);
}

.wp-block-columns.promo-cards .wp-block-buttons {
	margin: auto 0 0;
	padding-top: 0.5rem;
}

/* Tables in content. */
.wp-block-table table {
	font-size: var(--wp--preset--font-size--small);
}

.wp-block-table thead {
	border-bottom: 2px solid var(--wp--preset--color--text);
}

/* Gallery (core gallery block): a grid of photos cropped to one 4:3 shape, as many columns as
   the block is set to (two on phones); each photo can open in WordPress's lightbox. Core's
   selectors carry an id-level :not() and a columns class, so these match that weight. */
.wp-block-gallery.has-nested-images {
	display: grid;
	grid-template-columns: repeat(var(--gallery-columns, 3), minmax(0, 1fr));
	gap: var(--wp--preset--spacing--40);
}

.wp-block-gallery.has-nested-images.columns-2 { --gallery-columns: 2; }
.wp-block-gallery.has-nested-images.columns-4 { --gallery-columns: 4; }

.wp-block-gallery.has-nested-images[class] figure.wp-block-image:not(#individual-image) {
	width: auto;
	margin: 0;
	aspect-ratio: 4 / 3;
}

.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--utomhus-radius);
}

@media (max-width: 600px) {
	.wp-block-gallery.has-nested-images {
		--gallery-columns: 2;
	}
}

/* Product presentation: the page kit sections of the synced pattern chosen on the product
   (the plugin's fields.php), at the bottom of the product page. */
.product-presentation {
	margin-top: var(--wp--preset--spacing--70);
}

/* Icon boxes (page kit "Ikonliste"): a title and text with an icon drawn from the theme's
   icon set via CSS masks, so the content stays plain blocks. */
.icon-box {
	display: grid;
	grid-template-columns: 1fr;
	align-content: start;
	gap: 0.15rem;
}

.icon-box > * {
	margin: 0;
}

/* The title is a heading, or the first paragraph in a box without one (contact details stay
   paragraphs); further paragraphs are muted. */
.icon-box > :is(h2, h3, h4),
.icon-box > p:first-child {
	color: var(--wp--preset--color--text);
	font-size: 1rem;
	font-weight: 600;
}

.icon-box > :is(h2, h3, h4, p) ~ p {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

.icon-box[class*="icon-box--"] {
	grid-template-columns: 2.25rem 1fr;
	column-gap: 0.85rem;
}

.icon-box[class*="icon-box--"] > * {
	grid-column: 2;
}

.icon-box[class*="icon-box--"]::before {
	content: "";
	grid-row: 1 / span 3;
	width: 2.25rem;
	height: 2.25rem;
	background: var(--wp--preset--color--primary);
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}

.icon-box--calendar {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5' width='16' height='15' rx='2'/%3E%3Cpath d='M4 10h16M9 3v4M15 3v4'/%3E%3C/svg%3E");
}

.icon-box--truck {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h11v10H3zM14 10h4l3 3v3h-7'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E");
}

.icon-box--award {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='5'/%3E%3Cpath d='m8.5 13-1.5 8 5-3 5 3-1.5-8'/%3E%3C/svg%3E");
}

.icon-box--leaf {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 19c0-8 5-13 15-14-1 10-6 15-14 15'/%3E%3Cpath d='M5 19 13 11'/%3E%3C/svg%3E");
}

.icon-box--trailer {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8h14v8H2zM16 14h6'/%3E%3Ccircle cx='7' cy='17.5' r='1.8'/%3E%3C/svg%3E");
}

.icon-box--check {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

.icon-box--info {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E");
}

.icon-box--phone,
.contact-list a[href^="tel:"] {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.6 3.8 9 3.2l1.6 4.2-2 1.4a12 12 0 0 0 6.6 6.6l1.4-2 4.2 1.6-.6 2.4a2 2 0 0 1-2 1.5A16.8 16.8 0 0 1 3.4 5.8a2 2 0 0 1 1.5-2Z'/%3E%3C/svg%3E");
}

.icon-box--mail,
.contact-list a[href^="mailto:"] {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3.5 6.5 8.5 6.5 8.5-6.5'/%3E%3C/svg%3E");
}

.icon-box--pin {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s7-5.6 7-11.2A7 7 0 0 0 5 9.8C5 15.4 12 21 12 21Z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.icon-box--clock {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.icon-box--download {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0 4.5-4.5M12 15l-4.5-4.5M5 19h14'/%3E%3C/svg%3E");
}

.icon-box--cart {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4h2l2.4 11.2a2 2 0 0 0 2 1.6h7.7a2 2 0 0 0 2-1.5L21 8H6.2'/%3E%3Ccircle cx='10' cy='20' r='1.2'/%3E%3Ccircle cx='17' cy='20' r='1.2'/%3E%3C/svg%3E");
}

.icon-box--shield {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 5 6v5.5c0 4.3 3 8 7 9.5 4-1.5 7-5.2 7-9.5V6l-7-3Z'/%3E%3C/svg%3E");
}

.icon-box--drop {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5s-6 6.4-6 10.8a6 6 0 0 0 12 0C18 9.9 12 3.5 12 3.5Z'/%3E%3C/svg%3E");
}

.icon-box--tool {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.8-3.8a6 6 0 0 1-7.9 7.9l-6.9 6.9a2.1 2.1 0 0 1-3-3l6.9-6.9a6 6 0 0 1 7.9-7.9l-3.8 3.8Z'/%3E%3C/svg%3E");
}

.icon-box--sun {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4'/%3E%3C/svg%3E");
}

.icon-box--flower {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5'/%3E%3C/svg%3E");
}

/* Contact list: phone and e-mail links, each with its icon (taken from the link's tel: or
   mailto: address, using the icon box icons above). */
ul.contact-list {
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--small);
}

.contact-list li + li {
	margin-top: 0.35rem;
}

.contact-list a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	overflow-wrap: anywhere;
}

.contact-list a[href^="tel:"]::before,
.contact-list a[href^="mailto:"]::before {
	content: "";
	flex: none;
	width: 1rem;
	height: 1rem;
	background: currentColor;
	-webkit-mask: var(--icon) center / contain no-repeat;
	mask: var(--icon) center / contain no-repeat;
}

/* Image and text (core/media-text): the image at a 4:3 crop beside the text, on the left or
   the right; WordPress stacks them on phones. Block style "Hel figur" shows cut-outs and
   diagrams whole instead of cropping them. Core block CSS prints before the theme's, so
   these rules override it at equal weight, on the site and in the editor. */
.wp-block-media-text {
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(1.5rem, 0.75rem + 3vw, 4rem);
}

.wp-block-media-text.has-media-on-the-right {
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.wp-block-media-text > .wp-block-media-text__content {
	padding: 0;
}

.wp-block-media-text:not(.is-style-contain) .wp-block-media-text__media img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--utomhus-radius);
}

/* The image keeps its width and height ratio (so its space is reserved before it loads) and
   is fitted inside a 30rem high box. */
.wp-block-media-text.is-style-contain .wp-block-media-text__media img {
	max-height: 30rem;
	object-fit: contain;
}

@media (max-width: 600px) {
	.wp-block-media-text.is-stacked-on-mobile {
		row-gap: 1.25rem;
	}
}

/* Facts: key figures and product specifications, a label over a bold value, under a line
   that starts green. */
.facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
	gap: 1.5rem 2rem;
}

.facts > *,
.fact > * {
	margin: 0;
}

.fact {
	position: relative;
	padding-top: 0.85rem;
	border-top: 1px solid var(--wp--preset--color--border);
}

.fact::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	width: 2rem;
	height: 2px;
	background: var(--wp--preset--color--brand);
}

.fact > .fact__value {
	margin-top: 0.3rem;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 600;
	line-height: 1.3;
}

/* Logo row: partner and membership logos at one height, each with an optional title and
   text below. */
.logo-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: var(--wp--preset--spacing--60) var(--wp--preset--spacing--50);
}

.wp-block-group.logo-row > * {
	margin: 0;
}

.logo-row .wp-block-image {
	margin-bottom: 1rem;
}

.logo-row .wp-block-image img {
	width: auto;
	max-width: 100%;
	height: 4.5rem;
	object-fit: contain;
	object-position: left center;
	border-radius: 0;
}

.logo-row h3 {
	font-size: 1rem;
}

.logo-row p {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* Lists of names (list block style "Kolonner"): several columns, no bullets. */
.wp-block-list.is-style-columns {
	padding-left: 0;
	columns: 4 11rem;
	column-gap: 2rem;
	list-style: none;
}

.wp-block-list.is-style-columns li {
	margin: 0;
	padding-block: 0.2rem;
	break-inside: avoid;
}

/* Text, wide blocks and the page title share one left edge: WordPress centers the narrow
   content column by default, which would indent text relative to the title. */
.entry-content.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
	margin-left: max(0px, calc((100% - var(--utomhus-max)) / 2)) !important;
	margin-right: auto !important;
}

/* Card grids: grid-columns-N, fewer columns on smaller screens. */
[class*="grid-columns-"] {
	display: grid;
	grid-template-columns: repeat(var(--grid-columns, 3), minmax(0, 1fr));
	gap: var(--wp--preset--spacing--50);
}

[class*="grid-columns-"] > * {
	margin: 0 !important;
}

.grid-columns-1 { --grid-columns: 1; }
.grid-columns-2 { --grid-columns: 2; }
.grid-columns-3 { --grid-columns: 3; }
.grid-columns-4 { --grid-columns: 4; }
.grid-columns-5 { --grid-columns: 5; }
.grid-columns-6 { --grid-columns: 6; }

@media (max-width: 1000px) {
	.grid-columns-4,
	.grid-columns-5,
	.grid-columns-6 {
		--grid-columns: 3;
	}
}

@media (max-width: 760px) {
	[class*="grid-columns-"] {
		--grid-columns: 2;
	}
}

@media (max-width: 480px) {
	[class*="grid-columns-"] {
		--grid-columns: 1;
	}
}
