/* The 2026 homepage (templates/forsida-2026.php), ported from the approved mockup (canvas v149).
   Loaded on that template only. The hero is in style.css. Sizes in cqi are per cent of the page
   width (.jm-home is the container), as in the mockup; at 700px and below the phone layout. */

.jm-home {
	container-type: inline-size;
	width: 100%; /* Astra's content wrapper is a flex row; a size container must not shrink to fit */
	background: #ffffff;
	color: #141414;
	font-size: 16px;
	line-height: 1.5;
}
.jm-home p {
	margin: 0;
}
.jm-home a {
	text-decoration: none;
}
.jm-home img {
	display: block;
	max-width: 100%;
	height: auto;
}
.jm-wrap {
	max-width: 1320px;
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
	box-sizing: border-box;
}

/* Headings and the brush stroke under them */
.jm-home .jm-h2,
.jm-home .jm-h3 {
	margin: 0;
	color: #141414;
	font-family: var(--jm-heading-font);
	font-weight: 700;
	text-transform: uppercase;
}
.jm-home .jm-h2 {
	font-size: clamp(28px, 2.8cqi, 40px);
	line-height: 1.05;
}
.jm-home .jm-h2--big {
	font-size: clamp(32px, 3.8cqi, 56px);
	line-height: 1.02;
}
.jm-home .jm-h2--about {
	font-size: clamp(26px, 2.7cqi, 38px);
}
.jm-home .jm-h3 {
	font-size: clamp(20px, 1.9cqi, 26px);
	line-height: 1.1;
}
.jm-home .jm-stroke {
	width: 150px;
	height: auto;
}

