/* Produkt Slider */
.ps-wrap {
	--ps-bg: #f8f5f0;
	--ps-card: #f3efe9;
	--ps-card-hover: #eee9e2;
	--ps-text: #2b2624;
	--ps-muted: #6f6863;
	--ps-badge-percent: #c8bba7;
	--ps-badge-percent-text: #4a433f;
	--ps-badge-sale: #e6ddd1;
	--ps-badge-sale-text: #4a433f;
	--ps-dark: #3d3735;
	--ps-cart-icon: #ffffff;
	--ps-fav: var(--ps-text);
	--ps-dot: #e4ded7;
	--ps-dot-active: var(--ps-text);
	--ps-gap: 8px;
	--ps-side: 32px;
	--ps-per-view: 4;

	position: relative;
	padding: 24px 0 32px;
	background: var(--ps-bg);
	color: var(--ps-text);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}
.ps-wrap *,
.ps-wrap *::before,
.ps-wrap *::after { box-sizing: border-box; }
.ps-wrap h3,
.ps-wrap p { margin: 0; padding: 0; }

/* Track */
.ps-track {
	display: flex;
	gap: var(--ps-gap);
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	padding: 0 var(--ps-side);
	scroll-padding: 0 var(--ps-side);
	-webkit-overflow-scrolling: touch;
}
.ps-track::-webkit-scrollbar { display: none; }

/* Kort */
.ps-card {
	position: relative;
	flex: 0 0 calc((100% - (var(--ps-per-view) - 1) * var(--ps-gap)) / var(--ps-per-view));
	display: flex;
	flex-direction: column;
	background: var(--ps-card);
	scroll-snap-align: start;
	transition: background-color .3s ease;
}
.ps-card:hover { background: var(--ps-card-hover); }

.ps-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}
.ps-link:focus-visible { outline: 2px solid var(--ps-text); outline-offset: -2px; }

/* Badges */
.ps-badges {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 2;
	display: flex;
	pointer-events: none;
}
.ps-badge {
	padding: 11px 13px 10px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: .22em;
	text-transform: uppercase;
}
.ps-badge--percent { background: var(--ps-badge-percent); color: var(--ps-badge-percent-text); }
.ps-badge--sale { background: var(--ps-badge-sale); color: var(--ps-badge-sale-text); }

/* Favorit */
.ps-wrap .ps-fav {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--ps-fav);
	cursor: pointer;
	box-shadow: none;
	transition: transform .2s ease;
}
.ps-wrap .ps-fav:hover,
.ps-wrap .ps-fav:focus { background: none; color: var(--ps-fav); transform: scale(1.1); }
.ps-fav svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	transition: fill .2s;
}
.ps-fav.is-active svg { fill: currentColor; }

/* Billede */
.ps-media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1 / 1;
	padding: 18% 10% 24%;
	overflow: hidden;
}
.ps-media img,
.ps-media .ps-img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
	margin: 0;
	transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.ps-card:hover .ps-media img { transform: scale(1.04); }

/* Kurv-knap */
.ps-wrap .ps-cart {
	position: absolute;
	right: 8px;
	bottom: 8px;
	z-index: 3;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: var(--ps-dark);
	color: var(--ps-cart-icon);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease, filter .2s;
}
.ps-wrap .ps-cart:hover { filter: brightness(.8); color: var(--ps-cart-icon); }
.ps-card:hover .ps-cart,
.ps-wrap .ps-cart:focus-visible,
.ps-wrap .ps-cart.loading,
.ps-wrap .ps-cart.added { opacity: 1; transform: none; }
.ps-cart svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
}
.ps-cart .ps-icon-check { display: none; stroke-width: 2; }
.ps-cart.added .ps-icon-bag { display: none; }
.ps-cart.added .ps-icon-check { display: block; }
.ps-cart.loading { pointer-events: none; }
.ps-cart.loading svg { animation: ps-pulse 0.8s ease-in-out infinite alternate; }
.ps-wrap .ps-cart::after { display: none !important; } /* fjern temaers spinner */
.ps-wrap .added_to_cart { display: none !important; } /* fjern WooCommerces "Vis kurv"-link */
@keyframes ps-pulse { to { opacity: .35; } }

/* Tekst */
.ps-info {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px 24px 26px;
}
.ps-wrap .ps-title,
.ps-wrap .ps-sub,
.ps-wrap .ps-price,
.ps-wrap .ps-save {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	text-transform: none;
	letter-spacing: normal;
	border: 0;
}
.ps-wrap .ps-title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.25;
	color: var(--ps-text);
}
.ps-wrap .ps-sub {
	margin-top: 4px;
	font-size: 18px;
	font-weight: 400;
	line-height: 1.38;
	color: var(--ps-text);
}
.ps-prices { margin-top: auto; padding-top: 22px; }
.ps-wrap .ps-price .woocommerce-Price-amount bdi { font: inherit; letter-spacing: inherit; }
.ps-wrap .ps-price {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--ps-text);
}
.ps-wrap .ps-save {
	margin-top: 8px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--ps-muted);
}
.ps-save s { margin-right: 8px; text-decoration-thickness: 1px; }
.ps-wrap .woocommerce-Price-amount,
.ps-wrap .woocommerce-Price-currencySymbol { color: inherit; font: inherit; }

