/* Komplettera med – grundstil. Skriv över i temat vid behov. */
.km-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(0, 0, 0, .45);
}
.km-overlay[hidden] { display: none; }
body.km-open { overflow: hidden; }

.km-modal {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: 90vh;
	overflow: auto;
	padding: 1.5rem;
	background: #fff;
	border-radius: 4px;
}
.km-close {
	position: absolute;
	top: .4rem;
	right: .6rem;
	padding: .25rem .5rem;
	background: none;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	color: inherit;
	cursor: pointer;
}
.km-added { margin: 0 0 .25rem; font-size: .9em; opacity: .75; }
.km-title { margin: 0 0 1rem; font-size: 1.3em; }
.km-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.km-link { display: flex; flex-direction: column; gap: .35rem; color: inherit; text-decoration: none; }
.km-link img { display: block; width: 100%; height: auto; }
.km-name { font-weight: 600; line-height: 1.3; }
.km-price .woocommerce-price-suffix { white-space: nowrap; }
.km-actions { margin-top: 1.25rem; text-align: right; }

/* Knapp i samma stil som temats primärknapp ("Kontakta oss").
   Justera färgerna i temat: .km-overlay { --km-accent: …; --km-accent-text: …; } */
.km-overlay {
	--km-accent: #d3b26b;
	--km-accent-hover: #c4a058;
	--km-accent-text: #132b50;
	--km-radius: 4px;
}
.km-modal .km-goto {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	padding: .95rem 1.75rem;
	background: var(--km-accent);
	color: var(--km-accent-text);
	border: 0;
	border-radius: var(--km-radius);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
	cursor: pointer;
	transition: background-color .15s ease;
}
.km-modal .km-goto:hover { background: var(--km-accent-hover); color: var(--km-accent-text); }
.km-modal .km-goto:focus-visible { outline: 2px solid var(--km-accent-text); outline-offset: 3px; }
.km-modal .km-goto-icon { flex: none; transition: transform .15s ease; }
.km-modal .km-goto:hover .km-goto-icon { transform: translateX(3px); }
.km-modal .km-goto[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) {
	.km-modal .km-goto, .km-modal .km-goto-icon { transition: none; }
}

@media (prefers-reduced-motion: no-preference) {
	.km-modal { animation: km-in .15s ease-out; }
	@keyframes km-in { from { opacity: 0; transform: translateY(8px); } }
}
