/* Q3 Produktvisning – farger kan overstyres i temaet: .q3pv-wrap, .q3pv-modal { --q3pv-accent: #c00; } */
.q3pv-wrap {
	--q3pv-accent: var(--wp--preset--color--primary, #1d6b2f);
	--q3pv-accent-ink: #fff;
	--q3pv-ink: inherit;
	--q3pv-muted: #5f6368;
	--q3pv-line: rgba(0, 0, 0, .12);
	--q3pv-bg: #fff;                   /* kortene – overstyr med --q3pv-bg i temaet */
	--q3pv-well: rgba(128, 128, 128, .08); /* bak bilder – virker på lys og mørk bakgrunn */
	--q3pv-radius: 10px;
	--q3pv-in: #1e8e3e;
	--q3pv-order: #8a8f98;
	margin: 1.5em 0;
}
.q3pv { margin: 0; }
.q3pv--grid {
	display: grid;
	grid-template-columns: repeat(var(--q3pv-cols, 3), minmax(0, 1fr));
	gap: 24px;
}
@media (max-width: 900px) { .q3pv--grid { grid-template-columns: repeat(min(2, var(--q3pv-cols, 3)), minmax(0, 1fr)); } }
@media (max-width: 600px) { .q3pv--grid { grid-template-columns: 1fr; } }

.q3pv-card {
	display: flex;
	flex-direction: column;
	background: var(--q3pv-bg);
	border: 1px solid var(--q3pv-line);
	border-radius: var(--q3pv-radius);
	overflow: hidden;
	color: var(--q3pv-ink);
}
.q3pv--wide .q3pv-card { flex-direction: row; align-items: stretch; }
.q3pv--wide .q3pv-media { flex: 0 0 48%; }
@media (max-width: 760px) {
	.q3pv--wide .q3pv-card { flex-direction: column; }
}
.q3pv-media { background: var(--q3pv-well); }
.q3pv-media a { display: block; height: 100%; }
.q3pv-img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.q3pv--wide .q3pv-img { aspect-ratio: auto; min-height: 320px; }
.q3pv-body { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px 22px; flex: 1; }
.q3pv-title { margin: 0; font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
.q3pv--wide .q3pv-title { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.q3pv-title a { color: inherit; text-decoration: none; }
.q3pv-title a:hover { text-decoration: underline; }
.q3pv-text { color: var(--q3pv-muted); font-size: .97rem; }
.q3pv-text > :first-child { margin-top: 0; }
.q3pv-text > :last-child { margin-bottom: 0; }
.q3pv-price { margin: 0; font-weight: 700; font-size: 1.1rem; }

.q3pv-stock { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--q3pv-line); }
.q3pv-st { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--q3pv-line); font-size: .95rem; }
.q3pv-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--q3pv-order); flex: none; }
.q3pv-st--in .q3pv-dot { background: var(--q3pv-in); }
.q3pv-st--unknown .q3pv-dot { background: transparent; border: 2px solid var(--q3pv-order); }
.q3pv-dept { font-weight: 600; }
.q3pv-lbl { margin-left: auto; color: var(--q3pv-muted); }
.q3pv-st--in .q3pv-lbl { color: var(--q3pv-in); font-weight: 600; }

.q3pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: auto; padding-top: 4px; }
.q3pv-btn {
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: var(--q3pv-accent);
	color: var(--q3pv-accent-ink);
	font: inherit;
	font-weight: 700;
	padding: .75em 1.5em;
	cursor: pointer;
	line-height: 1.2;
}
.q3pv-btn:hover { filter: brightness(1.08); }
.q3pv-btn:focus-visible { outline: 3px solid var(--q3pv-accent); outline-offset: 3px; }
.q3pv-btn:disabled { opacity: .6; cursor: default; }
.q3pv-more { font-weight: 600; color: inherit; }