/* Buttons: black block (jm-btn) and outlined pill (jm-pill) */
.jm-home .jm-btn,
.jm-home .jm-pill {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.jm-home .jm-btn {
	min-height: 48px;
	padding: 0 24px;
	border: 0;
	border-radius: 0;
	background: #141414;
	color: #ffffff;
	font-size: 14px;
}
.jm-home .jm-btn--small {
	padding: 0 22px;
	font-size: 13px;
}
.jm-home .jm-btn--big {
	min-height: 52px;
	padding: 0 28px;
}
.jm-home .jm-pill {
	min-height: 44px;
	padding: 0 22px;
	border: 1.5px solid #141414;
	border-radius: 999px;
	background: transparent;
	color: #141414;
	font-size: 13px;
}
.jm-home .jm-btn svg,
.jm-home .jm-pill svg {
	transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.jm-home .jm-btn:hover,
.jm-home .jm-btn:focus-visible {
	background: #ffffff;
	color: #141414;
	box-shadow: inset 0 0 0 1.5px #141414;
}
.jm-home .jm-pill:hover,
.jm-home .jm-pill:focus-visible {
	background: #141414;
	color: #ffffff;
}
.jm-home .jm-btn:hover svg,
.jm-home .jm-btn:focus-visible svg,
.jm-home .jm-pill:hover svg,
.jm-home .jm-pill:focus-visible svg {
	transform: translateX(4px);
}

/* Photo frames that zoom a little on hover */
.jm-look {
	overflow: hidden;
}
.jm-home .jm-look-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.jm-look:hover .jm-look-img,
.jm-look:focus-visible .jm-look-img {
	transform: scale(1.06);
}
.jm-look-name {
	align-self: flex-start;
	padding-bottom: 2px;
	background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
	transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.jm-look:hover .jm-look-name,
.jm-look:focus-visible .jm-look-name {
	background-size: 100% 1.5px;
}

/* Text column beside a row of products */
.jm-intro {
	flex: 1 1 240px;
	max-width: 300px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.jm-intro--narrow {
	flex-basis: 220px;
	max-width: 280px;
}
.jm-intro > p {
	font-size: 15px;
	color: #3c3e46;
}

/* Categories: three photo tiles, then four bordered tiles with a strip of graphic */
.jm-cats-section {
	max-width: 1320px;
	margin: 0 auto;
	padding: 12px 12px 0;
}
.jm-cats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 10px;
}
.jm-cat {
	position: relative;
	overflow: hidden;
}
.jm-home .jm-cat__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.jm-cat__name,
.jm-cat__cap {
	transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), letter-spacing 0.45s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.jm-cat__arrow {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.3s, color 0.3s, transform 0.3s;
}
.jm-cat:hover .jm-cat__img,
.jm-cat:focus-visible .jm-cat__img {
	transform: scale(1.06);
}
.jm-cat:hover .jm-cat__arrow,
.jm-cat:focus-visible .jm-cat__arrow {
	transform: translateX(4px);
}

.jm-home .jm-cat--big {
	display: block;
	aspect-ratio: 3 / 4;
	color: #ffffff;
}
.jm-cat__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(12, 10, 16, 0.62) 0%, rgba(12, 10, 16, 0) 48%);
}
.jm-cat__foot {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: clamp(14px, 1.6cqi, 22px);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 10px;
}
.jm-cat__text {
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.jm-cat--big .jm-cat__name {
	font-family: var(--jm-heading-font);
	font-weight: 700;
	font-size: clamp(22px, 2.3cqi, 32px);
	line-height: 1;
	text-transform: uppercase;
}
.jm-cat--big .jm-cat__cap {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.jm-cat--big .jm-cat__arrow {
	border: 1.5px solid #ffffff;
}
.jm-cat--big:hover .jm-cat__name,
.jm-cat--big:focus-visible .jm-cat__name {
	transform: translateY(-5px);
	letter-spacing: 0.03em;
}
.jm-cat--big:hover .jm-cat__cap,
.jm-cat--big:focus-visible .jm-cat__cap {
	transform: translateY(-3px);
}
.jm-cat--big:hover .jm-cat__arrow,
.jm-cat--big:focus-visible .jm-cat__arrow {
	background: #ffffff;
	color: #141414;
}

.jm-cats-small {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.jm-home .jm-cat--small {
	flex: 1 1 0;
	min-height: 72px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 34px 24%;
	align-items: center;
	gap: 12px;
	padding-left: clamp(14px, 1.6cqi, 20px);
	background: #ffffff;
	border: 2.5px solid #141414;
	color: #141414;
}
.jm-cat--small .jm-cat__text {
	gap: 0;
	hyphens: manual;
}
.jm-cat--small .jm-cat__name {
	font-weight: 600;
	font-size: clamp(14px, 1.25cqi, 18px);
	line-height: 1.2;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.jm-cat--small .jm-cat__cap {
	font-size: 13px;
	line-height: 1.4;
	color: #4a4d57;
}
.jm-cat--small .jm-cat__arrow {
	background: #141414;
	color: #ffffff;
}
.jm-cat__banner {
	position: relative;
	align-self: stretch;
	overflow: hidden;
}

/* Product cards */
.jm-prod {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	text-align: center;
	height: 100%;
}
.jm-prod__img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 8px;
	box-sizing: border-box;
}
.jm-home .jm-prod-img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* Imagify wraps images that have a WebP copy in <picture> and moves the class onto it */
.jm-home picture.jm-prod-img {
	display: block;
}
.jm-home picture.jm-prod-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.jm-prod:hover .jm-prod-img {
	transform: translateY(-6px) scale(1.05);
}
.jm-home .jm-prod__name {
	margin: 4px 0 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: none;
}
.jm-home .jm-prod__name a {
	color: #141414;
}
.jm-home .jm-prod__price {
	margin: 0 0 8px;
	font-size: 15px;
	color: #141414;
}
.jm-prod__price del {
	opacity: 0.6;
	margin-right: 4px;
}
.jm-home .jm-prod-btn {
	margin-top: auto;
	width: 100%;
	min-height: 44px;
	padding: 0 12px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #141414;
	color: #ffffff;
	font-weight: 600;
	font-size: 13px;
	line-height: 1.2;
	transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}
.jm-home .jm-prod-btn:hover,
.jm-home .jm-prod-btn:focus-visible {
	background: #ffffff;
	color: #141414;
	box-shadow: inset 0 0 0 1.5px #141414;
}
.jm-home .jm-prod-btn.loading {
	opacity: 0.6;
}
.jm-home .jm-prod-btn.added::after {
	content: " ✓";
	margin-left: 4px;
}
/* WooCommerce adds a "View cart" link after an AJAX add; the header cart shows it instead. */
.jm-prod .added_to_cart {
	display: none;
}

/* Vinsælast núna */
.jm-popular {
	padding-top: clamp(40px, 5cqi, 72px);
	padding-bottom: clamp(40px, 5cqi, 72px);
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	align-items: center;
}
.jm-popular__list {
	flex: 999 1 560px;
	min-width: 0;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(150px, 1fr);
	gap: 16px;
	overflow-x: auto;
	padding-bottom: 6px;
}

/* Jólin 2026 */
.jm-xmas {
	border-top: 1px solid #efe7ec;
}
.jm-xmas__inner {
	padding-top: clamp(32px, 4cqi, 56px);
	padding-bottom: clamp(32px, 4cqi, 56px);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 32px clamp(24px, 4cqi, 64px);
}
.jm-xmas__img {
	flex: 1 1 380px;
}
.jm-home .jm-xmas__img .jm-look-img {
	aspect-ratio: 3 / 2;
}
.jm-xmas__text {
	flex: 1 1 380px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.jm-xmas__boxes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 16px;
}
.jm-box {
	border: 2.5px solid #141414;
	box-sizing: border-box;
	padding: clamp(20px, 2.2cqi, 30px);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.jm-home .jm-box p {
	margin: 0 0 8px;
	font-size: clamp(16px, 1.3cqi, 18px);
}
.jm-home .jm-box .jm-btn {
	margin-top: auto;
}

/* Steldu stílnum + Fleiri lúkk */
.jm-steal {
	padding-top: clamp(40px, 5cqi, 72px);
	padding-bottom: clamp(40px, 5cqi, 72px);
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.jm-steal__row {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	align-items: center;
}
.jm-steal__img {
	flex: 1.3 1 340px;
	aspect-ratio: 16 / 10;
}
.jm-steal__products {
	flex: 1.6 1 400px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 12px;
	scroll-margin-top: 120px;
}
.jm-home .jm-prod--small {
	gap: 6px;
	color: #141414;
}
.jm-prod--small .jm-prod__img {
	padding: 0;
}
.jm-prod--small .jm-prod__name,
.jm-home .jm-prod--small .jm-prod__price {
	margin: 0;
	font-size: 14px;
}
.jm-prod--small .jm-prod__name {
	font-weight: 600;
}
.jm-more {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-top: 24px;
	border-top: 1px solid #efe7ec;
}
.jm-more__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 24px;
}
.jm-home .jm-more__title {
	margin: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.jm-home .jm-more__all {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: #141414;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: underline;
}
.jm-more__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 12px;
}
.jm-home .jm-more__item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: #141414;
	font-size: 14px;
	font-weight: 600;
}
.jm-more__img {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

/* Trust bar */
.jm-trust {
	border-top: 1px solid #efe7ec;
	border-bottom: 1px solid #efe7ec;
}
.jm-trust__grid {
	padding-top: 28px;
	padding-bottom: 28px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 20px 32px;
}
.jm-trust__item {
	display: flex;
	align-items: center;
	gap: 14px;
	font-size: 13px;
}
.jm-trust__item svg {
	flex-shrink: 0;
}
.jm-trust__title {
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.jm-home .jm-trust__text {
	color: #4a4d57;
}

/* 50+ ár í förðun */
.jm-about__inner {
	max-width: 1320px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap-reverse;
	align-items: center;
}
.jm-about__text {
	flex: 1 1 340px;
	box-sizing: border-box;
	padding: clamp(40px, 5cqi, 80px) 20px clamp(40px, 5cqi, 80px) clamp(20px, 4.4cqi, 72px);
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 14px;
}
.jm-about__num {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.jm-about__kicker {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.jm-home .jm-num {
	font-family: var(--jm-heading-font);
	font-weight: 700;
	font-size: clamp(72px, 8.4cqi, 124px);
	line-height: 0.9;
	display: flex;
	align-items: center;
	gap: 0.06em;
}
.jm-num span {
	align-self: flex-start;
	font-weight: 300;
	font-size: 0.55em;
	line-height: 1;
}
.jm-about__body {
	max-width: 460px;
}
.jm-about__media {
	flex: 1.2 1 400px;
	display: flex;
	justify-content: center;
	padding: 24px 20px 0;
}
.jm-about__frame {
	width: 100%;
	max-width: 620px;
	overflow: hidden;
}
.jm-home .jm-about__frame img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
/* The owners slide in from the right as they scroll into view (static where unsupported). */
@keyframes jm-in-right {
	from { transform: translateX(45%); }
	to { transform: none; }
}
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.jm-in-right {
			animation: jm-in-right cubic-bezier(0.2, 0.7, 0.2, 1) both;
			animation-timeline: view();
			animation-range: entry 0% cover 45%;
		}
	}
}

/* Fylgstu með okkur */
.jm-social {
	padding-top: clamp(40px, 5cqi, 72px);
	padding-bottom: clamp(40px, 5cqi, 72px);
}
.jm-social__head {
	margin-bottom: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-align: center;
}
.jm-home .jm-social__head .jm-h2 {
	font-size: clamp(26px, 2.8cqi, 40px);
}
.jm-social__head p {
	color: #3c3e46;
}
.jm-social__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
	gap: 8px;
}
.jm-video {
	position: relative;
	display: block;
	aspect-ratio: 4 / 5;
}
.jm-video__play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 48px;
	height: 48px;
	margin: -24px 0 0 -24px;
	border-radius: 50%;
	background: rgba(20, 20, 20, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
}
.jm-video__src {
	position: absolute;
	left: 8px;
	bottom: 8px;
	padding: 4px 8px;
	background: rgba(20, 20, 20, 0.7);
	color: #ffffff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	line-height: 1.2;
}

/* Viltu vera með? */
.jm-news {
	border-top: 1px solid #efe7ec;
}
.jm-news__inner {
	padding-top: clamp(36px, 4.4cqi, 64px);
	padding-bottom: clamp(36px, 4.4cqi, 64px);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.jm-news__text {
	flex: 1 1 320px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.jm-home .jm-news__text .jm-h2 {
	font-size: clamp(26px, 2.8cqi, 40px);
}
.jm-news__form {
	flex: 1 1 360px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}
.jm-home .jm-input {
	flex: 1 1 220px;
	min-height: 52px;
	padding: 0 16px;
	border: 1px solid #141414;
	border-radius: 0;
	background: #ffffff;
	color: #141414;
	font: inherit;
	box-sizing: border-box;
	transition: box-shadow 0.25s, background 0.25s;
}
.jm-home .jm-input::placeholder {
	transition: opacity 0.25s, transform 0.25s;
}
.jm-home .jm-input:hover {
	background: #faf8fb;
}
.jm-home .jm-input:focus {
	outline: none;
	box-shadow: inset 0 0 0 1.5px #141414;
}
.jm-home .jm-input:focus::placeholder {
	opacity: 0.45;
	transform: translateX(6px);
}
.jm-home .jm-news__form .jm-btn {
	flex: 0 0 auto;
	align-self: stretch;
	font-family: inherit;
}
.jm-news__msg {
	flex: 1 1 100%;
	font-size: 14px;
	min-height: 1.5em;
}

/* Phones: centre headings, short text and buttons; long text stays left (Nanna's rule). */
@container (max-width: 700px) {
	.jm-center {
		align-items: center;
		text-align: center;
		max-width: none;
	}
	.jm-center > *,
	.jm-home .jm-center > .jm-btn,
	.jm-home .jm-center > .jm-pill {
		align-self: center;
	}
	.jm-center .jm-num {
		justify-content: center;
	}
	.jm-cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}
	.jm-cats-small {
		grid-column: 1 / -1;
		gap: 8px;
	}
	.jm-home .jm-cat--small {
		min-height: 60px;
	}
	.jm-cat--big .jm-cat__foot {
		padding: 10px;
		justify-content: center;
	}
	.jm-cat--big .jm-cat__name {
		font-size: 15px;
	}
	.jm-cat--big .jm-cat__cap,
	.jm-cat--big .jm-cat__arrow {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jm-home *,
	.jm-home *::placeholder {
		transition: none !important;
	}
}
