/* ═══════════════════════════════════════════════════════════════
 * Glapris catalog redesign — complete page (v2).
 * Design: "D3v2 — Kuratert Sidebar v2" (desktop) + "M1v2" (mobile).
 * Enhances the Astra + FacetWP archive; scoped to body.has-glp-catalog.
 *
 * v2 changes vs clean:
 *   - LAYOUT FIX (defect #1): robust 2-col CSS grid on the REAL container
 *     (.ast-container:has(#primary) / .ast-container.ast-toolbar), explicit
 *     grid placement + hard reset of Astra float/percent-width so #secondary
 *     can never fall under #primary. Sidebar 250px / gap 24px (D3v2 exact).
 *   - HEART FIX (defect #2): high-specificity, !important-forced visible grey
 *     outline (svg stroke=currentColor, fill:none), orange-filled on .is-active.
 *   - Card price → DM Sans 18/700/-.02em (was Antonio). Brand #aaa/500. Title 14.
 *   - Stock dots incl. --out (chosen-store "Ikke på lager i X") state.
 *   - Card foot = flex-end cart-only row; body padding 14/16/16.
 *   - Toolbar: borderless transparent sort select + "Sorter:" prefix.
 *   - Premium quick-view (D3v2): image-flush media + dot indicators, title 20,
 *     square wishlist beside ATC, store-aware per-store stock lines.
 *   - Mobile breakpoint aligned to 921px (Astra off-canvas + store picker);
 *     2-col M1v2 parity grid + off-canvas bottom-sheet skin.
 *   - STORE PICKER: header trigger/bar scoped to .glp-store-bar* (site-wide,
 *     NOT under .has-glp-catalog) so it renders in the header on every page,
 *     desktop + mobile; supersedes the draft snippet's minimal bar styling.
 *   - No leaks: every catalog rule scoped to body.has-glp-catalog.
 * ═══════════════════════════════════════════════════════════════ */

body.has-glp-catalog {
	--glp-orange: #f58220;
	--glp-orange-dark: #d96d0f;
	--glp-orange-subtle: rgba(245,130,32,.08);
	--glp-charcoal: #1a1a1a;
	--glp-grey-700: #3d3d3d;
	--glp-grey-500: #6b6b6b;
	--glp-grey-400: #8a8a8a;
	--glp-grey-350: #aaaaaa;
	--glp-grey-300: #b0b0b0;
	--glp-grey-200: #d4d4d4;
	--glp-line: #eee;
	--glp-input-border: #e0ddd8;
	--glp-check-border: #d0cdc8;
	--glp-tile: #f7f7f7;
	--glp-success: #2d8a4e;
	--glp-error: #d93025;
	--glp-display: 'Antonio', sans-serif;
	--glp-body: 'Inter', sans-serif;
	background: #fff;
}

/* ════════════ (a) PAGE LAYOUT — robust 2-col (defect #1) ════════════
 * MINIFIER-SAFE: no :has() — WP Rocket's CSS minifier (minify_css=1) can corrupt
 * a :has() selector and drop the whole rule, which let Astra's float layout +
 * #secondary{min-width:0} collapse the sidebar to a min-content sliver. Fix:
 * target the real container (.ast-container.ast-toolbar) with flex and a FIXED,
 * non-shrinkable 250px sidebar so it can never collapse, regardless of cascade. */
body.has-glp-catalog #content > .ast-container.ast-toolbar {
	display: flex !important;
	flex-wrap: nowrap !important;
	align-items: flex-start !important;
	gap: 28px !important;
	max-width: 1500px;
	width: 100%;
	margin: 0 auto;
	padding: 0 28px;
}

/* Sidebar = fixed 250px, CANNOT shrink (this is what kills the sliver). */
body.has-glp-catalog #content > .ast-container.ast-toolbar > #secondary,
body.has-glp-catalog #secondary.widget-area.secondary {
	order: 0 !important;
	flex: 0 0 290px !important;
	width: 290px !important;
	min-width: 290px !important;
	max-width: 290px !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	position: sticky;
	top: 16px;
	align-self: flex-start;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
}
body.has-glp-catalog #secondary::-webkit-scrollbar { width: 6px; }
body.has-glp-catalog #secondary::-webkit-scrollbar-thumb { background: var(--glp-grey-200); border-radius: 3px; }
body.has-glp-catalog #secondary .sidebar-main { width: 100% !important; }

/* Product area = the rest; may shrink (min-width:0 allows the grid to fit). */
body.has-glp-catalog #content > .ast-container.ast-toolbar > #primary,
body.has-glp-catalog #primary.content-area.primary {
	order: 1 !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	width: auto !important;
	max-width: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
body.has-glp-catalog .ast-woocommerce-container { padding: 0 !important; }

/* page title (Antonio, D3v2 H1 = 24px) */
body.has-glp-catalog .woocommerce-products-header__title,
body.has-glp-catalog .ast-archive-title,
body.has-glp-catalog h1.page-title {
	font-family: var(--glp-display);
	font-size: 24px;
	font-weight: 700;
	letter-spacing: -.2px;
	color: var(--glp-charcoal);
	margin: 4px 0 14px;
}

/* ════════════ SIDEBAR FILTER (D3v2: one segmented card) ════════════ */
/* Sidebar header strip "Filter / Nullstill" (D3v2 lines 82-85). Rendered by
 * catalog.js (prepended into .ast-filter-wrap) so it never depends on an
 * unverified Astra sidebar hook, and it appears exactly once. No CSS ::before
 * pseudo-label (that would duplicate the JS header). */
body.has-glp-catalog .glp-cat-sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 10px;
}
body.has-glp-catalog .glp-cat-sidebar-head__title {
	font-family: var(--glp-display);
	font-size: 15px;
	font-weight: 700;
	color: var(--glp-charcoal);
	line-height: 1;
}
body.has-glp-catalog .glp-cat-sidebar-head__reset {
	font-family: var(--glp-body);
	font-size: 12px;
	font-weight: 500;
	color: var(--glp-orange);
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	text-decoration: none;
}
body.has-glp-catalog .glp-cat-sidebar-head__reset:hover { color: var(--glp-orange-dark); }

/* the whole facet stack reads as ONE bordered card */
body.has-glp-catalog .ast-filter-wrap {
	background: #fff;
	border: 1.5px solid var(--glp-line);
	border-radius: 12px;
	padding: 0;
	overflow: hidden;
}

/* each facet widget = a borderless section divided by a hairline */
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget,
body.has-glp-catalog .ast-filter-wrap .widget {
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--glp-line);
	border-radius: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
}
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget:last-child,
body.has-glp-catalog .ast-filter-wrap .widget:last-child { border-bottom: 0; }

body.has-glp-catalog .ast-filter-wrap .widget-title,
body.has-glp-catalog .ast-filter-wrap .widget h2,
body.has-glp-catalog .ast-filter-wrap .widget h3 {
	font-family: var(--glp-body);
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .7px;
	color: var(--glp-grey-400); /* collapsed = dim */
	margin: 0;
	padding: 13px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	cursor: pointer;
}
body.has-glp-catalog .ast-filter-wrap .widget-title.ast-accordion-active,
body.has-glp-catalog .ast-filter-wrap .widget-title.active { color: var(--glp-charcoal); } /* open = solid */
body.has-glp-catalog .ast-filter-wrap .widget-title::after {
	content: "";
	width: 9px; height: 9px;
	border-right: 2px solid var(--glp-grey-350);
	border-bottom: 2px solid var(--glp-grey-350);
	transform: rotate(45deg);
	transition: transform .2s;
	margin-left: auto;
	position: relative;
	top: -2px;
}
body.has-glp-catalog .ast-filter-wrap .widget-title.ast-accordion-active::after,
body.has-glp-catalog .ast-filter-wrap .widget-title.active::after { transform: rotate(-135deg); top: 2px; }

body.has-glp-catalog .ast-filter-wrap .widget > *:not(.widget-title) { padding: 0 16px 14px; }