/* Skjema */
.q3pv-modal, .q3pv-view, .q3pv-pop, .q3pv-lb {
	--q3pv-well: rgba(128, 128, 128, .08);
	--q3pv-panel: #fff; /* bak navn/lager og beskrivelse – overstyr i temaet ved behov */
	--q3pv-accent: var(--wp--preset--color--primary, #1d6b2f);
	--q3pv-accent-ink: #fff;
	--q3pv-muted: #5f6368;
	--q3pv-line: rgba(0, 0, 0, .12);
	--q3pv-in: #1e8e3e;
	--q3pv-order: #8a8f98;
}
.q3pv-modal {
	background: var(--q3pv-page-bg, #fff);
	color: var(--q3pv-page-ink, inherit);
	border: 0;
	border-radius: 14px;
	padding: 0;
	width: min(560px, calc(100vw - 24px));
	max-height: calc(100vh - 24px);
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.q3pv-modal::backdrop { background: rgba(0, 0, 0, .55); }
.q3pv-form { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 26px 26px 24px; }
.q3pv-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .92rem; flex: 1; }
.q3pv-form input:not([type=checkbox]):not([type=radio]), .q3pv-form textarea {
	font: inherit; font-weight: 400; padding: .6em .7em; border: 1px solid rgba(128, 128, 128, .45); border-radius: 8px; width: 100%; box-sizing: border-box; background: transparent; color: inherit;
}
.q3pv-form input:focus, .q3pv-form textarea:focus { outline: 2px solid var(--q3pv-accent); outline-offset: 0; border-color: transparent; }
.q3pv-row { display: flex; gap: 12px; }
@media (max-width: 520px) { .q3pv-row { flex-direction: column; } }
.q3pv-kicker { margin: 0; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--q3pv-accent); }
.q3pv-m-title { margin: 0 0 4px; font-size: 1.4rem; line-height: 1.25; padding-right: 30px; }
.q3pv-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: inherit; opacity: .7; }
.q3pv-depts { border: 0; padding: 0; margin: 0; }
.q3pv-depts legend { font-weight: 600; font-size: .92rem; margin-bottom: 6px; padding: 0; }
.q3pv-dept-list { display: flex; flex-wrap: wrap; gap: 8px; }
.q3pv-form .q3pv-dept-opt {
	flex: 1 1 140px; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap;
	border: 1px solid rgba(128, 128, 128, .45); border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.q3pv-form .q3pv-dept-opt:has(input:checked) { border-color: var(--q3pv-accent); box-shadow: inset 0 0 0 1px var(--q3pv-accent); }
.q3pv-dept-opt small { flex-basis: 100%; font-weight: 400; opacity: .75; padding-left: 22px; }
.q3pv-form .q3pv-consent { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 400; }
.q3pv-consent input { margin-top: 3px; }
.q3pv-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.q3pv-msg { margin: 0; min-height: 1.2em; }
.q3pv-msg--err { color: #b3261e; font-weight: 600; }
.q3pv-msg--ok { color: #1e8e3e; font-weight: 700; font-size: 1.1rem; }
.q3pv-submit { align-self: flex-start; }
.q3pv-empty { padding: 12px; border: 1px dashed #aaa; }

/* Søk, filter og sider */
.q3pv-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 18px; }
.q3pv-tools input[type=search], .q3pv-tools select {
	font: inherit; padding: .6em .8em; border: 1px solid var(--q3pv-line); border-radius: 8px; background: transparent; color: inherit; min-width: 200px;
}
.q3pv-tools input[type=search] { flex: 1 1 260px; }
.q3pv-chk { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }
.q3pv-btn--ghost { background: transparent; color: var(--q3pv-accent); box-shadow: inset 0 0 0 2px var(--q3pv-accent); }
.q3pv-reset { font-weight: 600; color: inherit; }
.q3pv-count { margin: 0 0 12px; color: var(--q3pv-muted); }
.q3pv-pages { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; }
.q3pv-page { display: inline-block; min-width: 2.4em; text-align: center; padding: .45em .6em; border: 1px solid var(--q3pv-line); border-radius: 8px; text-decoration: none; color: inherit; font-weight: 600; }
.q3pv-page.is-current { background: var(--q3pv-accent); border-color: var(--q3pv-accent); color: var(--q3pv-accent-ink); }
.q3pv-gap { padding: .45em .2em; }
.q3pv-grp { margin: 0; text-transform: uppercase; letter-spacing: .06em; font-size: .75rem; font-weight: 700; color: var(--q3pv-accent); }
.q3pv-code { margin: -6px 0 0; font-size: .85rem; color: var(--q3pv-muted); }
.q3pv-noimg { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--q3pv-well); }
.q3pv-media { display: flex; align-items: center; justify-content: center; }
.q3pv--grid .q3pv-img { object-fit: contain; }
.q3pv-more-text summary { cursor: pointer; font-weight: 600; color: var(--q3pv-ink); }
.q3pv-more-text[open] summary { margin-bottom: 6px; }

/* Klikkbare kort */
.q3pv-media { cursor: pointer; }
a.q3pv-media { text-decoration: none; }
.q3pv-card:hover .q3pv-img { transform: scale(1.03); }
.q3pv-img { transition: transform .25s ease; }
.q3pv-media { overflow: hidden; }

/* Varevisning inne på siden */
.q3pv-view[hidden] { display: none !important; }
.q3pv-view { margin: 1.5em 0; color: inherit; scroll-margin-top: var(--q3pv-scroll-offset, 120px); }
.q3pv-v-bar { margin: 0 0 18px; }
.q3pv-v-back { border: 0; background: none; font: inherit; font-weight: 700; cursor: pointer; color: var(--q3pv-accent); padding: 6px 0; }
.q3pv-v-back:hover span { text-decoration: underline; }
.q3pv-v-body { outline: none; }
.q3pv-v-loading { text-align: center; color: var(--q3pv-muted); padding: 60px 0; }
.q3pv-v-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: start; }
@media (max-width: 860px) { .q3pv-v-top { grid-template-columns: 1fr; } }
.q3pv-v-main { background: var(--q3pv-well); border-radius: 12px; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; overflow: hidden; }
.q3pv-v-main img { width: 100%; height: 100%; object-fit: contain; }
.q3pv-v-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.q3pv-v-thumb { width: 72px; height: 72px; border: 2px solid transparent; border-radius: 8px; padding: 0; background: var(--q3pv-well); cursor: pointer; overflow: hidden; }
.q3pv-v-thumb.is-on { border-color: var(--q3pv-accent); }
.q3pv-v-thumb img { width: 100%; height: 100%; object-fit: contain; }
.q3pv-v-info { display: flex; flex-direction: column; gap: 14px; background: var(--q3pv-panel); border-radius: 12px; padding: clamp(18px, 2.5vw, 32px); }
.q3pv-v-title { margin: 0; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.15; }
.q3pv-v-price { font-size: 1.4rem; }
.q3pv-v-short { color: var(--q3pv-muted); }
.q3pv-v-short > :first-child { margin-top: 0; }
.q3pv-v-sec { margin-top: clamp(20px, 3vw, 32px); background: var(--q3pv-panel); border-radius: 12px; padding: clamp(18px, 2.5vw, 32px); }
.q3pv-v-sec h3 { margin: 0 0 14px; font-size: 1.3rem; }
.q3pv-v-text { line-height: 1.6; }
.q3pv-v-text > :first-child { margin-top: 0; }
.q3pv-v-text > :last-child { margin-bottom: 0; }
.q3pv-v-text img { max-width: 100%; height: auto; }
.q3pv-v-props { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px 32px; }
.q3pv-v-table { width: 100%; border-collapse: collapse; }
.q3pv-v-table caption { text-align: left; font-weight: 700; padding-bottom: 6px; color: var(--q3pv-accent); }
.q3pv-v-table th, .q3pv-v-table td { text-align: left; padding: 7px 0; border-bottom: 1px solid var(--q3pv-line); vertical-align: top; }
.q3pv-v-table th { font-weight: 600; width: 50%; padding-right: 12px; }
.q3pv-v-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.q3pv-v-link { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; border: 1px solid var(--q3pv-line); border-radius: 10px; padding: 10px; transition: box-shadow .15s; }
.q3pv-v-link:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .1); }
.q3pv-v-link-img { aspect-ratio: 4 / 3; background: var(--q3pv-well); border-radius: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.q3pv-v-link-img img { width: 100%; height: 100%; object-fit: contain; }
.q3pv-v-link-name { font-weight: 700; line-height: 1.25; }
.q3pv-v-link-meta { font-size: .85rem; color: var(--q3pv-muted); }
.q3pv-v-link-st { font-size: .85rem; font-weight: 600; color: var(--q3pv-order); }
.q3pv-v-link-st.is-in { color: var(--q3pv-in); }
.q3pv-view .q3pv-grp { margin: 0; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; font-weight: 700; color: var(--q3pv-accent); }
.q3pv-view .q3pv-code { margin: -8px 0 0; color: var(--q3pv-muted); }
.q3pv-view .q3pv-stock { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--q3pv-line); }
.q3pv-view .q3pv-btn { align-self: flex-start; font-size: 1.05rem; }