/* Pile */
.ps-wrap .ps-arrow {
	position: absolute;
	top: calc(24px + (100% - 56px) * .18);
	z-index: 5;
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(243, 239, 233, .88);
	color: var(--ps-text);
	cursor: pointer;
	opacity: 0;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	transition: opacity .25s ease;
}
.ps-wrap .ps-arrow:hover,
.ps-wrap .ps-arrow:focus { background: rgba(243, 239, 233, .98); color: var(--ps-text); }
.ps-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.ps-arrow--prev { left: calc(var(--ps-side) + 12px); }
.ps-arrow--next { right: calc(var(--ps-side) + 12px); }
.ps-wrap:hover .ps-arrow:not([disabled]),
.ps-wrap .ps-arrow:focus-visible { opacity: 1; }
.ps-wrap .ps-arrow[disabled] { pointer-events: none; opacity: 0; }

/* Prikker */
.ps-dots {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 28px;
}
.ps-wrap .ps-dot {
	width: 10px;
	height: 10px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ps-dot);
	cursor: pointer;
	transition: background-color .25s, transform .25s;
}
.ps-wrap .ps-dot:hover { transform: scale(1.2); background: var(--ps-dot); }
.ps-wrap .ps-dot.is-active { background: var(--ps-dot-active); }

.ps-empty {
	padding: 40px;
	background: #f3efe9;
	text-align: center;
	color: #6f6863;
}

/* Responsiv (kan overstyres i Elementor) */
@media (max-width: 1024px) {
	.ps-wrap { --ps-per-view: 2.15; }
	.ps-wrap .ps-arrow { display: none; }
}
@media (max-width: 767px) {
	.ps-wrap { --ps-per-view: 1.2; --ps-side: 16px; }
	.ps-title, .ps-sub, .ps-price { font-size: 16px; }
	.ps-info { padding: 16px 18px 20px; }
	.ps-wrap .ps-cart { opacity: 1; transform: none; width: 44px; height: 44px; }
	.ps-cart svg { width: 22px; height: 22px; }
}
@media (hover: none) {
	.ps-wrap .ps-cart { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ps-track { scroll-behavior: auto; }
	.ps-wrap * { transition: none !important; animation: none !important; }
}

/* =========================================================
   Produkt-grid  [produkt_grid]
   ========================================================= */
.ps-grid-wrap {
	--ps-cols-d: 4;
	--ps-cols-t: 3;
	--ps-cols-m: 2;
	--ps-cols: var(--ps-cols-d);
}
.ps-grid {
	display: grid;
	grid-template-columns: repeat(var(--ps-cols), minmax(0, 1fr));
	gap: var(--ps-gap);
	padding: 0 var(--ps-side);
}
.ps-grid .ps-card { flex: none; min-width: 0; }

/* Sideinddeling */
.ps-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 32px;
	padding: 0 var(--ps-side);
}
.ps-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	background: var(--ps-card);
	color: var(--ps-text);
	font-size: 15px;
	text-decoration: none;
	transition: background-color .2s, color .2s;
}
.ps-pagination a.page-numbers:hover { background: var(--ps-card-hover); }
.ps-pagination .page-numbers.current { background: var(--ps-dark); color: #fff; }
.ps-pagination .page-numbers.dots { background: none; }

@media (max-width: 1024px) {
	.ps-grid-wrap { --ps-cols: var(--ps-cols-t); }
}
@media (max-width: 767px) {
	.ps-grid-wrap { --ps-cols: var(--ps-cols-m); --ps-side: 12px; --ps-gap: 6px; }
	.ps-grid-wrap .ps-info { padding: 12px 12px 14px; }
	.ps-grid-wrap .ps-title { font-size: 14px; }
	.ps-grid-wrap .ps-sub { font-size: 13px; line-height: 1.35; }
	.ps-grid-wrap .ps-prices { padding-top: 12px; }
	.ps-grid-wrap .ps-price { font-size: 14px; }
	.ps-grid-wrap .ps-save { font-size: 11px; margin-top: 4px; }
	.ps-grid-wrap .ps-save s { display: block; margin: 0 0 2px; }
	.ps-grid-wrap .ps-badge { font-size: 9px; padding: 7px 8px 6px; letter-spacing: .14em; }
	.ps-grid-wrap .ps-fav { top: 6px; right: 6px; width: 28px; height: 28px; }
	.ps-grid-wrap .ps-fav svg { width: 18px; height: 18px; }
	.ps-grid-wrap .ps-cart { right: 6px; bottom: 6px; width: 36px; height: 36px; }
	.ps-grid-wrap .ps-cart svg { width: 18px; height: 18px; }
	.ps-grid-wrap .ps-media { padding: 24% 8% 22%; }
}