/* checkboxes (D3v2: 16px box, #d0cdc8 border, #bbb count) */
body.has-glp-catalog .facetwp-checkbox {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 4px;
	font-size: 13.5px;
	color: var(--glp-grey-700);
	background: none;
	cursor: pointer;
	line-height: 1.3;
}
body.has-glp-catalog .facetwp-checkbox::before {
	content: "";
	width: 16px; height: 16px;
	flex: 0 0 16px;
	border: 1.5px solid var(--glp-check-border);
	border-radius: 4px;
	background: #fff;
	margin: 0;
	transition: background .12s, border-color .12s;
}
body.has-glp-catalog .facetwp-checkbox:hover::before { border-color: var(--glp-orange); }
body.has-glp-catalog .facetwp-checkbox.checked::before {
	border-color: var(--glp-orange);
	background: var(--glp-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}
body.has-glp-catalog .facetwp-checkbox.checked { color: var(--glp-charcoal); font-weight: 500; }
body.has-glp-catalog .facetwp-counter { color: #bbb; font-size: 11px; margin-left: auto; }
body.has-glp-catalog .facetwp-checkbox.disabled { opacity: .4; }

/* show-more toggle */
body.has-glp-catalog .facetwp-toggle {
	color: var(--glp-orange);
	font-size: 12px;
	font-weight: 600;
	margin-top: 8px;
	display: inline-block;
	cursor: pointer;
}

/* price (number_range) — D3v2 inputs #e0ddd8 / radius 6 / 7px 10px */
body.has-glp-catalog .facetwp-type-number_range .facetwp-number-min,
body.has-glp-catalog .facetwp-type-number_range .facetwp-number-max {
	width: 46%;
	border: 1.5px solid var(--glp-input-border);
	border-radius: 6px;
	padding: 7px 10px;
	font-size: 13px;
	font-weight: 600;
	color: var(--glp-charcoal);
}
body.has-glp-catalog .facetwp-type-number_range .facetwp-number-min:focus,
body.has-glp-catalog .facetwp-type-number_range .facetwp-number-max:focus { border-color: var(--glp-orange); outline: none; }
body.has-glp-catalog .noUi-target { border: 0; box-shadow: none; background: var(--glp-line); height: 4px; margin: 16px 6px 8px; }
body.has-glp-catalog .noUi-connect { background: var(--glp-orange); }
body.has-glp-catalog .noUi-handle {
	width: 16px !important; height: 16px !important;
	border-radius: 50%;
	border: 2.5px solid var(--glp-orange);
	background: #fff;
	box-shadow: 0 1px 4px rgba(0,0,0,.12);
	top: -7px !important; right: -8px !important;
	cursor: grab;
}
body.has-glp-catalog .noUi-handle::before, body.has-glp-catalog .noUi-handle::after { display: none; }
body.has-glp-catalog .facetwp-submit {
	margin-top: 10px;
	background: var(--glp-charcoal);
	color: #fff;
	border: 0;
	border-radius: 7px;
	padding: 7px 16px;
	font-size: 12.5px;
	font-weight: 600;
	cursor: pointer;
}
body.has-glp-catalog .facetwp-submit:hover { background: #000; }

/* ════════════ TOOLBAR (count + sort + active pills) ════════════ */
body.has-glp-catalog .woocommerce-result-count {
	font-size: 13px;
	color: var(--glp-grey-400);
	font-weight: 400;
	margin: 0;
	float: none;
	display: inline-block;
}
body.has-glp-catalog .woocommerce-ordering {
	float: none;
	margin: 0 0 14px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
/* "Sorter:" prefix label before the borderless select */
body.has-glp-catalog .woocommerce-ordering::before {
	content: "Sorter:";
	font-size: 12px;
	color: var(--glp-grey-400);
	font-family: var(--glp-body);
}
body.has-glp-catalog .woocommerce-ordering select,
body.has-glp-catalog .orderby {
	border: 0;
	background: transparent;
	padding: 4px 22px 4px 2px;
	font-family: var(--glp-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--glp-charcoal);
	cursor: pointer;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaaaaa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 2px center;
	background-size: 11px;
}

/* active filter pills (D3v2) */
body.has-glp-catalog .glp-cat-activefilters { margin: 0 0 14px; }
body.has-glp-catalog .facetwp-selections ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
body.has-glp-catalog .facetwp-selections li {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(245,130,32,.08);
	border: 1px solid rgba(245,130,32,.2);
	border-radius: 100px;
	padding: 3px 8px 3px 10px;
	font-size: 11px;
	font-weight: 500;
	color: var(--glp-charcoal);
}
/* design pills show the VALUE only ("Bordlamper"), never the "Kategori: " facet-name prefix */
body.has-glp-catalog .facetwp-selections li .facetwp-selection-label { display: none !important; }
/* FacetWP ships a black ✕ as a background-image (icon-close.png) on the value with
 * padding-right:16px — kill it so only our design ✕ (the orange circle ::after) shows */
body.has-glp-catalog .facetwp-selections li .facetwp-selection-value {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background-image: none !important;
	padding-right: 0 !important;
	margin-right: 0 !important;
}
body.has-glp-catalog .facetwp-selections li .facetwp-selection-value::after {
	content: "✕";
	width: 14px; height: 14px;
	border-radius: 50%;
	background: rgba(245,130,32,.15);
	color: var(--glp-orange);
	font-size: 9px;
	line-height: 14px;
	text-align: center;
}

/* ════════════ "ANBEFALT FOR DEG" RECOMMENDED STRIP (D3v2 lines 53-76) ════════════
 * Full-width band ABOVE the {sidebar | products} grid. The loader hooks it on
 * woocommerce_before_main_content at a negative priority so it prints before
 * Astra opens #primary; this rule then pulls it out to span the layout width
 * (it sits as the first child of #content, before the .ast-toolbar grid). */
body.has-glp-catalog .glp-cat-reco {
	max-width: 1320px;
	margin: 0 auto 4px;
	padding: 20px 24px 20px;
	border-bottom: 1px solid #f0f0f0;
	font-family: var(--glp-body);
}
body.has-glp-catalog .glp-cat-reco__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 14px;
}
body.has-glp-catalog .glp-cat-reco__heading {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
body.has-glp-catalog .glp-cat-reco__title {
	font-family: var(--glp-display);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
	color: var(--glp-charcoal);
}
body.has-glp-catalog .glp-cat-reco__tag {
	font-size: 11px;
	color: var(--glp-grey-400);
	background: #f5f5f5;
	padding: 2px 8px;
	border-radius: 100px;
}
body.has-glp-catalog .glp-cat-reco__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
}
body.has-glp-catalog .glp-cat-reco__item {
	display: flex;
	gap: 12px;
	align-items: center;
	background: #fafafa;
	border: 1px solid var(--glp-line);
	border-radius: 8px;
	padding: 10px;
	overflow: hidden;
	text-decoration: none;
	transition: border-color .15s, background .15s;
}
body.has-glp-catalog .glp-cat-reco__item:hover { border-color: var(--glp-grey-200); background: #f5f5f5; }
body.has-glp-catalog .glp-cat-reco__thumb {
	width: 72px;
	height: 72px;
	flex: 0 0 72px;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}
body.has-glp-catalog .glp-cat-reco__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}
body.has-glp-catalog .glp-cat-reco__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}
body.has-glp-catalog .glp-cat-reco__name {
	font-size: 12px;
	font-weight: 500;
	color: var(--glp-charcoal);
	line-height: 1.25;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
body.has-glp-catalog .glp-cat-reco__price {
	font-size: 13px;
	font-weight: 700;
	color: var(--glp-charcoal);
}
body.has-glp-catalog .glp-cat-reco__price.is-sale { color: var(--glp-error); }
@media (max-width: 1100px) { body.has-glp-catalog .glp-cat-reco__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 921px) {
	body.has-glp-catalog .glp-cat-reco { padding: 16px 12px; margin-bottom: 0; }
	body.has-glp-catalog .glp-cat-reco__thumb { width: 56px; height: 56px; flex-basis: 56px; }
}
@media (max-width: 480px) { body.has-glp-catalog .glp-cat-reco__grid { grid-template-columns: 1fr; } }

/* ════════════ GRID (4-col per request, within the 250px-sidebar layout) ════════════ */
body.has-glp-catalog ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 32px !important;
	padding: 0 !important;
	list-style: none !important;
}
body.has-glp-catalog ul.products::before,
body.has-glp-catalog ul.products::after { content: none !important; display: none !important; }
body.has-glp-catalog ul.products li.product.glp-cat-card { width: auto !important; margin: 0 !important; padding: 0 !important; float: none !important; clear: none !important; }
@media (max-width: 1280px) { body.has-glp-catalog ul.products { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 921px)  { body.has-glp-catalog ul.products { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; } }
@media (max-width: 380px)  { body.has-glp-catalog ul.products { grid-template-columns: 1fr; } }

/* ════════════ CARD ════════════ */
body.has-glp-catalog .glp-cat-card { display: flex !important; flex-direction: column; background: #fff; border: 1.5px solid var(--glp-line); border-radius: 10px; overflow: hidden; transition: box-shadow .2s, transform .2s; font-family: var(--glp-body); }
body.has-glp-catalog .glp-cat-card:hover { box-shadow: 0 8px 32px rgba(0,0,0,.10); transform: translateY(-2px); }
body.has-glp-catalog .glp-cat-card__media { position: relative; aspect-ratio: 1/1; background: var(--glp-tile); }
body.has-glp-catalog .glp-cat-card__imglink { display: block; width: 100%; height: 100%; }
body.has-glp-catalog .glp-cat-card__img { width: 100% !important; height: 100% !important; object-fit: contain; padding: 8px; mix-blend-mode: multiply; }
body.has-glp-catalog .glp-cat-card__badge { position: absolute; top: 12px; left: 12px; background: var(--glp-orange); color: #fff; font-family: var(--glp-display); font-weight: 700; font-size: 11px; letter-spacing: .3px; line-height: 1; padding: 5px 8px; border-radius: 100px; z-index: 2; }

/* ── (b) HEART VISIBILITY — beats theme/TI CSS (defect #2) ── */
body.has-glp-catalog .glp-cat-card__heart {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	box-shadow: 0 1px 4px rgba(0,0,0,.10);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	color: #5a5a5a; /* dark graphite — clearly visible grey outline on the white pill */
	transition: color .15s, transform .15s, background .15s;
	-webkit-appearance: none;
	appearance: none;
	line-height: 0;
}
body.has-glp-catalog .glp-cat-card__heart svg {
	width: 18px;
	height: 18px;
	display: block;
	fill: none !important;            /* outline by default — kill any theme fill */
	stroke: currentColor !important;  /* follow the heart's color, not theme white */
	stroke-width: 1.8;
	pointer-events: none;
}
body.has-glp-catalog .glp-cat-card__heart:hover {
	color: var(--glp-orange);
	transform: scale(1.08);
}
body.has-glp-catalog .glp-cat-card__heart:focus-visible {
	outline: 2px solid var(--glp-orange);
	outline-offset: 2px;
}
body.has-glp-catalog .glp-cat-card__heart.is-active,
body.has-glp-catalog .glp-cat-card__heart[aria-pressed="true"] {
	color: var(--glp-orange);
}
body.has-glp-catalog .glp-cat-card__heart.is-active svg,
body.has-glp-catalog .glp-cat-card__heart[aria-pressed="true"] svg {
	fill: var(--glp-orange) !important;
	stroke: var(--glp-orange) !important;
}
body.has-glp-catalog [data-action="wishlist"].is-confirmed { animation: glp-catalog-wishlist-pop .36s cubic-bezier(.2,.9,.25,1.25); }
@keyframes glp-catalog-wishlist-pop { 0% { transform: scale(.88); } 55% { transform: scale(1.11); } 100% { transform: scale(1); } }
body.has-glp-catalog .glp-wishlist-toast { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 10050; max-width: calc(100vw - 32px); padding: 11px 14px; border: 1px solid rgba(255,255,255,.16); border-radius: 10px; background: var(--glp-charcoal); color: #fff; box-shadow: 0 12px 28px rgba(0,0,0,.22); font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }
body.has-glp-catalog .glp-wishlist-toast.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { body.has-glp-catalog [data-action="wishlist"].is-confirmed { animation: none; } body.has-glp-catalog .glp-wishlist-toast { transition: none; } }

/* ── hover overlay: single Hurtigvisning button (D3v2) ── */
body.has-glp-catalog .glp-cat-card__overlay { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; padding: 28px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.55)); opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .18s, transform .18s; z-index: 2; }
body.has-glp-catalog .glp-cat-card__quick { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.95); color: var(--glp-charcoal); font-size: 12.5px; font-weight: 600; padding: 8px 16px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.18); border: 0; cursor: pointer; }
body.has-glp-catalog .glp-cat-card__quick svg { width: 15px; height: 15px; }
@media (hover: hover) and (min-width: 922px) { body.has-glp-catalog .glp-cat-card:hover .glp-cat-card__overlay { opacity: 1; transform: none; pointer-events: auto; } }
@media (max-width: 921px) { body.has-glp-catalog .glp-cat-card__overlay { display: none; } }
body.has-glp-catalog .glp-cat-card__ti { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── card body (D3v2 padding 14/16/16) ── */
body.has-glp-catalog .glp-cat-card__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
body.has-glp-catalog .glp-cat-card__brand { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--glp-grey-350); font-weight: 500; }
body.has-glp-catalog .glp-cat-card__title { font-size: 14px; font-weight: 500; color: var(--glp-charcoal); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
body.has-glp-catalog .glp-cat-card__title:hover { color: var(--glp-orange-dark); }
body.has-glp-catalog .glp-cat-card__prices { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
body.has-glp-catalog .glp-cat-card__price { font-family: 'Antonio', sans-serif; font-size: 20px; font-weight: 700; color: var(--glp-charcoal); letter-spacing: 0; }
body.has-glp-catalog .glp-cat-card__price.is-sale { color: var(--glp-error); }
body.has-glp-catalog .glp-cat-card__was { font-size: 13px; color: var(--glp-grey-300); text-decoration: line-through; }

/* ── stock dots ── */
/* stock dots STACKED vertically (per request) */
body.has-glp-catalog .glp-cat-card__stock { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 5px; }
body.has-glp-catalog .glp-cat-card__dot { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 11.5px; font-weight: 500; line-height: 1.35; text-align: left; }
/* the warehouse line is a button that opens the store picker (underlined "varehus") */
body.has-glp-catalog .glp-cat-card__storelink { background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer; text-align: left; }
body.has-glp-catalog .glp-cat-card__storelink .glp-cat-card__storetext { text-decoration: none; }
/* underline "varehus" only in the prompt state (no store chosen) — signals it's clickable */
body.has-glp-catalog .glp-cat-card__storelink--prompt .glp-cat-card__storetext { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--glp-orange); }
body.has-glp-catalog .glp-cat-card__storelink:hover .glp-cat-card__storetext { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--glp-orange); }
/* ONLY the leading empty span is the dot — never the "varehus" text span */
body.has-glp-catalog .glp-cat-card__dot > span:first-child { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-top: 4px; }
/* Stock-status colours: GREEN = available (online or in a store), RED = not in
 * stock, ORANGE = coming to the online warehouse. */
body.has-glp-catalog .glp-cat-card__dot--online { color: var(--glp-success); } body.has-glp-catalog .glp-cat-card__dot--online > span:first-child { background: var(--glp-success); }
body.has-glp-catalog .glp-cat-card__dot--store { color: var(--glp-success); } body.has-glp-catalog .glp-cat-card__dot--store > span:first-child { background: var(--glp-success); }
body.has-glp-catalog .glp-cat-card__dot--muted { color: var(--glp-orange); } body.has-glp-catalog .glp-cat-card__dot--muted > span:first-child { background: var(--glp-orange); }
/* not in stock (chosen-store "Ikke på lager i X" / Utsolgt / Utgått) — red */
body.has-glp-catalog .glp-cat-card__dot--out { color: #d93025; } body.has-glp-catalog .glp-cat-card__dot--out > span:first-child { background: #d93025; }
/* keep both stock lines visually identical (same size/weight); store line is a plain inline button */
body.has-glp-catalog .glp-cat-card__storelink { font-size: 11.5px; font-weight: 500; line-height: inherit; }

/* ── card foot: cart-only, right-aligned (D3v2) ── */
body.has-glp-catalog .glp-cat-card__foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 0 16px 14px; }
body.has-glp-catalog .glp-cat-card__foot-spacer { flex: 1; }
body.has-glp-catalog .glp-cat-card__status { font-size: 11px; font-weight: 600; margin-right: auto; }
body.has-glp-catalog .glp-cat-card__status[data-k="pickup"] { color: var(--glp-orange); }
body.has-glp-catalog .glp-cat-card__status[data-k="soldout"], body.has-glp-catalog .glp-cat-card__status[data-k="utgatt"] { color: var(--glp-grey-400); }
body.has-glp-catalog .glp-cat-card__cart { width: 38px; height: 38px; flex: none; margin-left: auto; border-radius: 10px; background: var(--glp-orange); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(245,130,32,.25); transition: transform .15s, background .15s; border: 0; cursor: pointer; }
body.has-glp-catalog .glp-cat-card__cart:hover { background: var(--glp-orange-dark); transform: translateY(-1px); }
body.has-glp-catalog .glp-cat-card__cart { position: relative; overflow: hidden; }
body.has-glp-catalog .glp-cat-card__cart svg { width: 18px; height: 18px; transition: opacity .15s; }
/* loading → spin the Gla Pris logo (favicon) as a branded loader */
body.has-glp-catalog .glp-cat-card__cart.loading { pointer-events: none; }
body.has-glp-catalog .glp-cat-card__cart.loading svg { opacity: 0; }
body.has-glp-catalog .glp-cat-card__cart.loading::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 22px;
	margin: -11px 0 0 -11px;
	background: center / contain no-repeat var(--glp-spin-logo, none);
	border-radius: 50%;
	animation: glpSpin .7s linear infinite;
}
@keyframes glpSpin { to { transform: rotate(360deg); } }

/* ── Filter-apply loader: dim the grid + spin the Gla Pris logo while FacetWP refreshes ── */
body.has-glp-catalog .glp-filter-loader {
	position: absolute;
	inset: 0;
	z-index: 20;
	background: rgba(255, 255, 255, .72);
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease;
	pointer-events: none;
}
body.has-glp-catalog .glp-filter-loader.is-on { opacity: 1; visibility: visible; pointer-events: all; }
body.has-glp-catalog .glp-filter-loader__spin {
	display: block;
	position: sticky;
	top: 38vh;
	width: 52px;
	height: 52px;
	margin: 0 auto;
	background: center / contain no-repeat var(--glp-spin-logo, none);
	animation: glpSpin .7s linear infinite;
}

/* added → cart icon morphs to a green checkmark in place (no layout shift) */
body.has-glp-catalog .glp-cat-card__cart.is-added { background: var(--glp-success) !important; }
body.has-glp-catalog .glp-cat-card__cart.is-added svg { opacity: 0; }
body.has-glp-catalog .glp-cat-card__cart.is-added::after {
	content: "";
	position: absolute;
	inset: 0;
	background: center / 18px 18px no-repeat url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23ffffff'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='20%206%209%2017%204%2012'/%3E%3C/svg%3E");
	animation: glpCheckPop .35s cubic-bezier(.2, 1.3, .5, 1);
}
@keyframes glpCheckPop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
/* WooCommerce "Vis handlekurv / View cart" link — hidden so the button never shifts */
body.has-glp-catalog .added_to_cart,
.glp-qv__actions .added_to_cart { display: none !important; }
/* quick-view ATC button: green + checkmark when added */
.glp-qv__atc.is-added { background: var(--glp-success) !important; border-color: var(--glp-success) !important; }
.glp-qv__atc.is-added svg { display: none; }
.glp-qv__atc.is-added::before {
	content: "";
	display: inline-block;
	width: 18px; height: 18px;
	margin-right: 7px;
	vertical-align: -4px;
	background: center / 18px no-repeat url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23ffffff'%20stroke-width='3'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='20%206%209%2017%204%2012'/%3E%3C/svg%3E");
}
body.has-glp-catalog .glp-cat-card .added_to_cart { display: block; font-size: 11px; color: var(--glp-orange); font-weight: 600; padding: 0 16px 12px; margin-top: -6px; }

/* ════════════ MOBILE (<=921px) — stacked + M1v2 parity + off-canvas ════════════ */
@media (max-width: 921px) {
	/* single column; sidebar hidden, Astra off-canvas hosts the facets (no :has) */
	body.has-glp-catalog #content > .ast-container.ast-toolbar {
		display: block !important;
		padding: 0 12px;
	}
	body.has-glp-catalog #secondary,
	body.has-glp-catalog .widget-area.secondary {
		display: none !important;
	}
	body.has-glp-catalog #primary,
	body.has-glp-catalog .content-area.primary { width: 100% !important; }

	/* M1v2 card: 1px border, radius 10, tighter type */
	body.has-glp-catalog .glp-cat-card { border-width: 1px; border-radius: 10px; }
	body.has-glp-catalog .glp-cat-card__body { padding: 10px 12px 12px; gap: 3px; }
	body.has-glp-catalog .glp-cat-card__title { font-size: 11.5px; min-height: 2.6em; }
	body.has-glp-catalog .glp-cat-card__brand { font-size: 9.5px; }
	body.has-glp-catalog .glp-cat-card__price { font-size: 15px; }
	body.has-glp-catalog .glp-cat-card__was { font-size: 11.5px; }
	body.has-glp-catalog .glp-cat-card__foot { padding: 0 12px 12px; }
	/* compact round "+" affordance feel on mobile */
	body.has-glp-catalog .glp-cat-card__cart { width: 32px; height: 32px; border-radius: 8px; }
	body.has-glp-catalog .glp-cat-card__cart svg { width: 16px; height: 16px; }
	body.has-glp-catalog .glp-cat-card__heart { width: 30px; height: 30px; top: 8px; right: 8px; }
	body.has-glp-catalog .glp-cat-card__heart svg { width: 16px; height: 16px; }

	/* Astra off-canvas filter trigger → premium dark pill */
	body.has-glp-catalog .astra-shop-filter-button.ast-flyout-filter,
	body.has-glp-catalog .ast-flyout-filter,
	body.has-glp-catalog .astra-shop-filter-button {
		display: inline-flex !important;
		align-items: center;
		gap: 6px;
		background: var(--glp-charcoal);
		color: #fff;
		border: 0;
		border-radius: 8px;
		padding: 9px 16px;
		font-size: 13px;
		font-weight: 600;
		font-family: var(--glp-body);
		cursor: pointer;
	}
	body.has-glp-catalog .woocommerce-ordering { display: flex; width: 100%; }
	body.has-glp-catalog .woocommerce-ordering select,
	body.has-glp-catalog .orderby { flex: 1; width: 100%; }
}