.q3pv-v-hyper { margin: 0; padding-left: 1.2em; }
.q3pv-v-hyper li { margin: 4px 0; }
.q3pv-v-hyper a { color: var(--q3pv-accent); font-weight: 600; }

/* Faner i fullskjermvisningen */
.q3pv-v-tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--q3pv-line); margin: -4px 0 22px; }
.q3pv-v-tab {
	appearance: none; border: 0; background: none; font: inherit; font-weight: 700; font-size: 1.05rem;
	padding: 10px 16px; margin-bottom: -2px; border-bottom: 3px solid transparent; cursor: pointer; color: inherit; opacity: .65;
}
.q3pv-v-tab:hover { opacity: 1; }
.q3pv-v-tab.is-on { opacity: 1; border-bottom-color: var(--q3pv-accent); color: var(--q3pv-accent); }
.q3pv-v-tab:focus-visible { outline: 2px solid var(--q3pv-accent); outline-offset: 2px; }
.q3pv-v-count { display: inline-block; min-width: 1.5em; padding: 0 .4em; border-radius: 999px; background: var(--q3pv-accent); color: var(--q3pv-accent-ink); font-size: .8em; line-height: 1.5; text-align: center; }
.q3pv-v-sub { margin: 18px 0 10px; font-size: 1rem; }
.q3pv-v-sub:first-child { margin-top: 0; }
@media (max-width: 600px) { .q3pv-v-tab { padding: 8px 10px; font-size: .95rem; } }

