/* Pössl Konfigurator – farger fra temaet (mørkeblå #003571, lyseblå #e5ebf1 / #cdd9e4, sand #fffade) */
.pk {
	--pk-blue: var(--wp--preset--color--morkebla, #003571);
	--pk-light: var(--wp--preset--color--lysbla, #e5ebf1);
	--pk-mid: var(--wp--preset--color--bla, #cdd9e4);
	--pk-sand: var(--wp--preset--color--sand, #fffade);
	--pk-text: #1a1a1a;
	--pk-muted: #5b6573;
	--pk-border: #d6dde5;
	--pk-radius: 10px;
	box-sizing: border-box;
	max-width: 1280px;
	margin: 6vh auto;
	padding: 0 16px;
	font-family: Montserrat, sans-serif;
	color: var(--pk-text);
	scroll-margin-top: 110px;
}
.pk *, .pk *::before, .pk *::after { box-sizing: inherit; }

.pk-head { text-align: center; margin-bottom: 24px; }
.pk-eyebrow { margin: 0 0 4px; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--pk-blue); }
.pk-title { margin: 0; font-size: clamp(26px, 3.2vw, 40px); font-weight: 800; text-transform: uppercase; }

/* steps */
.pk-nav { margin-bottom: 24px; overflow-x: auto; scrollbar-width: thin; scroll-margin-top: 110px; }
.pk-nav ol { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; min-width: max-content; }
.pk-nav li { flex: 1 1 0; }
.pk-nav button {
	display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 12px;
	border: 0; border-bottom: 3px solid var(--pk-mid); background: transparent; cursor: pointer;
	font: inherit; font-size: 14px; font-weight: 600; color: var(--pk-muted); text-align: left; white-space: nowrap;
}
.pk-nav-num {
	display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none;
	border-radius: 50%; background: var(--pk-light); color: var(--pk-blue); font-size: 13px;
}
.pk-nav .is-done button { color: var(--pk-blue); border-bottom-color: var(--pk-blue); }
.pk-nav .is-done .pk-nav-num { background: var(--pk-blue); color: #fff; }
.pk-nav .is-active button { color: var(--pk-blue); border-bottom-color: var(--pk-blue); }
.pk-nav .is-active .pk-nav-num { background: var(--pk-blue); color: #fff; box-shadow: 0 0 0 3px var(--pk-mid); }
.pk-nav button:focus-visible { outline: 2px solid var(--pk-blue); outline-offset: 2px; }

/* layout */
.pk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.pk-side { position: sticky; top: 110px; }

.pk-stage { position: relative; margin: 0 0 24px; padding: 16px; background: #fff; border-radius: var(--pk-radius); text-align: center; }
.pk-stage img { display: block; max-width: 100%; max-height: 380px; margin: 0 auto; object-fit: contain; border-radius: 6px; }
.pk-stage--interior img, .pk-stage--tekstil img { max-height: 460px; width: 100%; object-fit: cover; }
.pk-stage-color {
	position: absolute; left: 16px; bottom: 16px; display: inline-flex; align-items: center; gap: 8px;
	padding: 6px 12px; background: rgba(255,255,255,.92); border-radius: 999px; font-size: 13px; font-weight: 600;
}
.pk-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,.2); }

.pk-step-heading { margin: 0 0 16px; font-size: 22px; font-weight: 800; }
.pk-notice { margin: 0 0 16px; padding: 12px 16px; background: var(--pk-sand); border-left: 4px solid #e0c200; border-radius: 6px; font-size: 14px; }

/* brand tabs */
.pk-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.pk-tab {
	padding: 10px 20px; border: 2px solid var(--pk-blue); border-radius: 999px; background: #fff;
	color: var(--pk-blue); font: inherit; font-weight: 700; cursor: pointer;
}
.pk-tab.is-active { background: var(--pk-blue); color: #fff; }

/* cards / tiles */
.pk-grid { display: grid; gap: 12px; }
.pk-grid--engines { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pk-grid--tiles { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

.pk-card, .pk-tile, .pk-option {
	position: relative; display: flex; background: #fff; border: 2px solid var(--pk-border);
	border-radius: var(--pk-radius); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.pk-card:hover, .pk-tile:hover, .pk-option:hover { border-color: var(--pk-mid); }
.pk-card:has(input:checked), .pk-tile:has(input:checked), .pk-option.is-checked {
	border-color: var(--pk-blue); box-shadow: 0 0 0 1px var(--pk-blue);
}
.pk-card input, .pk-tile input { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; accent-color: var(--pk-blue); }
.pk-card:has(input:focus-visible), .pk-tile:has(input:focus-visible), .pk-option:has(input:focus-visible) { outline: 2px solid var(--pk-blue); outline-offset: 2px; }

.pk-card-body { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 16px; }
.pk-card-title { padding-right: 28px; font-weight: 700; line-height: 1.3; }
.pk-specs { display: grid; gap: 4px; margin: 0; font-size: 13px; }
.pk-specs div { display: flex; justify-content: space-between; gap: 8px; }
.pk-specs dt { color: var(--pk-muted); }
.pk-specs dd { margin: 0; font-weight: 600; text-align: right; }
.pk-price { font-weight: 700; color: var(--pk-blue); white-space: nowrap; }
.pk-card .pk-price { margin-top: auto; font-size: 17px; }

.pk-tile { flex-direction: column; gap: 6px; padding: 12px; }
.pk-tile-swatch { display: block; height: 90px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); }
.pk-tile-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.pk-tile-name { padding-right: 24px; font-weight: 600; font-size: 14px; line-height: 1.3; }
.pk-tile input { top: 20px; right: 20px; }
.pk-weight { font-size: 12px; color: var(--pk-muted); }

/* option lists */
.pk-group { margin: 0 0 28px; padding: 0; border: 0; }
.pk-group legend { margin-bottom: 10px; padding: 0; font-size: 17px; font-weight: 800; }
.pk-req { font-size: 13px; font-weight: 600; color: #b42318; }
.pk-hint { font-size: 13px; font-weight: 500; color: var(--pk-muted); }
.pk-option { align-items: flex-start; gap: 14px; margin-bottom: 8px; padding: 14px 16px; }
.pk-option input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pk-blue); }
.pk-option-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.pk-option-name { font-weight: 600; line-height: 1.35; }
.pk-option-desc { font-size: 13px; line-height: 1.45; color: var(--pk-muted); }
.pk-option-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.pk-price-old { font-size: 12px; color: var(--pk-muted); text-decoration: line-through; white-space: nowrap; }
.pk-saving { font-size: 12px; font-weight: 700; color: #1f7a3f; white-space: nowrap; }

/* price box */
.pk-pricebox { padding: 24px; background: var(--pk-blue); color: #fff; border-radius: var(--pk-radius); }
/* The theme sets a colour on p/dt/dd, so white has to be set on the elements themselves. */
.pk .pk-pricebox p, .pk .pk-pricebox dt, .pk .pk-pricebox dd { color: #fff; }
.pk-pricebox-model { margin: 0; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.pk-pricebox-total { margin: 6px 0 0; font-size: 30px; font-weight: 800; line-height: 1.1; }
.pk-pricebox-vat { margin: 2px 0 16px; font-size: 13px; opacity: .8; }
.pk-pricebox-facts { display: grid; gap: 8px; margin: 0 0 20px; padding: 16px 0 0; border-top: 1px solid rgba(255,255,255,.25); font-size: 14px; }
.pk-pricebox-facts div { display: flex; justify-content: space-between; gap: 8px; }
.pk-pricebox-facts dt { opacity: .8; }
.pk-pricebox-facts dd { margin: 0; font-weight: 700; text-align: right; }
.pk-pricebox-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-pricebox-nav .pk-btn { flex: 1 1 auto; }
.pk-pricebox .pk-btn--primary { background: #fff; color: var(--pk-blue); border-color: #fff; }
.pk-pricebox .pk-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.pk-warn { margin: 0 0 16px; padding: 10px 12px; background: #fde8e8; color: #8a1c1c; border-radius: 6px; font-size: 13px; }

/* buttons */
.pk-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 18px;
	border: 2px solid var(--pk-blue); border-radius: 999px; background: #fff; color: var(--pk-blue);
	font: inherit; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.pk-btn--primary { background: var(--pk-blue); color: #fff; }
.pk-btn--ghost { border-color: var(--pk-border); color: var(--pk-muted); }
.pk-btn:focus-visible { outline: 2px solid var(--pk-blue); outline-offset: 2px; }
.pk-link { padding: 0; border: 0; background: none; color: var(--pk-blue); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* summary */
.pk-summary { width: 100%; margin: 0 0 20px; border-collapse: collapse; background: #fff; border-radius: var(--pk-radius); overflow: hidden; font-size: 14px; }
.pk-summary th, .pk-summary td { padding: 10px 14px; border-bottom: 1px solid var(--pk-light); text-align: left; vertical-align: top; }
.pk-summary thead th { background: var(--pk-light); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
.pk-summary tfoot th { font-size: 17px; border-bottom: 0; background: var(--pk-light); }
.pk-num { text-align: right !important; white-space: nowrap; }
.pk-edit { width: 1%; white-space: nowrap; }
.pk-art { display: block; font-size: 11px; color: var(--pk-muted); }
.pk-specs--summary { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 24px; margin-bottom: 24px; padding: 16px; background: #fff; border-radius: var(--pk-radius); font-size: 14px; }
.pk-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pk-disclaimer { margin: 32px 0 0; font-size: 12px; line-height: 1.5; color: var(--pk-muted); }
.pk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 960px) {
	.pk-layout { grid-template-columns: 1fr; }
	.pk-side { position: sticky; bottom: 0; top: auto; z-index: 5; order: 2; margin: 0 -16px; }
	.pk-pricebox { border-radius: var(--pk-radius) var(--pk-radius) 0 0; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; }
	.pk-pricebox-model, .pk-pricebox-vat, .pk-pricebox-facts { display: none; }
	.pk-pricebox-total { margin: 0; font-size: 22px; }
	.pk-pricebox-nav { flex-wrap: nowrap; }
	.pk-pricebox-nav .pk-btn--ghost { display: none; }
	.pk-warn { grid-column: 1 / -1; margin: 0; }
	.pk-nav-label { display: none; }
	.pk-nav .is-active .pk-nav-label { display: inline; }
}
@media (max-width: 560px) {
	.pk-option { flex-wrap: wrap; }
	.pk-option-price { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; gap: 4px 10px; }
	.pk-summary th, .pk-summary td { padding: 8px 10px; }
}

/* quote form (Gravity Forms) below the configurator */
.pk-form { max-width: 1280px; margin: 0 auto 6vh; padding: 0 16px; font-family: Montserrat, sans-serif; scroll-margin-top: 110px; }
.pk-form-inner { padding: 32px; background: #fff; border-radius: var(--pk-radius, 10px); border-top: 4px solid var(--wp--preset--color--morkebla, #003571); }
.pk-form h3 { margin: 0 0 8px; font-size: 24px; font-weight: 800; }
.pk-form-intro { margin: 0 0 20px; color: #5b6573; font-size: 14px; }
.pk-tile--text { justify-content: space-between; min-height: 110px; }
.pk-empty { padding: 16px; background: #fff; border-radius: var(--pk-radius); color: var(--pk-muted); }
.pk-pricebox-spacer { height: 8px; }

/* Floating copy of the "configure" button (see floatingLinks() in konfigurator.js) */
.pk-float {
	position: fixed; right: max(16px, 2vw); z-index: 9990; max-width: calc(100vw - 32px); margin: 0;
	opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none;
	transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.pk-float.is-visible { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .2s ease, transform .2s ease; }
.pk-float > a { display: inline-block; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 600px) {
	.pk-float > a { padding: 10px 18px !important; font-size: 15px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.pk-float, .pk-float.is-visible { transition: none; transform: none; }
}
@media print {
	.pk-float { display: none !important; }
}

/* print: only the configuration sheet (added to <body> by the script) is printed */
.pk-print-sheet { display: none; }
@media print {
	html.pk-printing body > *:not(.pk-print-sheet) { display: none !important; }
	html.pk-printing body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
	html.pk-printing .pk-print-sheet { display: block; font-family: Montserrat, sans-serif; color: #000; font-size: 11pt; }
	.pk-print-sheet .pk-print-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #003571; }
	.pk-print-sheet .pk-print-head h1 { margin: 0; font-size: 22pt; font-weight: 800; text-transform: uppercase; }
	.pk-print-sheet .pk-print-head p { margin: 2px 0 0; }
	.pk-print-sheet .pk-eyebrow { margin: 0; font-size: 9pt; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #003571; }
	.pk-print-sheet .pk-print-head img { width: 220px; height: auto; }
	.pk-print-sheet .pk-summary { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
	.pk-print-sheet .pk-summary th, .pk-print-sheet .pk-summary td { padding: 5px 8px; border-bottom: 1px solid #ccc; text-align: left; vertical-align: top; }
	.pk-print-sheet .pk-summary thead th { background: #e5ebf1; font-size: 9pt; text-transform: uppercase; }
	.pk-print-sheet .pk-summary tfoot th { font-size: 13pt; background: #e5ebf1; }
	.pk-print-sheet .pk-num { text-align: right !important; white-space: nowrap; }
	.pk-print-sheet .pk-art { display: block; font-size: 8pt; color: #555; }
	.pk-print-sheet .pk-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; margin: 0 0 14px; }
	.pk-print-sheet .pk-specs div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted #ccc; }
	.pk-print-sheet .pk-specs dt { color: #555; }
	.pk-print-sheet .pk-specs dd { margin: 0; font-weight: 600; }
	.pk-print-sheet .pk-print-link { font-size: 9pt; word-break: break-all; }
	.pk-print-sheet .pk-disclaimer { font-size: 8pt; color: #555; }
	.pk-print-sheet tr, .pk-print-sheet .pk-specs div { break-inside: avoid; }
	@page { margin: 14mm; }
}