/* off-canvas drawer styling (Astra) — bottom-sheet feel */
body.has-glp-catalog .astra-off-canvas-sidebar { background: #fff; }
body.has-glp-catalog .astra-off-canvas-sidebar .glp-cat-sidebar-head { display: none; }
body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap { border: 0; border-radius: 0; }
body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .widget { border-bottom: 1px solid var(--glp-line); border-radius: 0; }

/* ════════════ QUICK-VIEW MODAL (D3v2) ════════════ */
.glp-qv-overlay { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity .18s; }
.glp-qv-overlay.is-open { opacity: 1; }

.glp-qv { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 760px; max-width: 100%; max-height: 85vh; overflow: hidden; background: #fff; border-radius: 16px; box-shadow: 0 24px 80px rgba(0,0,0,.20); font-family: 'Inter', sans-serif; transform: translateY(8px) scale(.985); transition: transform .2s ease; }
.glp-qv-overlay.is-open .glp-qv { transform: none; }

/* close — pinned to the whole modal (D3v2: 32x32 at 16/16) */
/* close button — forced light circle + visible dark X (beats any theme button styling) */
.glp-qv-overlay .glp-qv__close { position: absolute; top: 16px; right: 16px; z-index: 4; width: 34px; height: 34px; border-radius: 50% !important; background: #f1efec !important; color: #333 !important; display: flex !important; align-items: center; justify-content: center; border: 0 !important; box-shadow: none !important; cursor: pointer; transition: background .15s, color .15s; padding: 0 !important; }
.glp-qv-overlay .glp-qv__close:hover { background: #e6e3df !important; color: #000 !important; }
.glp-qv-overlay .glp-qv__close:focus-visible { outline: 2px solid #f58220; outline-offset: 2px; }
.glp-qv-overlay .glp-qv__close svg { width: 15px !important; height: 15px !important; display: block; fill: none !important; stroke: currentColor !important; stroke-width: 2.4; }

/* ── Left media panel: image flush to the corner radius (D3v2) ── */
.glp-qv__media { position: relative; background: #fff; border-radius: 16px 0 0 16px; overflow: hidden; }
.glp-qv__stage { position: relative; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; background: #f7f7f7; }
.glp-qv__img { width: 100%; height: 100%; object-fit: contain; padding: 26px; mix-blend-mode: multiply; }
.glp-qv__badge { position: absolute; top: 16px; left: 16px; background: #f58220; color: #fff; font-family: 'Antonio', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .3px; line-height: 1; padding: 6px 9px; border-radius: 100px; z-index: 2; }
.glp-qv__dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; z-index: 2; }
.glp-qv__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: rgba(255,255,255,.5); box-shadow: 0 1px 2px rgba(0,0,0,.2); cursor: pointer; transition: width .2s, background .2s; }
.glp-qv__dot:hover { background: rgba(255,255,255,.75); }
.glp-qv__dot.is-active { width: 20px; background: #f58220; }
.glp-qv__dot:focus-visible { outline: 2px solid #f58220; outline-offset: 2px; }
/* quick-view prev/next arrows — scoped + !important to beat the theme's
 * button / button:hover styles (which otherwise turn the arrow dark and drop the
 * translateY on hover, making it jump). */
.glp-qv-overlay .glp-qv__nav {
	position: absolute !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	z-index: 3;
	width: 40px !important;
	height: 40px !important;
	min-width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255,255,255,.94) !important;
	color: #1a1a1a !important;
	box-shadow: 0 2px 12px rgba(0,0,0,.16) !important;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.glp-qv-overlay .glp-qv__nav:hover {
	background: #fff !important;
	color: var(--glp-orange) !important;
	box-shadow: 0 4px 18px rgba(0,0,0,.24) !important;
	transform: translateY(-50%) scale(1.08) !important;
}
.glp-qv-overlay .glp-qv__nav svg { width: 18px !important; height: 18px !important; }
.glp-qv-overlay .glp-qv__nav--prev { left: 14px !important; right: auto !important; }
.glp-qv-overlay .glp-qv__nav--next { right: 14px !important; left: auto !important; }
.glp-qv-overlay .glp-qv__nav:focus-visible { outline: 2px solid var(--glp-orange) !important; outline-offset: 2px; }

/* ── Right info panel (D3v2 padding 28/28/24) ── */
.glp-qv__info { padding: 28px 28px 24px; display: flex; flex-direction: column; min-width: 0; max-height: 85vh; overflow-y: auto; overscroll-behavior: contain; }
.glp-qv__brand { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #aaa; font-weight: 500; }
.glp-qv__title { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 600; line-height: 1.3; color: #1a1a1a; margin: 6px 0 10px; letter-spacing: -.1px; }
.glp-qv__sku { font-size: 12px; color: #8a8a8a; }
.glp-qv__prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
.glp-qv__was { font-size: 16px; color: #b0b0b0; text-decoration: line-through; }
.glp-qv__price { font-family: 'Antonio', sans-serif; font-size: 28px; font-weight: 700; line-height: 1; color: #1a1a1a; letter-spacing: -.01em; }
.glp-qv__price.is-sale { color: #d93025; }

/* stock list — online green + per-store orange/grey dots (store-aware) */
.glp-qv__stock { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0; margin-bottom: 16px; }
.glp-qv__stockline { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.glp-qv__stockdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: #d4d4d4; }
.glp-qv__stockline--online { color: #2d8a4e; font-weight: 500; }
.glp-qv__stockline--online .glp-qv__stockdot { background: #2d8a4e; }
.glp-qv__stockline--store { color: #6b6b6b; }
.glp-qv__stockline--store .glp-qv__stockdot { background: #f58220; }
.glp-qv__stockline--muted { color: #b0b0b0; }
.glp-qv__stockline--muted .glp-qv__stockdot { background: #d4d4d4; }
/* chosen-store / per-warehouse "Ikke på lager i {store}" — muted unavailable */
.glp-qv__stockline--out { color: #b0b0b0; }
.glp-qv__stockline--out .glp-qv__stockdot { background: #d4d4d4; }
/* the .glp-cat-card__dot variants are also used inside the QV per-store list */
.glp-qv__stock .glp-cat-card__dot { font-size: 13px; }
.glp-qv__stock .glp-cat-card__dot span { width: 7px; height: 7px; }
.glp-qv__stock .glp-cat-card__dot--online { color: #2d8a4e; } .glp-qv__stock .glp-cat-card__dot--online span { background: #2d8a4e; }
.glp-qv__stock .glp-cat-card__dot--store { color: #2d8a4e; } .glp-qv__stock .glp-cat-card__dot--store span { background: #2d8a4e; }
.glp-qv__stock .glp-cat-card__dot--muted { color: #f58220; } .glp-qv__stock .glp-cat-card__dot--muted span { background: #f58220; }
.glp-qv__stock .glp-cat-card__dot--out { color: #d93025; } .glp-qv__stock .glp-cat-card__dot--out span { background: #d93025; }
.glp-qv__dot--pref { font-weight: 600; }

/* actions — full-width orange ATC + square wishlist (D3v2) */
.glp-qv__actions { margin-top: auto; display: flex; align-items: stretch; gap: 10px; }
.glp-qv__atc { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 8px; background: #f58220; color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 6px 18px rgba(245,130,32,.28); transition: background .15s, transform .15s; border: 0; cursor: pointer; }
.glp-qv__atc:hover { background: #d96d0f; }
.glp-qv__atc:active { transform: translateY(1px); }
.glp-qv__atc.loading { opacity: .6; pointer-events: none; }
.glp-qv__atc--link { background: #1a1a1a; box-shadow: none; }
.glp-qv__atc--link:hover { background: #000; }
.glp-qv__atc svg { width: 18px; height: 18px; }
.glp-qv__wish { flex: none; width: 48px; height: 48px; border-radius: 8px; border: 1.5px solid #eee; background: #fff; color: #5a5a5a; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: color .15s, border-color .15s, background .15s; -webkit-appearance: none; appearance: none; line-height: 0; }
.glp-qv__wish svg { width: 19px; height: 19px; display: block; fill: none !important; stroke: currentColor !important; stroke-width: 1.8; pointer-events: none; }
.glp-qv__wish:hover { color: #f58220; border-color: #f58220; }
.glp-qv__wish:focus-visible { outline: 2px solid #f58220; outline-offset: 2px; }
.glp-qv__wish.is-active,
.glp-qv__wish[aria-pressed="true"] { color: #f58220; border-color: #f58220; background: rgba(245,130,32,.08); }
.glp-qv__wish.is-active svg,
.glp-qv__wish[aria-pressed="true"] svg { fill: #f58220 !important; stroke: #f58220 !important; }
.glp-qv__ti { position: absolute; width: 0; height: 0; overflow: hidden; }
.glp-qv__more { display: block; margin-top: 10px; text-align: center; font-size: 13px; color: #f58220; font-weight: 500; }
.glp-qv__more:hover { color: #d96d0f; }
.glp-qv .added_to_cart { display: none; }
.glp-qv__loading { grid-column: 1 / -1; padding: 80px 40px; text-align: center; color: #8a8a8a; font-family: 'Inter', sans-serif; }

/* ── Quick-view mobile: stack media over info, bottom sheet ── */
@media (max-width: 680px) {
	.glp-qv-overlay { padding: 0; align-items: flex-end; }
	.glp-qv { grid-template-columns: 1fr; width: 100%; max-width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; overflow-y: auto; }
	.glp-qv__media { border-radius: 16px 16px 0 0; }
	.glp-qv__stage { padding: 0; }
	.glp-qv__img { padding: 20px; }
	.glp-qv__info { max-height: none; overflow: visible; padding: 22px 20px 24px; }
	.glp-qv__title { font-size: 19px; }
	.glp-qv__price { font-size: 25px; }
}

/* ════════════════════════════════════════════════════════════════════
 * STORE PICKER — single source of truth note.
 * The store bar (.glp-store-bar*) and modal (.glp-store-modal*) are styled
 * ENTIRELY by store-picker.php's own inline <style> (wp_footer, loaded on
 * every page so the bar looks identical site-wide, PC + mobile). We do NOT
 * restyle them here: catalog.css is enqueued only on flag-active archives, so
 * any .glp-store-bar rules here would (a) be defeated by the later-loading
 * footer <style> at equal specificity and (b) make the bar inconsistent on
 * non-catalog pages. Per the review, the orphaned/conflicting .glp-store-bar*
 * block was removed. Keep all store-bar styling in store-picker.php.
 * ════════════════════════════════════════════════════════════════════ */

/* ════════════ BREADCRUMB — keep it visually distinct from the (beige) store-bar ════════════ */
body.has-glp-catalog .ast-breadcrumbs-wrapper,
body.has-glp-catalog nav.woocommerce-breadcrumb { background: #ffffff !important; }

/* ════════════ PROGRESSIVE LOAD MORE — auto-loads in bounded segments ════════════ */
body.has-glp-catalog button.facetwp-load-more,
body.has-glp-catalog .facetwp-load-more,
body.has-glp-catalog .lmp_load_more_button {
	position: absolute !important;
	opacity: 0 !important;
	height: 0 !important;
	width: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}
body.has-glp-catalog .glp-cat-infinite { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; padding: 32px 0 38px; width: 100%; }
body.has-glp-catalog .glp-cat-infinite__spin { display: none; width: 24px; height: 24px; border: 3px solid #f0f0f0; border-top-color: var(--glp-orange); border-radius: 50%; animation: glpCatSpin .7s linear infinite; }
body.has-glp-catalog .glp-cat-infinite__txt { display: none; flex-basis: 100%; text-align: center; font-size: 13px; color: var(--glp-grey-400); }
body.has-glp-catalog .glp-cat-infinite__more { min-height: 48px; padding: 0 28px; border: 1.5px solid var(--glp-orange); border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--glp-body); font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; }
body.has-glp-catalog .glp-cat-infinite__more { background: var(--glp-orange); color: #fff; }
body.has-glp-catalog .glp-cat-infinite__more:hover { background: var(--glp-orange-dark); border-color: var(--glp-orange-dark); color: #fff; }
body.has-glp-catalog .glp-cat-infinite.is-loading .glp-cat-infinite__spin,
body.has-glp-catalog .glp-cat-infinite.is-loading .glp-cat-infinite__txt,
body.has-glp-catalog .glp-cat-infinite.is-done .glp-cat-infinite__txt { display: inline-flex; }
body.has-glp-catalog .glp-cat-infinite.is-loading .glp-cat-infinite__more { display: none; }
body.has-glp-catalog .glp-cat-infinite.is-auto .glp-cat-infinite__more { display: none; }
@media (max-width: 560px) {
	body.has-glp-catalog .glp-cat-infinite { align-items: stretch; padding: 24px 0 30px; }
	body.has-glp-catalog .glp-cat-infinite__more { width: 100%; }
}
@keyframes glpCatSpin { to { transform: rotate(360deg); } }
/* Hide the OLD WPCode infinite-scroll loader (snippet deactivated but may linger via cache) */
body.has-glp-catalog .glp-infinite-loader { display: none !important; }

/* Quick-view title must not inherit a theme uppercase transform */
.glp-qv__title { text-transform: none !important; }

/* ════════════ CATEGORY NAVIGATION (Jula-style tree, Glapris) ════════════ */
body.has-glp-catalog .glp-catnav {
	background: #fff;
	border: 1.5px solid var(--glp-line);
	border-radius: 12px;
	padding: 4px 0;
	margin: 0 0 14px;
	font-family: 'Inter', sans-serif;
	overflow: hidden;
}
body.has-glp-catalog .glp-catnav__head {
	font-family: var(--glp-display);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .2px;
	color: var(--glp-charcoal);
	padding: 11px 16px 9px;
}
body.has-glp-catalog .glp-catnav__list { list-style: none; margin: 0; padding: 0; }
body.has-glp-catalog .glp-catnav__item { border-top: 1px solid #f4f4f4; }
body.has-glp-catalog .glp-catnav__item:first-child { border-top: 0; }
body.has-glp-catalog .glp-catnav__link {
	display: block;
	padding: 9px 16px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--glp-grey-700);
	transition: color .12s;
}
body.has-glp-catalog .glp-catnav__link:hover { color: var(--glp-orange); }
body.has-glp-catalog .glp-catnav__item.is-active > .glp-catnav__link { color: var(--glp-charcoal); font-weight: 700; }
body.has-glp-catalog .glp-catnav__link.is-current { color: var(--glp-orange); font-weight: 700; }
body.has-glp-catalog .glp-catnav__sub { list-style: none; margin: 0 0 6px; padding: 0; background: #faf8f5; }
body.has-glp-catalog .glp-catnav__sublink {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 7px 16px 7px 28px;
	font-size: 13px;
	color: var(--glp-grey-700);
	transition: color .12s;
}
body.has-glp-catalog .glp-catnav__sublink:hover { color: var(--glp-orange); }
body.has-glp-catalog .glp-catnav__sublink.is-current { color: var(--glp-orange); font-weight: 600; }
body.has-glp-catalog .glp-catnav__count { font-size: 11px; color: var(--glp-grey-300); font-weight: 500; flex: none; }
/* hide the now-redundant FacetWP "Kategori" facet widget (replaced by the tree) */
body.has-glp-catalog .ast-filter-wrap .widget.glp-hide-facet,
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget.glp-hide-facet { display: none !important; }
@media (max-width: 921px) { body.has-glp-catalog .glp-catnav { display: none; } }

/* ════════════════════════════════════════════════════════════════════
 * "MED SJEL" v0.6 — editorial hero, sale stickers, curator tags, buy-row.
 * Appended last so these win over earlier card rules.
 * ════════════════════════════════════════════════════════════════════ */

/* Hide the old off-white breadcrumb box + duplicate page title (the hero owns them).
 * The homepage deliberately reuses the catalog card skin and therefore also has
 * .has-glp-catalog. Never hide its normal Astra content container. */
body.has-glp-catalog:not(.has-glp-home) #content > .ast-container:not(.ast-toolbar),
body.has-glp-catalog .ast-breadcrumbs-wrapper,
body.has-glp-catalog nav.woocommerce-breadcrumb,
body.has-glp-catalog .woocommerce-products-header__title,
body.has-glp-catalog .ast-archive-description { display: none !important; }

/* Astra's breadcrumb header bar sits BETWEEN the header and #content as a white
 * band — the hero owns the breadcrumbs, so hide it on the catalog (it was the
 * white field between the header and the breadcrumbs). */
body.has-glp-catalog .ast-header-breadcrumb,
body.has-glp-catalog .main-header-bar.ast-header-breadcrumb { display: none !important; }

/* The dark hero is injected as the first child of #content. Remove the top
 * spacing Astra puts above #content / .ast-container so the hero sits flush under
 * the header (kills the white band between the header and the breadcrumbs). */
body.has-glp-catalog #content,
body.has-glp-catalog #content.site-content { padding-top: 0 !important; margin-top: 0 !important; }
body.has-glp-catalog #content > .ast-container.ast-toolbar { margin-top: 0 !important; }
body.has-glp-catalog .glp-hero { margin-top: 0 !important; }

/* ── Hero (full-width dark band) ── */
body.has-glp-catalog .glp-hero { position: relative; background: #1a1a1a; overflow: hidden; margin: 0 0 6px; }
body.has-glp-catalog .glp-hero__glow { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(245,130,32,.18) 0%, transparent 60%); pointer-events: none; }
body.has-glp-catalog .glp-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .04; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 180px; }
body.has-glp-catalog .glp-hero__inner { position: relative; z-index: 1; max-width: 1500px; margin: 0 auto; padding: 20px 28px 26px; }
body.has-glp-catalog .glp-hero__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12px; color: rgba(255,255,255,.45); margin-bottom: 16px; font-family: 'Inter', sans-serif; }
body.has-glp-catalog .glp-hero__crumbs a { color: rgba(255,255,255,.55); }
body.has-glp-catalog .glp-hero__crumbs a:hover { color: #ff9d4d; }
body.has-glp-catalog .glp-hero__crumb-current { color: #fff; font-weight: 500; }
body.has-glp-catalog .glp-hero__sep { color: rgba(255,255,255,.3); }
body.has-glp-catalog .glp-hero__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
body.has-glp-catalog .glp-hero__kicker { font-family: 'Caveat', cursive; font-size: 26px; font-weight: 600; color: #ff9d4d; line-height: 1; margin-bottom: 2px; transform: rotate(-1.5deg); }
body.has-glp-catalog .glp-hero__title { font-family: 'Antonio', sans-serif; font-size: 48px; font-weight: 700; color: #fff; letter-spacing: -1px; line-height: .98; text-transform: uppercase; margin: 0; }
body.has-glp-catalog .glp-hero__desc { font-size: 14px; color: rgba(255,255,255,.6); margin: 14px 0 0; max-width: 460px; line-height: 1.5; }
body.has-glp-catalog .glp-hero__desc strong { color: #fff; }
body.has-glp-catalog .glp-hero__trust { display: flex; flex-direction: column; gap: 11px; padding-bottom: 6px; flex: none; }
body.has-glp-catalog .glp-hero__trust-item { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 500; }
body.has-glp-catalog .glp-hero__trust-ico { width: 28px; height: 28px; border-radius: 8px; background: rgba(245,130,32,.15); color: #ff9d4d; display: flex; align-items: center; justify-content: center; flex: none; }
@media (max-width: 921px) {
	body.has-glp-catalog .glp-hero__inner { padding: 16px 16px 20px; }
	body.has-glp-catalog .glp-hero__row { flex-direction: column; align-items: flex-start; gap: 16px; }
	body.has-glp-catalog .glp-hero__title { font-size: 34px; }
	body.has-glp-catalog .glp-hero__trust { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
	body.has-glp-catalog .glp-hero__trust-item { font-size: 11.5px; }
}

/* ── Round sale sticker (replaces pill badge) ── */
body.has-glp-catalog .glp-cat-card__sticker { position: absolute; top: 12px; left: 12px; z-index: 3; width: 50px; height: 50px; border-radius: 50%; background: var(--glp-orange); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(245,130,32,.35); transform: rotate(-8deg); }
body.has-glp-catalog .glp-cat-card__sticker-spar { font-size: 7px; font-weight: 600; letter-spacing: .6px; opacity: .85; line-height: 1; }
body.has-glp-catalog .glp-cat-card__sticker-pct { font-family: 'Antonio', sans-serif; font-size: 18px; font-weight: 700; line-height: 1; letter-spacing: -.3px; margin-top: -1px; }

/* ── Curator tag (handwritten) ── */
body.has-glp-catalog .glp-cat-card__tag { position: absolute; top: 12px; left: 50%; transform: translateX(-50%) rotate(-2deg); z-index: 3; display: flex; flex-direction: column; align-items: center; pointer-events: none; }
body.has-glp-catalog .glp-cat-card__tag span { font-family: 'Caveat', cursive; font-size: 21px; font-weight: 700; line-height: .9; text-shadow: 0 1px 2px rgba(255,255,255,.85); }

/* ── Card buy row: price + cart together at the bottom (D3v3) ── */
body.has-glp-catalog .glp-cat-card__buy { margin-top: auto; padding-top: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
body.has-glp-catalog .glp-cat-card__buy .glp-cat-card__prices { margin: 0; align-items: baseline; }
body.has-glp-catalog .glp-cat-card__price { font-family: 'Antonio', sans-serif; font-size: 23px; font-weight: 700; letter-spacing: -.5px; }
body.has-glp-catalog .glp-cat-card__kr { font-size: 11px; color: var(--glp-grey-350); }
body.has-glp-catalog .glp-cat-card__buy .glp-cat-card__cart { margin: 0; flex: none; border-radius: 11px; box-shadow: 0 3px 10px rgba(245,130,32,.3); }
body.has-glp-catalog .glp-cat-card__body .glp-cat-card__status { font-size: 11px; font-weight: 600; margin-top: 2px; }
body.has-glp-catalog .glp-cat-card__quick { border-radius: 100px; }

/* ── Filter consistency (this file is the single source; old filter-redesign snippet disabled) ── */
body.has-glp-catalog .ast-filter-wrap,
body.has-glp-catalog .ast-filter-wrap input,
body.has-glp-catalog .ast-filter-wrap button,
body.has-glp-catalog .ast-filter-wrap select,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet { font-family: 'Inter', sans-serif; }
/* hierarchical [+]/[−] expand toggle (Kategori) — consistent with the rest */
body.has-glp-catalog .facetwp-expand {
	float: right; width: 18px; height: 18px; line-height: 15px; text-align: center;
	border: 1px solid var(--glp-line); border-radius: 4px; background: #fff;
	color: var(--glp-grey-400); font-size: 13px; font-weight: 600; cursor: pointer; flex: none;
}
body.has-glp-catalog .facetwp-expand:hover { border-color: var(--glp-orange); color: var(--glp-orange); }
body.has-glp-catalog .facetwp-depth { margin-left: 8px; }
/* price apply arrow → brand orange */
body.has-glp-catalog .facetwp-submit { background: var(--glp-orange); }
body.has-glp-catalog .facetwp-submit:hover { background: var(--glp-orange-dark); }
/* radios match checkbox sizing if a facet uses them */
body.has-glp-catalog .facetwp-radio { display: flex; align-items: center; gap: 9px; padding: 5px 4px; font-size: 13.5px; color: var(--glp-grey-700); cursor: pointer; }
/* facet checkbox: label fills the row, counter to the right (consistent across all facets) */
body.has-glp-catalog .facetwp-checkbox { justify-content: flex-start; }
body.has-glp-catalog .facetwp-checkbox .facetwp-display-value { flex: 1; min-width: 0; }

/* ── Quick-view description ── */
.glp-qv__desc { font-size: 13.5px; color: #5a5a5a; line-height: 1.55; margin: 2px 0 16px; }
.glp-qv__desc p { margin: 0 0 8px; }
.glp-qv__desc p:last-child { margin-bottom: 0; }
.glp-qv__desc ul, .glp-qv__desc ol { margin: 0 0 8px 18px; padding: 0; }
.glp-qv__desc li { margin: 0 0 3px; }

/* ── Bigger wishlist hearts (card + quick-view) ── */
body.has-glp-catalog .glp-cat-card__heart { width: 36px; height: 36px; }
body.has-glp-catalog .glp-cat-card__heart svg { width: 20px !important; height: 20px !important; }
.glp-qv-overlay .glp-qv__wish { width: 52px !important; height: 52px !important; }
.glp-qv-overlay .glp-qv__wish svg { width: 26px !important; height: 26px !important; }

/* ── Card image carousel: swipe on touch, arrows on desktop (works on both) ── */
body.has-glp-catalog .glp-cat-card__slides {
	display: flex;
	width: 100%;
	height: 100%;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	scroll-behavior: smooth;
}
body.has-glp-catalog .glp-cat-card__slides::-webkit-scrollbar { display: none; }
body.has-glp-catalog .glp-cat-card__slide { flex: 0 0 100%; width: 100%; height: 100%; display: block; scroll-snap-align: center; }
@media (max-width: 921px) {
	body.has-glp-catalog .glp-cat-card__heart { width: 34px; height: 34px; }
	body.has-glp-catalog .glp-cat-card__heart svg { width: 18px !important; height: 18px !important; }
}
/* dots — the .glp-cat-card__imgdots element only renders when there is >1 image */
body.has-glp-catalog .glp-cat-card__imgdots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 3; pointer-events: none; }
body.has-glp-catalog .glp-cat-card__imgdots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.22); box-shadow: 0 0 0 1px rgba(255,255,255,.4); transition: width .2s, background .2s; }
body.has-glp-catalog .glp-cat-card__imgdots span.is-active { width: 16px; border-radius: 3px; background: var(--glp-orange); }
/* desktop hover arrows (touch devices swipe instead) */
body.has-glp-catalog .glp-cat-card__arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	z-index: 4; width: 30px; height: 30px; padding: 0;
	border: 0; border-radius: 50%;
	background: rgba(255,255,255,.92); color: #1a1a1a;
	box-shadow: 0 2px 8px rgba(0,0,0,.15); cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	opacity: 0; transition: opacity .15s ease, background .15s ease;
}
body.has-glp-catalog .glp-cat-card__arrow--prev { left: 8px; }
body.has-glp-catalog .glp-cat-card__arrow--next { right: 8px; }
body.has-glp-catalog .glp-cat-card__arrow svg { width: 15px; height: 15px; }
body.has-glp-catalog .glp-cat-card:hover .glp-cat-card__arrow { opacity: 1; }
body.has-glp-catalog .glp-cat-card__arrow:hover { background: #fff; }
@media (hover: none), (max-width: 921px) {
	body.has-glp-catalog .glp-cat-card__arrow { display: none; }   /* touch → swipe */
}

/* ════════════ FILTER RENDERING FIXES (FacetWP defaults were leaking through) ════════════ */
/* FacetWP draws a default background-image checkbox + left padding — kill it; our ::before is the box. */
body.has-glp-catalog .facetwp-checkbox { background: none !important; padding-left: 0 !important; min-height: 0 !important; }
/* Section headings must never wrap ("LAGERSTATUS" was breaking to two lines). */
body.has-glp-catalog .ast-filter-wrap .widget-title,
body.has-glp-catalog .ast-filter-wrap .widget h2,
body.has-glp-catalog .ast-filter-wrap .widget h3 { white-space: nowrap; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; }
/* Hierarchical expand: it's a <span class="facetwp-expand">[+]</span> INSIDE the checkbox flex
   (last child, gets .opened when expanded). Hide the literal "[+]"/"[-]" text, draw a clean ± box. */
body.has-glp-catalog .facetwp-expand {
	flex: none;
	width: 18px; height: 18px;
	margin-left: 8px;
	border: 1px solid var(--glp-line);
	border-radius: 4px;
	background: #fff;
	font-size: 0 !important;
	line-height: 0;
	cursor: pointer;
	position: relative;
	align-self: center;
}
body.has-glp-catalog .facetwp-expand::before {
	content: "+";
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center;
	font-size: 13px; font-weight: 600; color: var(--glp-grey-500); line-height: 1;
}
body.has-glp-catalog .facetwp-expand.opened::before { content: "\2212"; }
body.has-glp-catalog .facetwp-expand:hover { border-color: var(--glp-orange); }
body.has-glp-catalog .facetwp-expand:hover::before { color: var(--glp-orange); }
/* label fills the row; counter + expand sit at the right; keep it one line */
body.has-glp-catalog .facetwp-checkbox { flex-wrap: nowrap; }
body.has-glp-catalog .facetwp-checkbox .facetwp-display-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.has-glp-catalog .facetwp-checkbox .facetwp-counter { margin-left: 6px; }
/* sub-category indentation + keep FacetWP-hidden items hidden ("Se mindre", collapsed depths) */
body.has-glp-catalog .facetwp-depth { padding-left: 14px; }
body.has-glp-catalog .facetwp-hidden { display: none !important; }
/* "Se N mer" / "Se mindre" links */
body.has-glp-catalog .facetwp-toggle { display: inline-block; margin-top: 8px; color: var(--glp-orange); font-size: 12px; font-weight: 600; cursor: pointer; }
body.has-glp-catalog .facetwp-toggle:hover { color: var(--glp-orange-dark); }


/* ===== filter_new.css INTEGRATED (design-matched rebuild; wins over old filter rules) ===== */
/* ============================================================================
 * GLAPRIS CATALOG — FILTER SIDEBAR (full rebuild)
 * ----------------------------------------------------------------------------
 * Matches the D3 "Med sjel" FilterSection design exactly.
 * Engine = FacetWP (unchanged). This file only restyles the rendered markup
 * + the JS-injected header/chevrons/collapse classes.
 *
 * Scope: every rule is under body.has-glp-catalog.
 * Appended last in catalog.css, so it wins; written self-contained.
 *
 * JS contract (see catalog.js block):
 *   - .ast-filter-wrap gets .glp-cat-sidebar-head prepended:
 *       .glp-cat-sidebar-head > .glp-cat-sidebar-head__title + .glp-cat-sidebar-head__reset
 *   - each section <h2.wp-block-heading> gets class .glp-filter-head (+ role="button"),
 *     and a <span class="glp-filter-chev"> appended inside it.
 *   - collapsing a section adds .glp-collapsed to the section widget
 *     (.ast-woo-sidebar-widget / .widget).
 *   - tokens reused from catalog.css (--glp-orange etc.); fallbacks inline here.
 * ==========================================================================*/

/* ---- local fallbacks so this block stands alone ------------------------- */
body.has-glp-catalog .ast-filter-wrap {
	--glpf-orange: var(--glp-orange, #f58220);
	--glpf-orange-dark: var(--glp-orange-dark, #d96d0f);
	--glpf-charcoal: var(--glp-charcoal, #1a1a1a);
	--glpf-grey-700: var(--glp-grey-700, #3d3d3d);
	--glpf-grey-muted: #888;
	--glpf-counter: #bbb;
	--glpf-line: var(--glp-line, #eee);
	--glpf-input-border: var(--glp-input-border, #e0ddd8);
	--glpf-check-border: var(--glp-check-border, #d0cdc8);
	--glpf-body: var(--glp-body, 'Inter', sans-serif);
	--glpf-display: var(--glp-display, 'Antonio', sans-serif);
}

/* ============================================================================
 * 1. SIDEBAR HEADER ROW  (Filter / Nullstill) — injected above the card
 * ==========================================================================*/
body.has-glp-catalog .glp-cat-sidebar-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 10px;
	padding: 0;
}

body.has-glp-catalog .glp-cat-sidebar-head__title {
	font-family: var(--glpf-display);
	font-size: 17px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .3px;
	text-transform: uppercase;
	color: var(--glpf-charcoal);
}

body.has-glp-catalog .glp-cat-sidebar-head__reset {
	font-family: var(--glpf-body);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	color: var(--glpf-orange);
	background: none;
	border: 0;
	padding: 2px 0;
	cursor: pointer;
	transition: color .15s ease;
}
body.has-glp-catalog .glp-cat-sidebar-head__reset:hover {
	color: var(--glpf-orange-dark);
}
body.has-glp-catalog .glp-cat-sidebar-head__reset:focus-visible {
	outline: 2px solid var(--glpf-orange);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ============================================================================
 * 2. THE CARD — one rounded bordered container wrapping every section
 * ==========================================================================*/
body.has-glp-catalog .ast-filter-wrap {
	background: #fff;
	border: 1.5px solid var(--glpf-line);
	border-radius: 12px;
	overflow: hidden;
	font-family: var(--glpf-body);
	padding: 0;
	margin: 0;
}

/* the injected header must sit OUTSIDE the visual card */
body.has-glp-catalog .glp-cat-sidebar-head {
	border: 0;
	background: none;
}

/* Each FacetWP widget = one section. Hairline divider between sections. */
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget,
body.has-glp-catalog .ast-filter-wrap .widget {
	margin: 0;
	padding: 0;
	border: 0;
	border-top: 1px solid var(--glpf-line);
	background: none;
	border-radius: 0;
}
/* No divider above the first visible section */
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget:first-of-type,
body.has-glp-catalog .ast-filter-wrap .widget:first-child {
	border-top: 0;
}

/* The heading-only "Pris" widget (block-96: only <h2 style="display:none">Pris</h2>,
 * NO facet). It is NOT :empty (it contains the hidden h2), so :empty cannot hide it.
 * The JS tags it with .glp-filter-orphan-head; the :has() rule is a CSS-only
 * fallback for browsers that ran before the JS (or if the JS fails to load). */
body.has-glp-catalog .ast-filter-wrap .glp-filter-orphan-head {
	display: none !important;
}
body.has-glp-catalog .ast-filter-wrap .widget:has(> h2[style*="display"]):not(:has(.facetwp-facet)),
body.has-glp-catalog .ast-filter-wrap .widget:has(> .wp-block-group > h2[style*="display"]):not(:has(.facetwp-facet)) {
	display: none !important;
}
/* Genuinely empty group/widget wrappers FacetWP may leave behind. */
body.has-glp-catalog .ast-filter-wrap .widget_block:empty,
body.has-glp-catalog .ast-filter-wrap .wp-block-group:empty {
	display: none;
}

/* Strip Astra's default group chrome inside the card */
body.has-glp-catalog .ast-filter-wrap .wp-block-group {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

/* The <p> wrappers FacetWP injects around facets — neutralise spacing */
body.has-glp-catalog .ast-filter-wrap p:empty {
	display: none;
}
body.has-glp-catalog .ast-filter-wrap p {
	margin: 0;
}

/* ============================================================================
 * 3. SECTION HEADER  (h2.wp-block-heading -> .glp-filter-head button look)
 * ==========================================================================*/
body.has-glp-catalog .ast-filter-wrap .glp-filter-head,
body.has-glp-catalog .ast-filter-wrap h2.wp-block-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	margin: 0 !important;
	padding: 13px 16px !important;
	box-sizing: border-box;
	text-align: left;
	/* !important: the Gutenberg heading blocks (Kategori/Varemerke/Serie/Lagerstatus)
	 * carry an INLINE font-size/font-family from their typography settings, which
	 * otherwise beats this class and renders the titles huge + in Antonio. Force the
	 * small uppercase label so every section header matches the design (11.5px). */
	font-family: var(--glpf-body) !important;
	font-size: 11.5px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	letter-spacing: .7px !important;
	text-transform: uppercase !important;
	color: var(--glpf-charcoal);
	background: none;
	border: 0;
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	overflow: hidden;
	transition: color .15s ease;
}
/* synthesised header (price) — its label carries the visible text, the chevron the icon */
body.has-glp-catalog .ast-filter-wrap .glp-filter-head__label {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}
body.has-glp-catalog .ast-filter-wrap .glp-filter-head:hover,
body.has-glp-catalog .ast-filter-wrap h2.wp-block-heading:hover {
	color: var(--glpf-charcoal);
}
body.has-glp-catalog .ast-filter-wrap .glp-filter-head:focus-visible,
body.has-glp-catalog .ast-filter-wrap h2.wp-block-heading:focus-visible {
	outline: 2px solid var(--glpf-orange);
	outline-offset: -2px;
}

/* Collapsed section -> grey heading */
body.has-glp-catalog .ast-filter-wrap .glp-collapsed > .glp-filter-head,
body.has-glp-catalog .ast-filter-wrap .glp-collapsed .glp-filter-head,
body.has-glp-catalog .ast-filter-wrap .glp-collapsed > h2.wp-block-heading,
body.has-glp-catalog .ast-filter-wrap .glp-collapsed h2.wp-block-heading {
	color: var(--glpf-grey-muted);
}

/* Belt-and-braces: keep an inline-hidden h2 hidden (the dup "Pris" h2). The whole
 * orphan widget is hidden above; we never reuse this h2 (the price title is the
 * synthesised .glp-filter-head on the facet widget), so it must never reappear. */
body.has-glp-catalog .ast-filter-wrap h2.wp-block-heading[style*="display: none"]:not(.glp-filter-head),
body.has-glp-catalog .ast-filter-wrap h2.wp-block-heading[style*="display:none"]:not(.glp-filter-head) {
	display: none !important;
}

/* ---- chevron ----------------------------------------------------------- */
body.has-glp-catalog .glp-filter-chev {
	flex-shrink: 0;
	width: 12px;
	height: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #aaa;
	/* base = down-chevron (points DOWN when section is COLLAPSED) */
	background: center / 12px 12px no-repeat
		url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23aaaaaa'%20stroke-width='2.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='6%209%2012%2015%2018%209'/%3E%3C/svg%3E");
	transform: rotate(0deg);
	transition: transform .2s ease;
}
/* Default state = OPEN (no .glp-collapsed) -> rotate 180deg so the chevron points UP
 * (matches the design FilterSection: open = up-chevron). Collapsed leaves it at the
 * base rotation (points down). */
body.has-glp-catalog .ast-filter-wrap .widget:not(.glp-collapsed) .glp-filter-chev {
	transform: rotate(180deg);
}
body.has-glp-catalog .ast-filter-wrap .glp-collapsed .glp-filter-chev {
	transform: rotate(0deg);
}

/* ============================================================================
 * 4. SECTION BODY  (facet content) + collapse
 * ==========================================================================*/
body.has-glp-catalog .ast-filter-wrap .facetwp-facet {
	margin: 0;
	padding: 0 16px 14px;
	box-sizing: border-box;
}

/* Collapsed: hide the facet + its <p> wrapper(s) */
body.has-glp-catalog .ast-filter-wrap .glp-collapsed .facetwp-facet,
body.has-glp-catalog .ast-filter-wrap .glp-collapsed p {
	display: none !important;
}

/* ============================================================================
 * 5. CUSTOM CHECKBOXES  (kategori, varemerke, serie)
 *    No native input — draw the box with ::before on .facetwp-checkbox.
 * ==========================================================================*/
/* NOTE on !important: the OLD catalog.css (line ~935) ships
 *   .facetwp-checkbox { background:none !important; padding-left:0 !important; min-height:0 !important; }
 * Because that rule uses !important, this appended block does NOT automatically win
 * on those three properties — so we mark padding / background / hover-background
 * !important here to override it and restore the row's left inset + hover highlight. */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 5px 8px 5px 4px !important;   /* beats old padding-left:0 !important */
	min-height: 32px !important;
	margin: 1px 0;
	border-radius: 5px;
	cursor: pointer;
	font-family: var(--glpf-body);
	font-size: 13.5px;
	line-height: 1.3;
	font-weight: 400;
	color: var(--glpf-grey-700);
	background: none !important;          /* kill FacetWP default sprite bg (matches old) */
	list-style: none;
	flex-wrap: nowrap;
	transition: background-color .12s ease, color .12s ease;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox:hover {
	background: rgba(0, 0, 0, .03) !important;   /* beats old background:none !important */
}

/* the box */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox::before {
	content: "";
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border-radius: 4px;
	border: 1.5px solid var(--glpf-check-border);
	background: #fff center / 11px 11px no-repeat;
	box-sizing: border-box;
	transition: background-color .12s ease, border-color .12s ease;
}

/* checked -> orange box + white check (data-URI svg) */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox.checked {
	color: var(--glpf-charcoal);
	font-weight: 500;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox.checked::before {
	border-color: var(--glpf-orange);
	background-color: var(--glpf-orange);
	background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='20'%20height='20'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23ffffff'%20stroke-width='3.5'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpolyline%20points='20%206%209%2017%204%2012'/%3E%3C/svg%3E");
}

/* DOM (FacetWP 4.5): .facetwp-checkbox is a flex row holding three direct
 * children in this order — .facetwp-display-value (label), .facetwp-counter
 * (N), .facetwp-expand ([+]/[-]). The counter is a SIBLING of the label, not
 * nested in it, so it is never clipped by the label's ellipsis. We keep all
 * three in normal flow: the label flexes and truncates, the count and the
 * expander ride along at the right with no overlap. (.facetwp-expand keeps
 * order:3 from its own rule, so it always sits last.) */
/* Label uses the full available width and WRAPS to up to 2 lines (Norwegian
 * category names like "Hjem og husholdning" are long; single-line truncation
 * cut them to a few letters). */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox .facetwp-display-value {
	flex: 1 1 auto;
	min-width: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	white-space: normal;
	overflow-wrap: break-word;   /* break at sensible points, not mid-word */
	word-break: normal;
	line-height: 1.3;
}

/* count: in-flow, never shrinks, always visible, sits just right of the label */
body.has-glp-catalog .ast-filter-wrap .facetwp-counter {
	flex: 0 0 auto;
	margin-left: 6px;
	display: inline-block !important;
	font-size: 11px;
	font-weight: 400;
	color: var(--glpf-counter);
	pointer-events: none;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox.checked .facetwp-counter {
	color: #c9a98a;
}

/* keyboard focus on a checkbox row */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox:focus-visible {
	outline: 2px solid var(--glpf-orange);
	outline-offset: -1px;
}

/* FIX (laptop): FacetWP's own front.css sets .facetwp-checkbox::before to
 * position:absolute (left:5px) — since our rules never declared `position`,
 * that won the cascade, took the box OUT of flow, and the label (no left
 * offset) flowed under it so the box covered the first ~15px of every label
 * ("Leker" → "ker"). Force the box back to an in-flow flex item with its own
 * right margin so the label always clears it. Scoped to the standard checkbox
 * facets so the tilgjengelighet toggle-switch (its own ::before) is untouched. */
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-kategori .facetwp-checkbox::before,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-varemerke .facetwp-checkbox::before,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-serie .facetwp-checkbox::before {
	position: static !important;
	left: auto !important;
	top: auto !important;
	flex: 0 0 16px !important;
	width: 16px !important;
	height: 16px !important;
	margin: 0 9px 0 0 !important;
}

/* Centre the control, text, count and expander as one row. A two-line category
 * stays readable, while all one-line Brand/Series rows keep the same rhythm. */
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-kategori .facetwp-checkbox,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-varemerke .facetwp-checkbox,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-serie .facetwp-checkbox {
	align-items: center !important;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-kategori .facetwp-checkbox::before,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-varemerke .facetwp-checkbox::before,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-serie .facetwp-checkbox::before {
	margin-top: 0 !important;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-kategori .facetwp-counter,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-varemerke .facetwp-counter,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-serie .facetwp-counter,
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-kategori .facetwp-expand {
	align-self: center;
	margin-top: 0;
}

/* ============================================================================
 * 6. HIERARCHICAL EXPAND  ([+]/[-] -> clean ± icon box)  + depth indent
 * ==========================================================================*/
body.has-glp-catalog .ast-filter-wrap .facetwp-expand {
	flex-shrink: 0;
	order: 3;            /* sit after the counter */
	width: 18px;
	height: 18px;
	margin-left: 6px;
	border-radius: 4px;
	border: 1px solid var(--glpf-line);
	background: #fff;
	color: var(--glpf-grey-700);
	font-size: 0;        /* hide the literal "[+]" / "[-]" text */
	line-height: 1;
	cursor: pointer;
	position: relative;
	transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-expand::before {
	content: "+";
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--glpf-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-expand.opened::before {
	content: "\2212";   /* − minus sign */
}
body.has-glp-catalog .ast-filter-wrap .facetwp-expand:hover {
	border-color: var(--glpf-orange);
	color: var(--glpf-orange);
	background: var(--glp-orange-subtle, rgba(245,130,32,.08));
}

/* nested children indent + show/hide via FacetWP's .visible */
body.has-glp-catalog .ast-filter-wrap .facetwp-depth {
	margin-left: 7px;
	padding-left: 6px;
	border-left: 1px solid var(--glpf-line);
	display: none;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-depth.visible {
	display: block;
}

/* ============================================================================
 * 7. "SHOW MORE" toggle links  (Se N mer / Se mindre)
 * ==========================================================================*/
body.has-glp-catalog .ast-filter-wrap .facetwp-toggle {
	display: inline-block;
	margin: 8px 0 2px 4px;
	font-family: var(--glpf-body);
	font-size: 12px;
	font-weight: 600;
	color: var(--glpf-orange);
	cursor: pointer;
	text-decoration: none;
	background: none;
	border: 0;
	transition: color .15s ease;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-toggle:hover {
	color: var(--glpf-orange-dark);
	text-decoration: underline;
}
/* FacetWP's own hide class must stay hidden */
body.has-glp-catalog .ast-filter-wrap .facetwp-hidden {
	display: none !important;
}

/* "Show more" overflow wrapper: FacetWP wraps the extra rows in a single
 * <div class="facetwp-overflow facetwp-hidden">…</div> (not per-item .hidden).
 * Reset its box so the nested .facetwp-checkbox rows render flush — same padding,
 * no extra indent — as the top-level rows. Toggle visibility via .facetwp-hidden. */
body.has-glp-catalog .ast-filter-wrap .facetwp-overflow {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-overflow.facetwp-hidden {
	display: none !important;
}
/* rows inside the overflow keep the identical row box as top-level rows */
body.has-glp-catalog .ast-filter-wrap .facetwp-overflow .facetwp-checkbox {
	margin: 1px 0;
}

/* ============================================================================
 * 8. PRICE  (number_range -> Fra/Til inputs + Gå button)  + optional slider
 * ==========================================================================*/
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-pris {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

body.has-glp-catalog .ast-filter-wrap .facetwp-number {
	flex: 1 1 0;
	min-width: 0;
	width: auto;
	box-sizing: border-box;
	border: 1.5px solid var(--glpf-input-border);
	border-radius: 6px;
	padding: 7px 10px;
	font-family: var(--glpf-body);
	font-size: 13px;
	font-weight: 600;
	color: var(--glpf-charcoal);
	background: #fff;
	line-height: 1.2;
	transition: border-color .12s ease, box-shadow .12s ease;
	-moz-appearance: textfield;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-number::-webkit-outer-spin-button,
body.has-glp-catalog .ast-filter-wrap .facetwp-number::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-number::placeholder {
	color: #aaa;
	font-weight: 400;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-number:focus {
	outline: none;
	border-color: var(--glpf-orange);
	box-shadow: 0 0 0 3px var(--glp-orange-subtle, rgba(245,130,32,.08));
}

/* "Gå" submit button */
body.has-glp-catalog .ast-filter-wrap .facetwp-submit {
	flex: 0 0 auto;
	box-sizing: border-box;
	border: 0;
	border-radius: 6px;
	padding: 8px 14px;
	font-family: var(--glpf-body);
	font-size: 13px;
	font-weight: 700;
	color: #fff;
	background: var(--glpf-orange);
	cursor: pointer;
	line-height: 1.2;
	transition: background-color .15s ease;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-submit:hover {
	background: var(--glpf-orange-dark);
}
body.has-glp-catalog .ast-filter-wrap .facetwp-submit:focus-visible {
	outline: 2px solid var(--glpf-orange);
	outline-offset: 2px;
}

/* ---- decorative noUiSlider (only if FacetWP renders one) --------------- */
body.has-glp-catalog .ast-filter-wrap .noUi-target,
body.has-glp-catalog .ast-filter-wrap .noUi-horizontal {
	flex: 1 1 100%;
	height: 4px;
	margin: 8px 8px 2px;
	border: 0;
	border-radius: 2px;
	background: var(--glpf-line);
	box-shadow: none;
}
body.has-glp-catalog .ast-filter-wrap .noUi-connect {
	background: var(--glpf-orange);
	border-radius: 2px;
}
body.has-glp-catalog .ast-filter-wrap .noUi-handle {
	width: 16px;
	height: 16px;
	top: 50%;
	right: -8px;
	transform: translateY(-50%);
	border-radius: 50%;
	border: 2.5px solid var(--glpf-orange);
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
	cursor: grab;
}
body.has-glp-catalog .ast-filter-wrap .noUi-handle::before,
body.has-glp-catalog .ast-filter-wrap .noUi-handle::after {
	display: none;
}
body.has-glp-catalog .ast-filter-wrap .noUi-horizontal .noUi-handle {
	right: -8px;
}

/* ---- custom dual-handle price slider (glp-price-slider, built by catalog.js) --
 * The design (D3v3) shows Fra/Til inputs + a dual-handle slider and NO "Gå"
 * button. We hide FacetWP's submit and build a lightweight slider that writes the
 * min/max inputs and applies on release. */
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-pris .facetwp-submit { display: none !important; }
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-pris { row-gap: 2px; }
body.has-glp-catalog .glp-price-slider {
	flex: 1 1 100%;
	position: relative;
	z-index: 2;                 /* sit above sibling facet widgets for hit-testing */
	box-sizing: content-box;
	height: 4px;
	padding: 9px 0;             /* transparent, enlarges the clickable area to ~22px */
	margin: 7px 9px 0;
	background: #eee;
	background-clip: content-box;
	border-radius: 2px;
	touch-action: none;
}
body.has-glp-catalog .glp-price-slider__range {
	position: absolute;
	top: 50%;
	height: 4px;
	transform: translateY(-50%);
	background: var(--glpf-orange);
	border-radius: 2px;
	pointer-events: none;
}
body.has-glp-catalog .glp-price-slider__handle {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 16px;
	height: 16px;
	background: #fff;
	border: 2.5px solid var(--glpf-orange);
	border-radius: 50%;
	transform: translate(-50%, -50%);
	box-shadow: 0 1px 4px rgba(0,0,0,.12);
	cursor: grab;
	touch-action: none;
}
body.has-glp-catalog .glp-price-slider__handle:active { cursor: grabbing; }
body.has-glp-catalog .glp-price-slider__handle:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px var(--glp-orange-subtle, rgba(245,130,32,.18));
}

/* ---- "visste du?" sidebar note card (built by catalog.js, below the filter card) ---- */
body.has-glp-catalog .glp-cat-visste {
	margin-top: 14px;
	background: var(--glpf-charcoal, #1a1a1a);
	border-radius: 12px;
	padding: 16px 16px 18px;
	position: relative;
	overflow: hidden;
}
body.has-glp-catalog .glp-cat-visste::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 80% 70% at 80% 20%, rgba(245,130,32,.2) 0%, transparent 60%);
	pointer-events: none;
}
body.has-glp-catalog .glp-cat-visste__inner { position: relative; }
body.has-glp-catalog .glp-cat-visste__title {
	font-family: 'Caveat', cursive;
	font-size: 20px;
	color: #ff9d4d;
	line-height: 1;
}
body.has-glp-catalog .glp-cat-visste__text {
	font-size: 13px;
	color: rgba(255,255,255,.85);
	line-height: 1.5;
	margin-top: 6px;
}
body.has-glp-catalog .glp-cat-visste__text strong { color: #fff; font-weight: 600; }

/* ============================================================================
 * 9. LAGERSTATUS = TOGGLE SWITCHES
 *    Only the tilgjengelighet facet's .facetwp-checkbox rows become switches.
 *    Label left, 40x22 track right (drawn with ::before), 16px knob (::after).
 *    ON = .checked  ->  orange track + knob slid right.
 *    Native FacetWP click is preserved (we only restyle).
 * ==========================================================================*/
body.has-glp-catalog .facetwp-facet-tilgjengelighet {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 4px !important;   /* beats old .facetwp-checkbox padding-left:0 !important */
	min-height: 0 !important;
	margin: 0;
	border-radius: 6px;
	cursor: pointer;
	font-family: var(--glpf-body);
	font-size: 13.5px;
	font-weight: 400;
	color: var(--glpf-grey-700);
	background: none !important;
}
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox:hover {
	background: none !important;
}

/* kill the checkbox box for switch rows */
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox::before {
	display: none;
}

/* label */
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-display-value {
	flex: 0 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	order: 1;
}

/* The design Lagerstatus toggle rows show NO count — hide the (N) counter so the
 * switch isn't crowded by "Lyngdal (1751)" etc. */
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-counter {
	display: none !important;
}

/* the SWITCH — track + knob built as a single trailing pseudo box.
 * We use ::after on the row for the track and the knob as an inset element.
 * Since there's no extra DOM node, we render track via ::after and knob via a
 * boxed gradient inside it. To get a real knob, we layer a radial-positioned
 * box-shadow / background. Cleanest: track = ::after, knob = ::after's inset
 * background circle drawn with a second background layer. */
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox::after {
	content: "";
	order: 3;
	flex-shrink: 0;
	width: 40px;
	height: 22px;
	border-radius: 11px;
	background-color: var(--glpf-input-border);   /* OFF track */
	/* knob = white circle positioned left when OFF */
	background-image: radial-gradient(circle at 11px 11px, #fff 7px, transparent 7.5px);
	background-repeat: no-repeat;
	box-shadow: inset 0 0 0 0 transparent;
	transition: background-color .18s ease, background-position .18s ease;
	box-sizing: border-box;
	position: relative;
}

/* knob shadow — we add a subtle drop via filter on the row's ::after isn't
 * possible per-layer, so a faint inset keeps depth; visual knob is the radial. */

/* ON state (.checked) -> orange track + knob slides right (to 29px center) */
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox.checked {
	color: var(--glpf-charcoal);
	font-weight: 500;
}
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox.checked::after {
	background-color: var(--glpf-orange);
	background-image: radial-gradient(circle at 29px 11px, #fff 7px, transparent 7.5px);
}

/* focus ring on the switch row */
body.has-glp-catalog .facetwp-facet-tilgjengelighet .facetwp-checkbox:focus-visible {
	outline: 2px solid var(--glpf-orange);
	outline-offset: 2px;
}

/* ============================================================================
 * 10. OFF-CANVAS / MOBILE
 *     The off-canvas hosts the same .ast-filter-wrap markup on <=921px.
 *     Keep all the above working there too (selectors already class-based,
 *     not #secondary-bound). Self-contained: re-declare the off-canvas card
 *     flattening + duplicate-header hide here so this block does not depend on
 *     the old catalog.css off-canvas rules (which it sets aside).
 * ==========================================================================*/
@media (max-width: 921px) {
	body.has-glp-catalog .ast-filter-wrap {
		width: 100%;
	}
}

/* inside the off-canvas the card chrome is flat (full-bleed sheet) */
body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap {
	border: 0;
	border-radius: 0;
	background: #fff;
}
body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .ast-woo-sidebar-widget,
body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .widget {
	border-top: 0;
	border-bottom: 1px solid var(--glpf-line);
	border-radius: 0;
}
/* the "Filter / Nullstill" header is hidden in the off-canvas (it has its own chrome) */
body.has-glp-catalog .astra-off-canvas-sidebar .glp-cat-sidebar-head {
	display: none;
}

/* ============================================================================
 * 11. LEGACY custom-min.css NEUTRALISERS
 * ----------------------------------------------------------------------------
 * astra-child/moocommerce/assets/css/custom-min.css is echoed raw into <head>
 * on every page (functions.php enqueue_custom_css_in_head) and loads AFTER this
 * file with old WOOF/FacetWP rules that fight the design. We can't reorder it
 * (it uses !important + high-specificity .archive…#secondary selectors), so we
 * re-assert the design here, scoped to body.has-glp-catalog, with specificity
 * that beats the legacy (two IDs #content #secondary > the legacy single ID).
 * This keeps the legacy file intact for the rest of the site while making this
 * stylesheet authoritative for the flagged catalog filter.
 * ==========================================================================*/

/* legacy: `.archive .site-content .ast-container .widget-area.secondary#secondary
 *          { width:19% !important }` — re-pin the design's fixed 250px sidebar.
 * Two IDs (#content + #secondary) outrank the legacy single-ID selector. */
body.has-glp-catalog #content #secondary.widget-area.secondary,
body.has-glp-catalog #content #secondary.widget-area.secondary.secondary {
	flex: 0 0 290px !important;
	width: 290px !important;
	min-width: 290px !important;
	max-width: 290px !important;
	border: 0 !important;
	padding: 0 !important;
}

/* legacy: `.ast-accordion-layout.ast-filter-wrap .ast-woo-sidebar-widget p
 *          { width:254px; background:#f4f4f4; border-radius:10px; padding:16px; … }`
 * — a leftover grey card on any stray <p> inside a facet widget. Neutralise it. */
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget p {
	width: auto !important;
	background: none !important;
	border-radius: 0 !important;
	padding: 0 !important;
	gap: 0 !important;
	display: block !important;
}

/* legacy: `.facetwp-type-checkboxes .facetwp-checkbox .facetwp-expand
 *          { margin-right:-20px }` — would pull the +/- expander off-row. */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox .facetwp-expand {
	margin-right: 0 !important;
}

/* legacy: `.facetwp-counter { display:none }` — design SHOWS counts (already
 * re-enabled above, re-assert here for belt-and-braces on Kat/Vare/Serie). */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox .facetwp-counter { display: inline-block !important; }
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-tilgjengelighet .facetwp-counter { display: none !important; }

/* Filter counts are metadata, never a second line. Empty attribute groups are
 * removed by catalog.js after each FacetWP refresh. */
body.has-glp-catalog .ast-filter-wrap .facetwp-checkbox .facetwp-counter { white-space: nowrap !important; line-height: 1.3; }
body.has-glp-catalog .ast-filter-wrap .glp-filter-empty { display: none !important; }

/* The Gutenberg group block that wraps each facet widget adds 16px horizontal
 * padding, AND the .facetwp-facet inside ALSO has 16px — a DOUBLE inset (64px)
 * that crushed the category-label column to ~84px (names cut to a few letters).
 * Kill the outer group's horizontal padding so there is ONE 16px inset (from the
 * header/facet), reclaiming ~32px for the labels. Vertical padding kept. */
body.has-glp-catalog .ast-filter-wrap .ast-woo-sidebar-widget > .wp-block-group {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* User request: remove the "FILTER / Nullstill" header row above the filter card,
 * the active-filter pill row, and the "Viser 25-36 av N resultater" count (its
 * range changes as you infinite-scroll, which reads as wrong). */
body.has-glp-catalog .glp-cat-sidebar-head { display: none !important; }
body.has-glp-catalog .glp-cat-activefilters,
body.has-glp-catalog .facetwp-selections { display: none !important; }
body.has-glp-catalog .woocommerce-result-count { display: none !important; }

/* v1.3.13: price should read as one compact control instead of two loose boxes
 * and a bare orange line. Labels establish the range, a recessed neutral track
 * provides context, and larger handles make precise touch dragging predictable. */
body.has-glp-catalog .ast-filter-wrap .facetwp-facet-pris { row-gap: 5px; }
body.has-glp-catalog .ast-filter-wrap .glp-price-labels {
	flex: 1 1 100%;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	margin: 1px 0 -3px;
	color: var(--glpf-grey-500);
	font-family: var(--glpf-body);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}
body.has-glp-catalog .ast-filter-wrap .facetwp-number {
	height: 38px;
	border-color: #d8d4cf;
	border-radius: 7px;
	padding: 8px 10px;
}
body.has-glp-catalog .glp-price-slider {
	box-sizing: border-box;
	height: 32px;
	margin: 2px 10px 1px;
	padding: 0;
	background: transparent;
	border-radius: 999px;
}
body.has-glp-catalog .glp-price-slider::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 6px;
	transform: translateY(-50%);
	border-radius: 999px;
	background: #e8e4df;
	box-shadow: inset 0 1px 1px rgba(0,0,0,.07);
}
body.has-glp-catalog .glp-price-slider__range {
	height: 6px;
	border-radius: 999px;
	box-shadow: 0 1px 1px rgba(210,94,4,.18);
}
body.has-glp-catalog .glp-price-slider__handle {
	width: 20px;
	height: 20px;
	border: 3px solid var(--glpf-orange);
	box-shadow: 0 2px 5px rgba(0,0,0,.16);
}

/* Desktop's font has its visible glyphs slightly below the mathematical line
 * box. Nudge only the square control down to meet the text's optical centre. */
@media (min-width:922px) {
	body.has-glp-catalog .ast-filter-wrap .facetwp-facet-kategori .facetwp-checkbox::before,
	body.has-glp-catalog .ast-filter-wrap .facetwp-facet-varemerke .facetwp-checkbox::before,
	body.has-glp-catalog .ast-filter-wrap .facetwp-facet-serie .facetwp-checkbox::before {
		align-self: center;
		transform: translateY(2px) !important;
	}
}

/* v1.3.16: mobile filter sheet. The Astra default is a narrow 325px drawer,
 * which leaves too little space for the label, count and category arrow. Use
 * the full handset width and keep every option on one visually stable row. */
@media (max-width:921px) {
	body.has-glp-catalog .astra-off-canvas-sidebar-wrapper {
		width:100vw !important;
		max-width:none !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar {
		width:min(360px, calc(100vw - 24px)) !important;
		max-width:360px !important;
		box-sizing:border-box;
		padding:34px 0 0 !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap {
		width:100% !important;
		margin:0 !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .widget > .wp-block-group {
		width:100% !important;
		max-width:none !important;
		margin:0 !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-facet {
		width:100% !important;
		max-width:none !important;
		margin-left:0 !important;
		margin-right:0 !important;
		padding:0 36px 16px !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .glp-filter-head,
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap h2.wp-block-heading {
		width:100% !important;
		max-width:none !important;
		margin-left:0 !important;
		margin-right:0 !important;
		padding-left:36px !important;
		padding-right:36px !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-facet-pris::before {
		content:none !important;
		display:none !important;
	}
	/* Gutenberg constrains the ordinary facet blocks by 16px on each side.
	 * Compensate inside those blocks so their visible content lands on the
	 * exact same 36px/324px grid as direct facets such as price and stock. */
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .wp-block-group .facetwp-facet {
		padding-left:20px !important;
		padding-right:20px !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .wp-block-group .glp-filter-head,
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .wp-block-group h2.wp-block-heading {
		padding-left:20px !important;
		padding-right:20px !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-checkbox {
		min-height:38px !important;
		padding-top:7px !important;
		padding-bottom:7px !important;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-checkbox .facetwp-display-value {
		display:block;
		-webkit-line-clamp:unset;
		overflow:hidden;
		text-overflow:ellipsis;
		white-space:nowrap;
	}
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-facet-kategori .facetwp-checkbox::before,
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-facet-varemerke .facetwp-checkbox::before,
	body.has-glp-catalog .astra-off-canvas-sidebar .ast-filter-wrap .facetwp-facet-serie .facetwp-checkbox::before {
		align-self:center !important;
		transform:none !important;
	}
}