/* Tilbud */
.q3pv-media, .q3pv-v-main { position: relative; }
.q3pv-badge {
	position: absolute; top: 12px; left: 12px; z-index: 2;
	background: var(--q3pv-offer, #c62828); color: #fff; font-weight: 800; font-size: .85rem;
	padding: 5px 10px; border-radius: 999px; letter-spacing: .02em; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
.q3pv-price--offer .q3pv-now, .q3pv-v-link .q3pv-now { color: var(--q3pv-offer, #c62828); font-weight: 800; }
.q3pv-old { color: var(--q3pv-muted); font-weight: 400; font-size: .85em; margin-left: 6px; }
.q3pv-offer-to { display: block; font-size: .85rem; font-weight: 600; color: var(--q3pv-muted); margin-top: 2px; }
.q3pv-mini-badge { display: inline-block; background: var(--q3pv-offer, #c62828); color: #fff; font-size: .72rem; font-weight: 700; padding: 0 6px; border-radius: 999px; vertical-align: 1px; }
.q3pv-vatnote { margin: 22px 0 0; font-size: .9rem; color: var(--q3pv-muted); text-align: center; }

/* Egenskaper: zebrastriper */
.q3pv-v-table tbody tr:nth-child(odd) { background: var(--q3pv-well); }
.q3pv-v-table th, .q3pv-v-table td { padding: 9px 14px; border-bottom: 0; }
.q3pv-v-table td { text-align: left; }

/* Dokumenter */
.q3pv-v-docs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.q3pv-v-docs a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--q3pv-line); border-radius: 10px; color: inherit; text-decoration: none; font-weight: 600; }
.q3pv-v-docs a:hover { border-color: var(--q3pv-accent); }
.q3pv-v-doc-ico { flex: none; min-width: 44px; text-align: center; padding: 6px 6px; border-radius: 6px; background: var(--q3pv-accent); color: var(--q3pv-accent-ink); font-size: .72rem; font-weight: 800; letter-spacing: .04em; }
.q3pv-v-bar[hidden] { display: none; }

/* Stort bilde (lysboks) */
.q3pv-v-main img { cursor: zoom-in; }
.q3pv-lb { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; background: rgba(0, 0, 0, .88); touch-action: pan-y; }
.q3pv-lb::backdrop { background: transparent; }
.q3pv-lb[open] { display: flex; align-items: center; justify-content: center; }
.q3pv-lb img { max-width: calc(100vw - 140px); max-height: calc(100vh - 100px); object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); user-select: none; }
.q3pv-lb button { position: absolute; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.q3pv-lb button:hover, .q3pv-lb button:focus-visible { background: rgba(255, 255, 255, .3); outline: none; }
.q3pv-lb-prev, .q3pv-lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 30px; line-height: 1; }
.q3pv-lb-prev { left: 18px; }
.q3pv-lb-next { right: 18px; }
.q3pv-lb-close { top: 16px; right: 18px; width: 46px; height: 46px; font-size: 30px; }
.q3pv-lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .95rem; opacity: .85; }
@media (max-width: 700px) {
	.q3pv-lb img { max-width: 100vw; max-height: calc(100vh - 120px); border-radius: 0; }
	.q3pv-lb-prev, .q3pv-lb-next { top: auto; bottom: 10px; transform: none; }
}

/* Tekst fra Q3: overskrifter i normal størrelse, kort beskrivelse som vanlig tekst */
.q3pv-v-short { margin: 0; font-size: 1.05rem; line-height: 1.5; font-weight: 400; }
.q3pv-v-text h1, .q3pv-v-text h2 { font-size: 1.35rem; line-height: 1.3; margin: 1.2em 0 .5em; }
.q3pv-v-text h3, .q3pv-v-text h4, .q3pv-v-text h5, .q3pv-v-text h6 { font-size: 1.1rem; line-height: 1.3; margin: 1em 0 .4em; }

/* Popup for tilbehørsvarer */
.q3pv-pop {
	border: 0; padding: 0; border-radius: 14px; width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
	background: var(--q3pv-page-bg, #f4f4f4); color: var(--q3pv-page-ink, inherit); box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.q3pv-pop::backdrop { background: rgba(0, 0, 0, .55); }
.q3pv-pop[open] { display: flex; flex-direction: column; }
.q3pv-pop-bar { display: flex; align-items: center; padding: 8px 14px; flex: none; }
.q3pv-pop-back { border: 0; background: none; font: inherit; font-weight: 700; color: var(--q3pv-accent); cursor: pointer; padding: 6px 0; }
.q3pv-pop-close { margin-left: auto; border: 0; background: none; font-size: 32px; line-height: 1; cursor: pointer; color: inherit; }
.q3pv-pop-body { overflow: auto; padding: 0 clamp(14px, 2.5vw, 28px) clamp(16px, 2.5vw, 28px); outline: none; }
.q3pv-pop .q3pv-v-top { gap: clamp(14px, 2.5vw, 28px); }
.q3pv-pop .q3pv-v-title { font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.q3pv-pop .q3pv-v-sec { margin-top: 18px; }
.q3pv-pop .q3pv-vatnote { margin-top: 14px; }

/* Delesøk */
.q3pv-parts-pick { background: var(--q3pv-bg); border-radius: var(--q3pv-radius); padding: 18px 20px; border: 1px solid var(--q3pv-line); }
.q3pv-parts-lead { margin: 0 0 10px; font-weight: 700; font-size: 1.1rem; }
.q3pv-parts-selects { display: flex; flex-wrap: wrap; gap: 10px; }
.q3pv-parts-selects select, .q3pv-parts-search input {
	font: inherit; padding: .65em .8em; border: 1px solid rgba(128, 128, 128, .45); border-radius: 8px; background: #fff; color: inherit; min-width: 190px;
}
.q3pv-parts-search { margin: 12px 0 0; }
.q3pv-parts-search input { width: 100%; box-sizing: border-box; }
.q3pv-parts-title { margin: 26px 0 8px; font-size: 1.35rem; }
.q3pv-parts-group { background: var(--q3pv-bg); border: 1px solid var(--q3pv-line); border-radius: var(--q3pv-radius); padding: 14px 18px; margin-top: 14px; }
.q3pv-parts-group > h4 { margin: 0 0 8px; color: var(--q3pv-accent); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.q3pv-parts-row {
	display: grid; grid-template-columns: 34px 140px minmax(0, 1fr) 90px 130px 200px; gap: 10px; align-items: center;
	padding: 9px 6px; border-top: 1px solid var(--q3pv-line); cursor: pointer; font-weight: 400;
}
.q3pv-parts-head { cursor: default; border-top: 0; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--q3pv-muted); }
.q3pv-parts-row:not(.q3pv-parts-head):hover { background: var(--q3pv-well); }
.q3pv-parts-row.is-on { background: color-mix(in srgb, var(--q3pv-accent) 10%, transparent); }
.q3pv-parts-row input { width: 18px; height: 18px; accent-color: var(--q3pv-accent); }
.q3pv-parts-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .92rem; }
.q3pv-parts-name { font-weight: 600; }
.q3pv-parts-name small { display: block; font-weight: 400; color: var(--q3pv-muted); font-size: .82rem; }
.q3pv-parts-price { font-weight: 700; text-align: right; }
.q3pv-parts-stock { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.q3pv-parts-stock .q3pv-st { border: 0; padding: 0; gap: 6px; }
.q3pv-parts-stock .q3pv-lbl { margin-left: 0; }
.q3pv-parts-bar {
	position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	background: var(--q3pv-accent); color: var(--q3pv-accent-ink); padding: 10px 12px 10px 20px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.q3pv-parts-bar[hidden] { display: none; }
.q3pv-parts-bar .q3pv-btn { background: #fff; color: var(--q3pv-accent); }
.q3pv-parts-count { font-weight: 700; }
.q3pv-lines { background: var(--q3pv-well); border-radius: 8px; padding: 8px 12px; max-height: 180px; overflow: auto; font-size: .92rem; }
.q3pv-lines ul { margin: 0; padding-left: 1.1em; }
.q3pv-lines[hidden] { display: none; }
@media (max-width: 760px) {
	.q3pv-parts-row.q3pv-parts-head { display: none; }
	.q3pv-parts-row { grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "chk name price" "chk code qty" "chk stock stock"; row-gap: 2px; }
	.q3pv-parts-row > :nth-child(1) { grid-area: chk; }
	.q3pv-parts-row > :nth-child(2) { grid-area: code; }
	.q3pv-parts-row > :nth-child(3) { grid-area: name; }
	.q3pv-parts-row > :nth-child(4) { grid-area: qty; text-align: right; }
	.q3pv-parts-row > :nth-child(5) { grid-area: price; }
	.q3pv-parts-row > :nth-child(6) { grid-area: stock; }
	.q3pv-parts-selects select { flex: 1 1 100%; }
}

/* Passer til */
.q3pv-v-fits { list-style: none; margin: 0; padding: 0; columns: 2 280px; column-gap: 32px; }
.q3pv-v-fits li { padding: 7px 0; border-bottom: 1px solid var(--q3pv-line); break-inside: avoid; }
.q3pv-v-fits a { color: var(--q3pv-accent); font-weight: 600; text-decoration: none; }
.q3pv-v-fits a:hover { text-decoration: underline; }

/* Delesøk: deler som kort i rutenett */
.q3pv-parts-group { padding: 18px; }
.q3pv-pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.q3pv-pcard { position: relative; display: flex; flex-direction: column; border: 1px solid var(--q3pv-line); border-radius: var(--q3pv-radius); overflow: hidden; background: var(--q3pv-bg); transition: border-color .15s, box-shadow .15s; }
.q3pv-pcard.is-on { border-color: var(--q3pv-accent); box-shadow: 0 0 0 2px var(--q3pv-accent); }
.q3pv-pcard-media { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--q3pv-well); overflow: hidden; text-decoration: none; }
a.q3pv-pcard-media { cursor: pointer; }
.q3pv-pcard-media img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.q3pv-pcard:hover a.q3pv-pcard-media img { transform: scale(1.04); }
.q3pv-pcard-media .q3pv-noimg { aspect-ratio: auto; height: 100%; }
.q3pv-pcard-media .q3pv-badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.q3pv-pcard-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.q3pv-pcard-body .q3pv-code { margin: 0; font-family: ui-monospace, Menlo, Consolas, monospace; }
.q3pv-pcard-name { margin: 0; font-size: 1rem; line-height: 1.3; }
.q3pv-pcard-name a { color: inherit; text-decoration: none; }
.q3pv-pcard-name a:hover { text-decoration: underline; }
.q3pv-pcard-note, .q3pv-pcard-qty { margin: 0; font-size: .85rem; color: var(--q3pv-muted); }
.q3pv-pcard-price { margin: 0; font-weight: 700; }
.q3pv-pcard-stock { display: flex; flex-direction: column; gap: 2px; font-size: .88rem; }
.q3pv-pcard-stock .q3pv-st { border: 0; padding: 0; gap: 6px; }
.q3pv-pcard-stock .q3pv-lbl { margin-left: 0; }
.q3pv-pcard-pick { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--q3pv-accent); border-radius: 999px; color: var(--q3pv-accent); font-weight: 700; cursor: pointer; user-select: none; }
.q3pv-pcard-pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--q3pv-accent); }
.q3pv-pcard.is-on .q3pv-pcard-pick { background: var(--q3pv-accent); color: var(--q3pv-accent-ink); }
.q3pv-pcard.is-on .q3pv-pcard-pick input { accent-color: #fff; }
@media (max-width: 480px) { .q3pv-pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Delesøk: årsmodell og maskintreff i søket */
.q3pv-parts-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 12px; }
.q3pv-parts-top .q3pv-parts-title { margin: 0; }
.q3pv-parts-year { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.q3pv-parts-year select { min-width: 170px; padding: 9px 12px; border: 1px solid var(--q3pv-line); border-radius: 8px; background: var(--q3pv-bg); font: inherit; }
.q3pv-model-hits { margin: 0 0 22px; }
.q3pv-model-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 10px; }
.q3pv-model-hit { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 14px 16px; border: 1px solid var(--q3pv-line); border-radius: var(--q3pv-radius); background: var(--q3pv-bg); color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.q3pv-model-hit:hover, .q3pv-model-hit:focus-visible { border-color: var(--q3pv-accent); box-shadow: 0 0 0 1px var(--q3pv-accent); }
.q3pv-model-hit span { color: var(--q3pv-accent); font-weight: 700; white-space: nowrap; font-size: .9rem; }
.q3pv-model-hit small { display: block; margin-top: 2px; font-weight: 400; color: var(--q3pv-muted); font-size: .85rem; }

/* ===== Kundeinnlogging ===== */
.q3pv-price--kunde .q3pv-yours { display: inline-block; margin-right: 4px; padding: 2px 8px; border-radius: 999px; background: var(--q3pv-accent); color: var(--q3pv-accent-ink, #fff); font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; vertical-align: middle; }
.q3pv-price--kunde .q3pv-now { font-weight: 800; }
.q3pv-btn--cart { background: transparent; color: var(--q3pv-accent); border: 2px solid var(--q3pv-accent); }
.q3pv-btn--cart:hover { background: var(--q3pv-accent); color: var(--q3pv-accent-ink, #fff); }
.q3pv-pcard-cart { margin-top: auto; padding: 6px 0; border: 0; background: none; color: var(--q3pv-accent); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-align: left; }
.q3pv-pcard-cart + .q3pv-pcard-pick { margin-top: 0; }
.q3pv-pcard-cart:hover { text-decoration: underline; }
.q3pv-parts-cartall { background: transparent !important; color: inherit !important; border: 2px solid currentColor !important; margin-right: 8px; }
.q3pv-cartbadge { position: fixed; right: 20px; bottom: 20px; z-index: 9990; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; background: var(--q3pv-accent); color: var(--q3pv-accent-ink, #fff); font-weight: 700; text-decoration: none; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.q3pv-cartbadge strong { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: #fff; color: var(--q3pv-accent); font-size: .85rem; }
.q3pv-cartbadge[hidden] { display: none; }

.q3pv-minside { max-width: 1100px; }
.q3pv-ms-login { max-width: 420px; margin: 0 auto; padding: 32px; border-radius: var(--q3pv-radius); background: var(--q3pv-bg); box-shadow: 0 2px 14px rgba(0, 0, 0, .06); display: flex; flex-direction: column; gap: 14px; }
.q3pv-ms-login h2 { margin: 0; }
.q3pv-ms-login label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.q3pv-ms-login input { padding: 11px 12px; border: 1px solid var(--q3pv-line); border-radius: 8px; font: inherit; }
.q3pv-ms-lead, .q3pv-ms-help { margin: 0; color: var(--q3pv-muted); }
.q3pv-ms-help { font-size: .88rem; }
.q3pv-ms-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.q3pv-ms-head h2 { margin: 0; }
.q3pv-ms-firms { margin: 4px 0 0; color: var(--q3pv-muted); }
.q3pv-ms-tabs { margin: 0; padding: 0 24px; background: var(--q3pv-bg); border-radius: var(--q3pv-radius) var(--q3pv-radius) 0 0; }
.q3pv-ms-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--q3pv-accent); color: var(--q3pv-accent-ink, #fff); font-size: .78rem; }
.q3pv-ms-body { padding: 24px; border-radius: 0 0 var(--q3pv-radius) var(--q3pv-radius); background: var(--q3pv-bg); }
.q3pv-ms-table { width: 100%; border-collapse: collapse; }
.q3pv-ms-table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--q3pv-muted); padding: 8px 10px; border-bottom: 2px solid var(--q3pv-line); }
.q3pv-ms-table td { padding: 12px 10px; border-bottom: 1px solid var(--q3pv-line); vertical-align: middle; }
.q3pv-ms-table tbody tr:nth-child(even) td { background: var(--q3pv-well); }
.q3pv-ms-table small { color: var(--q3pv-muted); }
.q3pv-ms-table .q3pv-r { text-align: right; white-space: nowrap; }
.q3pv-ms-qty { width: 80px; padding: 8px; border: 1px solid var(--q3pv-line); border-radius: 8px; font: inherit; }
.q3pv-ms-del { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--q3pv-well); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.q3pv-ms-del:hover { background: #fde2e2; color: #b32d2e; }
.q3pv-ms-cart { display: flex; flex-direction: column; gap: 16px; }
.q3pv-ms-cart label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.q3pv-ms-cart input:not([type=radio]):not(.q3pv-ms-qty), .q3pv-ms-cart textarea { padding: 10px 12px; border: 1px solid var(--q3pv-line); border-radius: 8px; font: inherit; }
.q3pv-ms-cart .q3pv-dept-opt { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.q3pv-ms-cart .q3pv-dept-opt small { font-weight: 400; color: var(--q3pv-muted); }
.q3pv-ms-cart .q3pv-btn { align-self: flex-start; }
.q3pv-ms-note { margin: 0; font-size: .88rem; color: var(--q3pv-muted); }
.q3pv-ms-ok { padding: 12px 0; }
.q3pv-ms-ok h3 { margin: 0 0 8px; color: var(--q3pv-accent); }
.q3pv-paid { color: #1e8e3e; font-weight: 700; }
.q3pv-muted { color: var(--q3pv-muted); }
.q3pv-ms-machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.q3pv-ms-machine { display: flex; flex-direction: column; gap: 10px; padding: 18px; border: 1px solid var(--q3pv-line); border-radius: var(--q3pv-radius); }
.q3pv-ms-machine h3 { margin: 0; font-size: 1.1rem; }
.q3pv-ms-machine dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .92rem; }
.q3pv-ms-machine dt { color: var(--q3pv-muted); }
.q3pv-ms-machine dd { margin: 0; font-weight: 600; }
.q3pv-ms-machine .q3pv-btn { margin-top: auto; align-self: flex-start; text-decoration: none; }
.q3pv-kundelenke { font-weight: 600; }
@media (max-width: 640px) {
	.q3pv-ms-body { padding: 14px; }
	.q3pv-ms-table thead { display: none; }
	.q3pv-ms-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--q3pv-line); }
	.q3pv-ms-table td { display: block; padding: 2px 0; border: 0; background: none !important; }
	.q3pv-ms-table .q3pv-r { text-align: left; }
}
.q3pv-logindlg-wrap { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 16px; }
.q3pv-logindlg-wrap[hidden] { display: none; }
.q3pv-logindlg-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.q3pv-logindlg { position: relative; display: block; margin: 0; max-width: 460px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 0; border: 0; border-radius: var(--q3pv-radius); }
html.q3pv-noscroll { overflow: hidden; }
.q3pv-logindlg .q3pv-ms-login { box-shadow: none; margin: 0; max-width: none; }
.q3pv-logindlg .q3pv-close { position: absolute; top: 10px; right: 12px; }
.q3pv-ms-table input.q3pv-ms-qty { width: 84px !important; max-width: 84px !important; min-width: 0 !important; padding: 8px 10px !important; }
.q3pv-ms-table td:first-child { width: 45%; }
.q3pv-ms-click { cursor: pointer; }
.q3pv-ms-click:hover td, .q3pv-ms-click:focus td { background: var(--q3pv-well) !important; }
.q3pv-ms-click:focus { outline: 2px solid var(--q3pv-accent); outline-offset: -2px; }
.q3pv-ms-open { margin-left: 6px; color: var(--q3pv-accent); font-size: .85rem; font-weight: 700; }
.q3pv-orderdlg { max-width: 900px; width: calc(100% - 32px); padding: 32px; border: 0; border-radius: var(--q3pv-radius); }
.q3pv-orderdlg::backdrop { background: rgba(0, 0, 0, .55); }
.q3pv-orderdlg .q3pv-close { position: absolute; top: 12px; right: 14px; }
.q3pv-orderdlg h2 { margin: 0 0 12px; }
.q3pv-ms-dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 0 0 20px; }
.q3pv-ms-dl dt { color: var(--q3pv-muted); }
.q3pv-ms-dl dd { margin: 0; font-weight: 600; }
.q3pv-ms-totals { margin: 16px 0 0 auto; max-width: 320px; }
.q3pv-ms-totals p { display: flex; justify-content: space-between; margin: 4px 0; }
.q3pv-ms-text { margin-top: 20px; padding: 14px 16px; border-radius: 8px; background: var(--q3pv-well); }
.q3pv-ms-text h3 { margin: 0 0 6px; font-size: 1rem; }
.q3pv-ms-text p { margin: 0; }
/* Nettstedssøk */
.q3pv-sitesearch { margin: 0 auto 40px; }
.q3pv-ss-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 24px 0 12px; }
.q3pv-ss-title { margin: 24px 0 12px; font-size: 1.4rem; }
.q3pv-ss-head .q3pv-ss-title { margin: 0; }
.q3pv-ss-title span { color: var(--q3pv-muted); font-weight: 400; }
a.q3pv-model-hit { text-decoration: none; }
.q3pv-locked { padding: 32px; border-radius: var(--q3pv-radius); background: var(--q3pv-bg); text-align: center; }
.q3pv-locked p { margin: 0 0 14px; font-size: 1.05rem; }
.q3pv-locked .q3pv-btn { display: inline-block; text-decoration: none; }
/* Meny under «Min side» i toppen */
.q3pv-kundemeny { position: relative; display: inline-block; }
.q3pv-kundemeny-drop { position: absolute; right: 0; top: 100%; z-index: 9999; display: none; flex-direction: column; min-width: 200px; padding: 8px; margin-top: 0; border-radius: 10px; background: #fff; color: #1d1d1d; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); text-align: left; font-size: 15px; line-height: 1.3; }
.q3pv-kundemeny-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; } /* bro så menyen ikke lukkes på vei ned */
.q3pv-kundemeny:hover .q3pv-kundemeny-drop, .q3pv-kundemeny:focus-within .q3pv-kundemeny-drop { display: flex; }
.q3pv-kundemeny-name { padding: 6px 10px 8px; font-size: .8rem; color: #6b6b6b; border-bottom: 1px solid #eee; margin-bottom: 4px; }
.q3pv-kundemeny-drop a, .q3pv-kundemeny-drop button { display: block; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.q3pv-kundemeny-drop a:hover, .q3pv-kundemeny-drop button:hover, .q3pv-kundemeny-drop a:focus, .q3pv-kundemeny-drop button:focus { background: #f2f2f2; }
.q3pv-kundemeny-out { margin-top: 4px; border-top: 1px solid #eee !important; border-radius: 0 0 6px 6px !important; color: #b32d2e !important; font-weight: 600 !important; }
.q3pv-ms-upload { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 24px; padding: 16px 18px; border: 1px dashed var(--q3pv-line); border-radius: var(--q3pv-radius); }
.q3pv-ms-upload > div { flex: 1 1 320px; }
.q3pv-ms-filebtn { position: relative; overflow: hidden; cursor: pointer; }
.q3pv-ms-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.q3pv-ms-upmsg { flex-basis: 100%; margin: 0; color: var(--q3pv-muted); }
.q3pv-ms-upmsg:empty { display: none; }
.q3pv-ms-report { margin: 0 0 18px; padding: 14px 16px; border-radius: 8px; background: var(--q3pv-well); }
.q3pv-ms-report p { margin: 0 0 6px; }
.q3pv-ms-report ul { margin: 4px 0 0 18px; }
.q3pv-ms-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; padding: 16px 18px; border-radius: var(--q3pv-radius); background: var(--q3pv-well); }
.q3pv-ms-quick strong { margin-right: 6px; }
.q3pv-ms-quick input[name=code] { flex: 1 1 200px; min-width: 0; padding: 10px 12px; border: 1px solid var(--q3pv-line); border-radius: 8px; font: inherit; }
.q3pv-ms-quick input[name=qty] { width: 84px !important; padding: 10px; border: 1px solid var(--q3pv-line); border-radius: 8px; font: inherit; }
.q3pv-ms-qmsg { flex-basis: 100%; margin: 0; color: var(--q3pv-muted); }
.q3pv-ms-qmsg:empty { display: none; }
.q3pv-ms-upload.is-drag { border-color: var(--q3pv-accent); border-style: solid; background: var(--q3pv-well); box-shadow: 0 0 0 2px var(--q3pv-accent) inset; }
.q3pv-ms-repl { margin-top: 6px; padding: 6px 10px; border-radius: 6px; background: #fff4e5; color: #7a4a00; font-size: .88rem; }
.q3pv-ms-swap { margin-left: 6px; padding: 3px 10px; border: 1px solid currentColor; border-radius: 999px; background: #fff; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.q3pv-ms-swap:hover { background: #7a4a00; color: #fff; }

/* Leveringsmåter som linjer i bestillingen */
.q3pv-ms-deliv[hidden] { display: none; }
.q3pv-ms-dhead th { padding-top: 18px; text-align: left; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.q3pv-ms-drow { cursor: pointer; }
.q3pv-ms-cart .q3pv-ms-drow label { display: flex; flex-direction: row; align-items: center; gap: 12px; margin: 0; font-weight: 600; cursor: pointer; }
.q3pv-ms-cart .q3pv-ms-drow input[type=radio] { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: currentColor; }
.q3pv-ms-drow:hover td { background: rgba(0, 0, 0, .04); }
.q3pv-ms-drow.is-on td { background: rgba(0, 0, 0, .03); }
.q3pv-logindlg.q3pv-logindlg--wide { max-width: 1100px; }
.q3pv-logindlg--wide .q3pv-minside { padding: 24px; }
