/*
Theme Name: Filbert v2
Theme URI: https://filbert.fo
Author: Nema / Claude
Author URI: https://filbert.fo
Description: Filbert.fo storefront, v2. The warm-minimal hazelnut theme with the design-critique fixes (AA contrast, 44px touch targets, Faroese cart strings, mobile search, buy-box order) and print-specific details: layer-line texture, spool swatches, a layer-by-layer hero heading.
Version: 2.0.0
Requires at least: 6.6
Tested up to: 7.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: filbert
Tags: e-commerce, block-theme, full-site-editing, custom-colors, custom-menu
*/

/* ===========================================================================
 * Filbert — warm-minimalist storefront
 * Design tokens live in theme.json; this file styles the custom components
 * (top bar, sticky header, hero, tiles, product cards, cart/checkout/account)
 * that core blocks alone can't express. Colors reference theme.json presets.
 * ======================================================================== */

:root {
	--fb-base: var(--wp--preset--color--base, #f7f1e9);
	--fb-surface: var(--wp--preset--color--surface, #fffdfa);
	--fb-surface-alt: var(--wp--preset--color--surface-alt, #efe7db);
	--fb-ink: var(--wp--preset--color--contrast, #2a241d);
	--fb-body: var(--wp--preset--color--contrast-2, #5c5349);
	--fb-muted: var(--wp--preset--color--muted, #6f655a);
	--fb-line: var(--wp--preset--color--line, #e7dccc);
	--fb-primary: var(--wp--preset--color--primary, #9a6a43);
	--fb-primary-deep: var(--wp--preset--color--primary-deep, #84572f);
	--fb-primary-tint: var(--wp--preset--color--primary-tint, #f1e3d3);
	--fb-soft: var(--wp--preset--color--soft, #f2ebe1);
	--fb-success: var(--wp--preset--color--success, #5ec27a);
	--fb-success-ink: var(--wp--preset--color--success-ink, #346b43);
	--fb-success-bg: var(--wp--preset--color--success-bg, #e7f3ec);
	--fb-rad: 16px;
	--fb-rad-inner: 12px;
	--fb-rad-input: 10px;
	/* v2: every button and button-like control (filters, chips, steppers,
	 * search fields) uses this rounded-square corner instead of a pill. */
	--fb-rad-btn: 12px;
	--fb-mono: var(--wp--preset--font-family--mono, 'Space Mono', monospace);
	/* v2 */
	--fb-ink-2: #4a4136;                 /* nav / control text */
	--fb-border-strong: #9c8d7d;         /* input borders: 3:1 on surface */
	--fb-tap: 44px;                      /* minimum touch target */
	--fb-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	/* FDM layer lines: a 0.4 mm-ish striation, one hairline every 4px. Used on
	 * the hero card, page heroes and empty states — the shop's print signature. */
	--fb-layers: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(132, 87, 47, 0.055) 3px 4px);
}

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Mono eyebrow helper (Space Mono small uppercase label) */
.fb-eyebrow {
	font-family: var(--fb-mono);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fb-primary-deep);
}

/* ---------------------------------------------------------------------------
 * Top announcement bar
 * ------------------------------------------------------------------------- */
.filbert-topbar {
	background: var(--fb-surface-alt);
	border-bottom: 1px solid #e4d9c9;
	font-weight: 600;
	font-size: 13px;
	color: var(--fb-body);
}
.filbert-topbar a { color: inherit; }
.filbert-topbar .filbert-topbar-accent { color: var(--fb-primary-deep); }

/* ---------------------------------------------------------------------------
 * Sticky, translucent, blurred header
 * ------------------------------------------------------------------------- */
.filbert-header {
	position: sticky;
	top: 0;
	z-index: 30;
	background: rgba(247, 241, 233, 0.92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid #ebe1d4;
}
/* Logo lockup (inline HTML) */
.filbert-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.filbert-logo .filbert-mark {
	position: relative; width: 28px; height: 28px; display: inline-block; flex: none;
}
.filbert-logo .filbert-mark::before {
	content: ""; position: absolute; inset: 0;
	border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
	background: radial-gradient(125% 115% at 34% 24%, #d09c6a 0%, var(--fb-primary) 54%, #66421f 100%);
}
.filbert-logo .filbert-mark::after {
	content: ""; position: absolute; top: 7px; left: 7px; width: 9px; height: 6px;
	border-radius: 50%; background: rgba(255, 255, 255, 0.55); transform: rotate(-18deg);
}
.filbert-logo .filbert-word {
	font-family: var(--wp--preset--font-family--sans);
	font-weight: 800; font-size: 21px; letter-spacing: -0.02em; color: var(--fb-ink);
}
.filbert-logo .filbert-word .fo { color: var(--fb-primary); }

/* Primary nav */
.filbert-nav .wp-block-navigation__container { gap: 30px; }
.filbert-nav a,
.filbert-nav .wp-block-navigation-item__content {
	font-weight: 600; font-size: 15px; color: #4a4136; text-decoration: none;
}
.filbert-nav a:hover,
.filbert-nav .current-menu-item a,
.filbert-nav .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content {
	color: var(--fb-primary-deep);
}

/* The "Innrita" account link lives in the nav block so it can drop into the
 * mobile hamburger overlay. While the nav is inline (≥600px — the WP navigation
 * block's overlay breakpoint), the standalone .filbert-account-link in
 * .filbert-actions handles it, so hide this nav copy there. */
@media (min-width: 600px) {
	.filbert-nav .wp-block-navigation-item.filbert-nav-account { display: none; }
}
/* Below 600px the nav collapses to the hamburger, so the standalone link is
 * hidden and "Innrita" appears inside the overlay instead. */
@media (max-width: 599.98px) {
	.filbert-account-link { display: none; }
}

/* Header actions: Leita / Innrita / cart pill */
.filbert-actions { font-weight: 600; font-size: 14px; color: #4a4136; }
.filbert-actions a { color: #4a4136; text-decoration: none; }
.filbert-actions a:hover { color: var(--fb-primary-deep); }
/* "Innrita": pad the text link out to a comfortable target without moving it. */
@media (min-width: 600px) {
	.filbert-account-link { display: inline-flex; align-items: center; min-height: var(--fb-tap); padding: 0 6px; }
}

/* Header search — permanent inline pill input */
.filbert-search-inline {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--fb-surface); border: 1px solid var(--fb-line);
	border-radius: var(--fb-rad-btn); padding: 7px 16px 7px 13px;
	transition: border-color 0.15s ease;
}
.filbert-search-inline:focus-within { border-color: var(--fb-primary); }
.filbert-search-go {
	display: inline-flex; align-items: center; justify-content: center;
	border: 0; background: transparent; color: var(--fb-muted); cursor: pointer; flex: none;
	/* 32px hit area; negative margin keeps the pill's visual size unchanged. */
	width: 32px; height: 32px; padding: 0; margin: -8px -4px -8px -8px; border-radius: 50%;
}
.filbert-search-inline:focus-within .filbert-search-go,
.filbert-search-go:hover { color: var(--fb-primary-deep); }
.filbert-search-inline input[type="search"] {
	border: 0; background: transparent; outline: none;
	font: inherit; font-weight: 500; font-size: 14px; color: var(--fb-ink);
	width: 150px; padding: 1px 0;
}
.filbert-search-inline input[type="search"]::placeholder { color: var(--fb-muted); opacity: 1; }
.filbert-search-inline input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
@media (max-width: 1200px) { .filbert-search-inline input[type="search"] { width: 110px; } }
.filbert-actions .wp-block-loginout a {
	color: #4a4136; font-weight: 600;
}
/* Mini-cart trigger styled as a hazelnut pill */
.filbert-actions .wc-block-mini-cart__button {
	background: var(--fb-primary);
	color: #fff;
	border-radius: var(--fb-rad-btn);
	padding: 0 18px;
	min-height: var(--fb-tap);
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
}
.filbert-actions .wc-block-mini-cart__button:hover { filter: brightness(0.94); color: #fff; }
.filbert-actions .wc-block-mini-cart__amount { color: #fff; }
.filbert-actions .wc-block-mini-cart__quantity-badge { display: none; }

/* ---------------------------------------------------------------------------
 * Button variants (apply className on the button block)
 * ------------------------------------------------------------------------- */
.filbert-btn-soft .wp-block-button__link {
	background: var(--fb-soft) !important;
	color: var(--fb-ink) !important;
}
.filbert-btn-soft .wp-block-button__link:hover { filter: brightness(0.96); }
.filbert-btn-dark .wp-block-button__link {
	background: var(--fb-ink) !important;
	color: #fff !important;
}
.filbert-btn-dark .wp-block-button__link:hover { filter: brightness(1.15); }
.wp-block-button__link:hover { filter: brightness(0.94); }

/* ---------------------------------------------------------------------------
 * Hero — split: cream card (left) + dark brand panel (right)
 * ------------------------------------------------------------------------- */
.filbert-hero { padding-top: 36px; padding-bottom: 44px; }
.filbert-hero .wp-block-columns { gap: 30px; }
.filbert-hero-card {
	background: var(--fb-layers), var(--fb-surface);
	border-radius: var(--fb-rad);
	padding: 52px 48px 40px;
	height: 100%;
	display: flex; flex-direction: column;
}
/* The card is a flex column so the facts row can sit at its foot; keep every
 * child flush left (the constrained layout would otherwise centre the buttons). */
.filbert-hero-card > * { margin-left: 0 !important; margin-right: 0 !important; max-width: none; }
.filbert-hero-card h1 {
	font-size: 52px; line-height: 1.04; letter-spacing: -0.03em; margin: 0 0 20px;
	text-wrap: balance;
}
.filbert-hero-panel {
	background: var(--fb-ink);
	border-radius: var(--fb-rad);
	padding: 34px;
	color: #f3ece1;
	height: 100%;
}
.filbert-hero-panel .fb-panel-head { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.filbert-hero-panel .fb-panel-label {
	font-weight: 700; font-size: 13px; letter-spacing: 0.05em; color: #d8b894;
	text-transform: uppercase;
}
/* Best-seller rotator (replaces the static panel image) */
.filbert-hero-panel .fb-rotator { margin-top: 22px; }
.filbert-hero-panel .fb-rotator-stage {
	position: relative; aspect-ratio: 16 / 10; border-radius: calc(var(--fb-rad) - 4px);
	background: #f6efe4; overflow: hidden;
}
.filbert-hero-panel .fb-rotator-slide {
	position: absolute; inset: 0; margin: 0; padding: 20px;
	display: flex; align-items: center; justify-content: center; text-decoration: none;
	opacity: 0; transition: opacity .6s ease; pointer-events: none;
}
.filbert-hero-panel .fb-rotator-slide.is-active { opacity: 1; pointer-events: auto; }
.filbert-hero-panel .fb-rotator-slide img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.filbert-hero-panel .fb-rotator-foot {
	display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
	width: 100%; margin-top: 16px;
}
.filbert-hero-panel .fb-rotator-name { font-weight: 700; font-size: 21px; }
.filbert-hero-panel .fb-rotator-price,
.filbert-hero-panel .fb-rotator-price .woocommerce-Price-amount {
	font-weight: 800; font-size: 18px; color: #d8b894; white-space: nowrap;
}

/* ---------------------------------------------------------------------------
 * Section headers (eyebrow + heading + "see all" link)
 * ------------------------------------------------------------------------- */
.filbert-section-head { margin-bottom: 22px; }
.filbert-section-head h2 { font-size: 32px; letter-spacing: -0.02em; margin: 0; }
/* Status dot that sits inline in a section heading ("Á goymslu nú"): the dot
 * carries the meaning (live stock), so no label is stacked above the heading. */
.fb-live-dot {
	display: inline-block; width: 11px; height: 11px; border-radius: 50%;
	background: var(--fb-success); margin-right: 12px; vertical-align: 0.12em;
	box-shadow: 0 0 0 4px var(--fb-success-bg);
}
.filbert-seeall a {
	font-weight: 700; font-size: 14px; color: var(--fb-primary-deep);
	display: inline-flex; align-items: center; min-height: var(--fb-tap);
	text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
	text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.filbert-seeall a:hover { text-decoration-color: currentColor; }

/* ---------------------------------------------------------------------------
 * Spectrum brand spotlight (front page). Two groups rendered by the
 * [filbert_spectrum_showcase] shortcode — PLA Premium "powertool" colours and
 * Magic Silk. Each is a standard 4-column product grid whose first cell is a
 * plain description card introducing the range.
 * ------------------------------------------------------------------------- */
.fb-spectrum { display: flex; flex-direction: column; gap: 30px; }
.fb-spectrum ul.products { margin: 0; }

/* Description card — same frame as a product card, warm tint, centred copy. */
.fb-desc-card.product {
	justify-content: center;
	gap: 8px;
	background: var(--fb-surface-alt) !important;
}
.fb-desc-card .fb-desc-title {
	margin: 0; font-size: 21px; font-weight: 800; line-height: 1.2;
	letter-spacing: -0.01em; color: var(--fb-ink);
}
.fb-desc-card .fb-desc-text { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fb-body); }

/* The classic products grid has no responsive breakpoints of its own; add them
 * for this section (higher specificity than the base .woocommerce rule). */
@media (max-width: 900px) {
	.fb-spectrum.woocommerce ul.products.columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
	.fb-spectrum.woocommerce ul.products.columns-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------------------
 * Page hero (category / contact / goymsla intro)
 * ------------------------------------------------------------------------- */
.filbert-page-hero { padding-top: 44px; padding-bottom: 8px; }
.filbert-page-hero .wp-block-query-title,
.filbert-page-hero h1 { text-wrap: balance; }
.filbert-page-hero h1 { font-size: 44px; letter-spacing: -0.03em; margin: 0 0 12px; }
.filbert-page-hero .filbert-lede {
	font-size: 18px; line-height: 1.6; color: var(--fb-body); max-width: 560px; margin: 0;
}
.filbert-badge-pill {
	display: inline-flex; align-items: center; gap: 9px;
	background: var(--fb-success-bg); color: var(--fb-success-ink);
	font-family: var(--fb-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.07em;
	text-transform: uppercase; padding: 8px 16px; border-radius: 999px; margin-top: 20px;
}
.filbert-badge-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fb-success); }

/* Brand/type hero tiles ship with the filbert/category-tiles block. */

/* ---------------------------------------------------------------------------
 * Product grids — cards with surface bg, radius, hover lift, aligned price/btn
 * Applies to both the [products] shortcode and the Product Collection block.
 * ------------------------------------------------------------------------- */
.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid; gap: 20px; margin: 0; padding: 0;
}
.woocommerce ul.products::before, .woocommerce ul.products::after,
.woocommerce-page ul.products::before, .woocommerce-page ul.products::after { display: none; }
.woocommerce ul.products.columns-6 { grid-template-columns: repeat(6, 1fr); }
.woocommerce ul.products.columns-5 { grid-template-columns: repeat(5, 1fr); }
.woocommerce ul.products.columns-4 { grid-template-columns: repeat(4, 1fr); }
.woocommerce ul.products.columns-3 { grid-template-columns: repeat(3, 1fr); }
.woocommerce ul.products.columns-2 { grid-template-columns: repeat(2, 1fr); }

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: auto !important; margin: 0 !important; float: none !important;
	display: flex; flex-direction: column;
	background: var(--fb-surface); border: 1px solid var(--fb-line);
	border-radius: var(--fb-rad); padding: 16px;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.woocommerce ul.products li.product:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--custom--shadow--card-hover, 0 10px 30px rgba(0,0,0,.06));
}
.woocommerce ul.products li.product > a { display: flex; flex: 1 1 auto; flex-direction: column; height: 100%; }
.woocommerce ul.products li.product img { border-radius: 10px; margin-bottom: 12px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 15px; font-weight: 700; line-height: 1.35; padding: 0;
}
.woocommerce ul.products li.product .price {
	margin-top: auto; padding-top: 8px; color: var(--fb-primary-deep);
	font-weight: 800; font-size: 18px;
}
.woocommerce ul.products li.product .price del { color: var(--fb-muted); font-weight: 500; }
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
	margin-top: 14px; align-self: stretch; text-align: center;
}

/* Product Collection block: force an exact CSS grid by the columns-N class so
 * the requested column count is always honoured (WooCommerce's flex layout can
 * wrap N cards to N-1 when its per-card basis overflows the row). */
.wp-block-woocommerce-product-collection ul.wc-block-product-template.is-flex-container {
	display: grid !important;
	gap: 20px;
	margin: 0;
}
.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-2 { grid-template-columns: repeat(2, 1fr); }
.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-3 { grid-template-columns: repeat(3, 1fr); }
.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-4 { grid-template-columns: repeat(4, 1fr); }
.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-5 { grid-template-columns: repeat(5, 1fr); }
.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-6 { grid-template-columns: repeat(6, 1fr); }
.wp-block-woocommerce-product-collection ul.wc-block-product-template > li.wc-block-product {
	width: auto !important; max-width: none !important; min-width: 0; margin: 0 !important;
}
/* NOTE: these selectors must carry the same specificity as the base rules
 * above (.wc-block-product-template.columns-N) or they never win — the base
 * grid would otherwise stay locked at N columns on every screen size. */
@media (max-width: 1100px) {
	.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-6,
	.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
	.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-6,
	.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-5,
	.wp-block-woocommerce-product-collection ul.wc-block-product-template.columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
	.wp-block-woocommerce-product-collection ul.wc-block-product-template[class*="columns-"] { grid-template-columns: repeat(2, 1fr); }
}

/* Product Collection block cards */
li.wc-block-product {
	display: flex; flex-direction: column;
	background: var(--fb-surface); border: 1px solid var(--fb-line);
	border-radius: var(--fb-rad); padding: 16px;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
li.wc-block-product:hover {
	transform: translateY(-3px);
	box-shadow: var(--wp--custom--shadow--card-hover, 0 10px 30px rgba(0,0,0,.06));
}
li.wc-block-product .wp-block-woocommerce-product-image { margin-top: 0; }
/* Normalise card images to a square tile regardless of the source aspect ratio.
 * WooCommerce thumbnails are uncropped (woocommerce_thumbnail_cropping=uncropped),
 * so portrait/landscape masters keep their shape; object-fit:contain fits the
 * whole product inside a fixed square box (letterboxed onto the card surface),
 * keeping every card the same height. !important beats the block's inline
 * object-fit:cover. */
li.wc-block-product .wp-block-woocommerce-product-image img {
	border-radius: 10px;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain !important;
}
li.wc-block-product .wp-block-post-title { margin-bottom: 0; font-size: 15px; font-weight: 700; }
li.wc-block-product .wp-block-woocommerce-product-price {
	margin-top: auto; padding-top: 8px; color: var(--fb-primary-deep); font-weight: 800; font-size: 18px;
}
li.wc-block-product .wp-block-woocommerce-product-button { margin-bottom: 0; margin-top: 12px; }
.wp-block-woocommerce-product-collection li.wc-block-product .wc-block-components-product-stock-indicator {
	text-align: left; margin-top: 6px;
}
li.wc-block-product .wp-block-woocommerce-product-button .wp-element-button { width: 100%; text-align: center; }

/* In-stock indicator inside cards (Product Collection stock indicator block) */
.wc-block-components-product-stock-indicator--in-stock {
	color: var(--fb-success-ink); font-weight: 600; font-size: 12px;
}
.wc-block-components-product-stock-indicator--out-of-stock,
.wc-block-components-product-stock-indicator--low-stock { color: var(--fb-muted); font-weight: 600; font-size: 12px; }
.wc-block-components-product-stock-indicator--available-on-backorder { color: #7a561f; font-weight: 600; font-size: 12px; }

/* ---------------------------------------------------------------------------
 * Single-product availability strip (V2). One status header (coloured dot +
 * text) plus an OPTIONAL row of stat cells (Á VEG / HJÁ VEITARA). Replaces the
 * old scattered stock pill / supplier line / "á veg" line. See the
 * [filbert_availability] shortcode (filbert-core/includes/product-frontend.php).
 * ------------------------------------------------------------------------- */
.single-product .avail { border: 1px solid #ece1d2; border-radius: var(--fb-rad); overflow: hidden; margin-bottom: 14px; }
.single-product .avail__status { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #f0e7d9; }
.single-product .avail__status .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.single-product .avail__status b { font-weight: 700; font-size: 14.5px; }
.single-product .avail--bare .avail__status { border-bottom: none; }
.single-product .avail--ok .avail__status { background: var(--fb-success-bg); }
.single-product .avail--ok .avail__status .dot { background: var(--fb-success); }
.single-product .avail--ok .avail__status b { color: var(--fb-success-ink); }
.single-product .avail--warn .avail__status { background: #fbf3e6; }
.single-product .avail--warn .avail__status .dot { background: #e0a33a; }
.single-product .avail--warn .avail__status b { color: #7a561f; }
.single-product .avail--out .avail__status { background: #f1ece4; }
.single-product .avail--out .avail__status .dot { background: #cabdab; }
.single-product .avail--out .avail__status b { color: var(--fb-muted); }
.single-product .avail__stats { display: grid; gap: 1px; background: #f0e7d9; }
.single-product .avail__stats .cell { padding: 13px 18px; background: var(--fb-surface); }
.single-product .avail__stats .k { font-family: var(--fb-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.04em; color: var(--fb-muted); margin-bottom: 5px; }
.single-product .avail__stats .v { font-weight: 700; font-size: 14px; color: var(--fb-ink); }

/* ---------------------------------------------------------------------------
 * Single product
 * ------------------------------------------------------------------------- */
/* Gallery: give every product a consistent image height regardless of the
 * source aspect ratio. Pin the main image area (the flexslider viewport / slide)
 * to a fixed height and contain the image inside it. flexslider sets these
 * heights inline without !important, so our !important wins. The outer
 * .woocommerce-product-gallery is left alone so multi-image thumbnail rows still
 * flow beneath. */
.single-product .woocommerce-product-gallery .flex-viewport,
.single-product .woocommerce-product-gallery__wrapper,
.single-product .woocommerce-product-gallery__image {
	height: clamp(360px, 40vw, 560px) !important;
}
/* The gallery wraps the image in a zoom <a>; it needs the height too so the
 * image's height:100% resolves against the fixed box rather than the link. */
.single-product .woocommerce-product-gallery__image > a {
	display: block;
	height: 100% !important;
}
.single-product .woocommerce-product-gallery__image img {
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	border-radius: var(--fb-rad);
}
.single-product .wp-block-post-title { font-size: 40px; letter-spacing: -0.02em; }
.single-product .wp-block-post-title { text-wrap: balance; }

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--fb-primary-deep); font-weight: 800;
}
/* Single product main price — large. The price block renders as a div
 * (.wc-block-components-product-price), not the classic span.price, so it must
 * be targeted directly. Scoped to the price row so the related-products
 * ("Eisini áhugavert") cards keep their compact card price (see line ~355). */
.filbert-price-row .wp-block-woocommerce-product-price,
.filbert-price-row .wp-block-woocommerce-product-price .wc-block-components-product-price__value,
.filbert-price-row .wp-block-woocommerce-product-price .woocommerce-Price-amount {
	font-size: 58px; line-height: 1; font-weight: 800; color: var(--fb-primary-deep);
}
/* Price row: big incl-VAT price + small ex-VAT price share a baseline */
.filbert-price-row { align-items: baseline; }
/* Secondary "uttan MVG" (ex-VAT) price, beside the main price */
.filbert-price-exvat {
	margin: 0; color: var(--fb-muted); font-size: 16px; font-weight: 600;
}
.filbert-price-exvat .woocommerce-Price-amount { font-weight: 700; }
.filbert-price-exvat span { font-weight: 500; }
/* The add-to-cart form repeats the stock line ("2 in stock (can be backordered)")
 * — redundant with the badge next to the price, so hide it on the product page. */
.single-product .woocommerce-variation-availability,
.single-product form.cart p.stock,
.single-product p.stock { display: none; }

/* In-stock badge next to the price */
.filbert-stock-badge {
	display: inline-flex; align-items: center; gap: 8px;
	background: var(--fb-success-bg); color: var(--fb-success-ink);
	font-weight: 600; font-size: 13.5px; padding: 6px 13px; border-radius: 999px;
}
.filbert-stock-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fb-success); }

/* Bulk-discount line "Mongdaravsláttur" (V2): a compact accent line with a "%"
 * tile, shown only when a quantity rule applies. Output by [filbert_volume_discount]. */
.filbert-bulk {
	display: flex; align-items: center; gap: 11px;
	background: #f6f0e7; border: 1px solid #ece1d2; border-radius: 12px;
	padding: 13px 16px; margin-bottom: 22px;
}
.filbert-bulk i {
	width: 30px; height: 30px; border-radius: 8px; flex: none; font-style: normal;
	background: var(--fb-primary-tint); color: var(--fb-primary-deep);
	font-weight: 700; font-size: 14px;
	display: flex; align-items: center; justify-content: center;
}
.filbert-bulk div { font-weight: 600; font-size: 14px; color: #5c4326; }
.filbert-bulk strong { color: var(--fb-ink); font-weight: 700; }

/* Quantity + add to cart row */
.woocommerce div.product form.cart { display: flex; gap: 14px; align-items: stretch; }
/* Quantity control: a − [n] + pill that matches the add-to-cart button height.
 * The native number spinner is hidden (see below); the buttons are injected by
 * assets/js/qty-stepper.js. */
.woocommerce div.product form.cart .quantity {
	display: flex; align-items: stretch; flex: none;
	border: 1px solid var(--fb-line); border-radius: var(--fb-rad-btn);
	background: var(--fb-surface); overflow: hidden;
}
.woocommerce div.product form.cart .quantity .qty {
	width: 52px; border: 0; background: transparent; text-align: center; font-weight: 700; font-size: 16px;
	-moz-appearance: textfield; appearance: textfield;
}
/* Kill the native spinner — the stepper buttons replace it */
.woocommerce div.product form.cart .quantity .qty::-webkit-outer-spin-button,
.woocommerce div.product form.cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none; margin: 0;
}
.woocommerce div.product form.cart .quantity .filbert-qty-btn {
	flex: none; width: 46px; border: 0; background: transparent; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	font-size: 22px; font-weight: 500; line-height: 1; color: var(--fb-ink);
	-webkit-user-select: none; user-select: none; transition: background-color 0.12s ease, color 0.12s ease;
}
.woocommerce div.product form.cart .quantity .filbert-qty-btn:hover {
	background: var(--fb-surface-alt); color: var(--fb-primary-deep);
}
.woocommerce div.product form.cart button.single_add_to_cart_button {
	flex: 1; border-radius: var(--fb-rad-btn); font-weight: 700; font-size: 16px; padding: 16px 28px;
	background: var(--fb-primary); color: #fff;
}
.woocommerce div.product form.cart button.single_add_to_cart_button:hover { filter: brightness(0.94); background: var(--fb-primary); }

/* Perks row */
.filbert-perks { border: 1px solid var(--fb-line); border-radius: var(--fb-rad); overflow: hidden; background: var(--fb-surface); }
.filbert-perks .filbert-perk { padding: 18px 20px; }
.filbert-perks .filbert-perk + .filbert-perk { border-left: 1px solid var(--fb-line); }
.filbert-perks .filbert-perk .filbert-perk-title { font-family: var(--fb-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fb-primary-deep); margin: 0 0 6px; }
.filbert-perks .filbert-perk p { font-size: 13.5px; line-height: 1.5; color: var(--fb-body); margin: 0; }

/* Spec table (product attributes) */
.woocommerce table.shop_attributes { border: 1px solid var(--fb-line); border-radius: var(--fb-rad); overflow: hidden; border-collapse: separate; border-spacing: 0; }
.woocommerce table.shop_attributes th,
.woocommerce table.shop_attributes td { border-bottom: 1px solid var(--fb-line); padding: 13px 18px; font-size: 14.5px; }
.woocommerce table.shop_attributes th { background: var(--fb-surface-alt); font-weight: 700; width: 35%; }
.woocommerce table.shop_attributes tr:last-child th,
.woocommerce table.shop_attributes tr:last-child td { border-bottom: 0; }

/* Tabs / details */
.woocommerce div.product .woocommerce-tabs ul.tabs { border-bottom: 1px solid var(--fb-line); padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--fb-line); }

/* ---------------------------------------------------------------------------
 * Cart & Checkout blocks
 * ------------------------------------------------------------------------- */
/* Faroe Islands is the only selling country (WooCommerce → General → Selling
 * locations), so the country is locked to FO. Hide the country selector — the
 * block still renders it even with one country — and the state/county field,
 * since FO has no subdivisions. Both submit their fixed/empty value, which is
 * valid, so hiding them is safe. */
.wc-block-components-address-form__country,
.wc-block-components-address-form__state { display: none !important; }

.wp-block-woocommerce-cart .wc-block-cart-items,
.wc-block-components-sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
	background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-rad);
}
/* Checkout order summary card. WooCommerce draws the summary's divider lines
 * (collapsible title, totals border, open-content border) edge-to-edge, and pads
 * its inner sections unevenly — on mobile the title row + chevron sat flush to the
 * border and the bottom divider ran past our 16px rounded corner. Fix: clip the
 * card to its radius, then own one consistent side gutter and zero WooCommerce's
 * inner horizontal padding/margins so every row lines up against that gutter. */
.wp-block-woocommerce-checkout-order-summary-block {
	overflow: hidden;
	padding-left: 20px;
	padding-right: 20px;
}
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-totals-item {
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title-text {
	margin-left: 0;
}
/* On checkout the outer totals column ALSO matches .wc-block-components-sidebar,
 * which double-boxed the summary (a second border, offset by the column-gap
 * padding). The inner order-summary-block is the real card; keep the outer one
 * as a plain transparent column wrapper. */
.wp-block-woocommerce-checkout-totals-block {
	background: transparent; border: 0; border-radius: 0;
}
.wp-block-woocommerce-cart .wc-block-cart-items { padding: 8px 20px; }
.wc-block-components-sidebar.wc-block-cart__sidebar .wc-block-components-totals-wrapper,
.wc-block-cart .wc-block-components-sidebar { padding: 24px; }
.wc-block-cart-item__total-price-and-sale-badge-wrapper,
.wc-block-components-product-price__value { color: var(--fb-primary-deep); font-weight: 800; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--fb-primary-deep); font-weight: 800; }
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	background: var(--fb-primary) !important; border-radius: var(--fb-rad-btn) !important; font-weight: 700 !important;
}
.wc-block-cart__submit-button:hover { filter: brightness(0.94); }
.wc-block-components-text-input input,
.wc-block-components-text-input.is-active input {
	border-radius: var(--fb-rad-input); border-color: var(--fb-line);
}
/* Selected shipping / payment radio cards get a hazelnut ring */
.wc-block-components-radio-control__option--checked,
.wc-block-components-radio-control-accordion-option--checked {
	box-shadow: 0 0 0 2px var(--fb-primary); border-radius: var(--fb-rad-input);
}
.wc-block-components-radio-control__input:checked { accent-color: var(--fb-primary); }

/* Simplified checkout header */
.filbert-checkout-header { background: var(--fb-surface); border-bottom: 1px solid var(--fb-line); }
.filbert-checkout-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.filbert-checkout-bar .filbert-secure {
	display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; color: var(--fb-ink);
}
.filbert-checkout-bar .filbert-secure .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--fb-success); }
.filbert-checkout-bar .filbert-back { font-weight: 600; font-size: 14px; color: var(--fb-primary-deep); text-decoration: none; display: inline-flex; align-items: center; min-height: var(--fb-tap); }
.filbert-checkout-bar .filbert-back:hover { filter: brightness(0.9); }
@media (max-width: 700px) {
	.filbert-checkout-bar .filbert-secure { display: none; }
}

/* Cart "all in stock" reassurance line */
.filbert-cart-reassure { display: inline-flex; align-items: center; gap: 8px; color: var(--fb-success-ink); font-weight: 600; font-size: 14px; }
.filbert-cart-reassure::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fb-success); }

/* ---------------------------------------------------------------------------
 * My Account
 * ------------------------------------------------------------------------- */
/* Two-column account layout: nav sidebar + content (logged-in dashboard) */
.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) {
	display: flex; align-items: flex-start; gap: 32px;
}
.woocommerce-account .woocommerce-MyAccount-navigation { flex: 0 0 240px; }
.woocommerce-account .woocommerce-MyAccount-content { flex: 1 1 auto; min-width: 0; }
@media (max-width: 781px) {
	.woocommerce-account .woocommerce:has(.woocommerce-MyAccount-navigation) { flex-direction: column; }
	.woocommerce-account .woocommerce-MyAccount-navigation,
	.woocommerce-account .woocommerce-MyAccount-content { flex: 1 1 auto; width: 100%; }
}
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block; padding: 11px 16px; border-radius: var(--fb-rad-input); font-weight: 600; color: var(--fb-ink); text-decoration: none;
}
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: var(--fb-surface); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: var(--fb-primary); color: #fff; }
.woocommerce-account .woocommerce-MyAccount-content { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-rad); padding: 28px; }
.woocommerce form.login, .woocommerce form.register,
.woocommerce-account:not(.logged-in) .u-column1,
.woocommerce-account:not(.logged-in) .u-column2 {
	background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-rad); padding: 28px;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .input-text { border-radius: var(--fb-rad-input); border: 1px solid var(--fb-line); padding: 11px 14px; }
.woocommerce-account table.account-orders-table { border: 1px solid var(--fb-line); border-radius: var(--fb-rad); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.woocommerce-account table.account-orders-table th,
.woocommerce-account table.account-orders-table td { border-bottom: 1px solid var(--fb-line); padding: 12px 16px; }

/* WooCommerce primary buttons everywhere → hazelnut pill */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt {
	background: var(--fb-primary); color: #fff; border-radius: var(--fb-rad-btn); font-weight: 700; padding: 12px 24px;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover { background: var(--fb-primary); filter: brightness(0.94); }

/* ---------------------------------------------------------------------------
 * Contact (Samband) — info cards + form
 * ------------------------------------------------------------------------- */
.filbert-info-card { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-rad); padding: 22px 24px; height: 100%; }
.filbert-info-card .filbert-info-label { font-family: var(--fb-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fb-primary-deep); margin: 0 0 8px; }
.filbert-info-card p { margin: 0; }
.filbert-form-card { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-rad); padding: 28px; }
.filbert-form-card input, .filbert-form-card textarea, .filbert-form-card select {
	width: 100%; border: 1px solid var(--fb-line); border-radius: var(--fb-rad-input); padding: 11px 14px;
	font-family: inherit; font-size: 15px; background: var(--fb-base); box-sizing: border-box;
}
.filbert-form-card label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
.filbert-form-card button {
	background: var(--fb-primary); color: #fff; border: 0; border-radius: var(--fb-rad-btn); padding: 14px 28px;
	font-weight: 700; font-size: 15px; cursor: pointer;
}
.filbert-form-card button:hover { filter: brightness(0.94); }

/* ---------------------------------------------------------------------------
 * Stat row (goymsla)
 * ------------------------------------------------------------------------- */
.filbert-stat { background: var(--fb-surface); border: 1px solid var(--fb-line); border-radius: var(--fb-rad); padding: 22px 26px; }
.filbert-stat .filbert-stat-num { font-size: 34px; font-weight: 800; color: var(--fb-primary-deep); line-height: 1; margin: 0 0 6px; letter-spacing: -0.02em; }
.filbert-stat .filbert-stat-label { font-size: 14px; color: var(--fb-body); margin: 0; }

/* ---------------------------------------------------------------------------
 * Footer (dark, 4-column)
 * ------------------------------------------------------------------------- */
.filbert-footer { background: var(--fb-ink); color: var(--fb-footer-text, #cfc4b5); }
.filbert-footer .filbert-footer-head { font-weight: 700; font-size: 13px; color: #d8b894; margin: 0 0 14px; }
.filbert-footer a { color: #cfc4b5; text-decoration: none; }
.filbert-footer a:hover { color: #fff; }
.filbert-footer .filbert-footer-muted { color: #9a8f81; }
.filbert-footer .filbert-logo .filbert-word { color: #fff; }
.filbert-footer .filbert-logo .filbert-word .fo { color: #c79a6e; }
.filbert-footer .filbert-logo .filbert-mark::before {
	background: radial-gradient(125% 115% at 34% 24%, #d8a772 0%, var(--fb-primary) 54%, #66421f 100%);
}
.filbert-footer hr.wp-block-separator { border-color: #3c352c; opacity: 1; }
.filbert-footer-bottom { font-size: 13px; color: #a89d8b; }

/* ---------------------------------------------------------------------------
 * Breadcrumbs
 * ------------------------------------------------------------------------- */
.woocommerce-breadcrumb, .wc-block-breadcrumbs { color: var(--fb-muted); font-size: 13px; }
.woocommerce-breadcrumb a, .wc-block-breadcrumbs a { color: var(--fb-muted); }
.woocommerce-breadcrumb a, .wc-block-breadcrumbs a { text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 30%, transparent); text-underline-offset: 3px; }
.woocommerce-breadcrumb a:hover, .wc-block-breadcrumbs a:hover { color: var(--fb-primary-deep); text-decoration-color: currentColor; }

/* The subcategory chips + filter bar ship as filbert-core blocks
 * (category-nav / category-tiles / filter-bar) with their own styles. */
.wp-block-filbert-category-nav { margin-bottom: 16px; }

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------- */
@media (max-width: 1100px) {
	.woocommerce ul.products.columns-6,
	.woocommerce ul.products.columns-5,
	.woocommerce ul.products.columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
	.filbert-hero-card { padding: 36px 28px; }
	.filbert-hero-card h1 { font-size: 40px; }
}
@media (max-width: 781px) {
	.filbert-perks .filbert-perk + .filbert-perk { border-left: 0; border-top: 1px solid var(--fb-line); }
	.filbert-topbar { font-size: 12.5px; line-height: 1.4; }
}
@media (max-width: 700px) {
	.woocommerce ul.products[class*="columns-"] { grid-template-columns: repeat(2, 1fr); }
	/* Keep the quantity stepper inline beside "Legg í kurv" (same as desktop),
	 * just a touch wider buttons so the − / + are easy to tap on a phone. The
	 * add-to-cart button gives up some side padding so its label isn't cramped
	 * next to the stepper on a narrow screen. */
	.woocommerce div.product form.cart .quantity .filbert-qty-btn { width: 52px; }
	.woocommerce div.product form.cart .quantity .qty { width: 40px; }
	.woocommerce div.product form.cart button.single_add_to_cart_button { padding-left: 16px; padding-right: 16px; white-space: nowrap; }
}

/* ---------------------------------------------------------------------------
 * Mobile header + navigation overlay
 * The primary nav uses overlayMenu:"mobile". Without these rules the desktop
 * flex-row / justify-center / 30px-gap styles leak into the open overlay, so
 * the links render as a vertically-centred, squished cluster you have to
 * scroll to reach. Below also keeps the collapsed header bar on one tidy row.
 * ------------------------------------------------------------------------- */
@media (max-width: 781px) {
	/* The inline search pill is the widest item and overflows the bar on a
	 * phone; drop it here (search stays reachable from the results page). */
	.filbert-search-inline { display: none; }
	/* …and the phone gets its own search: see .fb-msearch below. */
	.filbert-header .wp-block-group.alignwide { gap: 14px; }
	.filbert-actions { gap: 12px; }
	/* Make the hamburger trigger a comfortable tap target */
	.filbert-nav .wp-block-navigation__responsive-container-open {
		width: var(--fb-tap); height: var(--fb-tap); padding: 9px;
		display: inline-flex; align-items: center; justify-content: center;
	}
	.filbert-nav .wp-block-navigation__responsive-container-open svg { width: 26px; height: 26px; }
}

/* The sticky header uses backdrop-filter, which makes it the containing block
 * for position:fixed descendants — that traps the open overlay inside the
 * short header box (you have to scroll within it). Drop the filter while the
 * menu is open (the header is hidden behind the overlay anyway) so the fixed
 * overlay escapes to the viewport. WP sets .has-modal-open on <html>/<body>. */
.has-modal-open .filbert-header {
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}

/* Open full-screen overlay: clean top-aligned vertical list */
.filbert-nav .wp-block-navigation__responsive-container.is-menu-open {
	position: fixed;
	inset: 0;
	height: 100%;
	/* !important: core paints the open overlay white via its own colour classes. */
	background: var(--fb-layers), var(--fb-base) !important;
	color: var(--fb-ink) !important;
	padding: 0;
}
.filbert-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: stretch;
	justify-content: flex-start;
	padding: 64px 28px 40px;
	overflow-y: auto;
}
.filbert-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	width: 100%;
}
.filbert-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
}
.filbert-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 16px 4px;
	min-height: 56px;
	font-size: 20px;
	font-weight: 700;
	color: var(--fb-ink);
	border-bottom: 1px solid var(--fb-line);
}
.filbert-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover {
	color: var(--fb-primary-deep);
}
/* Close (✕) button: clearly tappable, top-right, above the first link */
.filbert-nav .wp-block-navigation__responsive-container-close {
	top: 14px;
	right: 14px;
	width: var(--fb-tap); height: var(--fb-tap);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--fb-ink);
}
.filbert-nav .wp-block-navigation__responsive-container-close svg { width: 26px; height: 26px; }

/* ------------------------------------------------------------------
 * Hybrid infinite scroll (assets/infinite-scroll.js). The pagination
 * block stays in the DOM as the no-JS fallback; JS hides it and takes
 * over with auto-load + a "Vís fleiri" button.
 * ------------------------------------------------------------------ */
html.fb-inf-on .wp-block-query-pagination { display: none; }
.fb-inf { display: flex; justify-content: center; margin-top: 40px; min-height: 48px; }
.fb-inf-btn { cursor: pointer; padding: 12px 34px; border-radius: var(--fb-rad-btn); }
.fb-inf-btn { min-height: var(--fb-tap); }
/* Loading line: a print head laying down a bead, left to right. */
.fb-inf-status {
	position: relative; font-size: 14px; font-weight: 600; color: var(--fb-body); align-self: center;
	padding-bottom: 12px;
}
.fb-inf-status::after {
	content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
	border-radius: 3px; background: var(--fb-primary);
	transform-origin: left center; animation: fb-bead 1.1s var(--fb-ease-out) infinite;
}
@keyframes fb-bead { from { transform: scaleX(0); opacity: 1; } 80% { transform: scaleX(1); opacity: 1; } to { transform: scaleX(1); opacity: 0; } }
.fb-inf-sentinel { height: 1px; }

/* ===========================================================================
 * Filbert v2 — critique fixes + print-specific components
 * ======================================================================== */

/* ---------------------------------------------------------------------------
 * Browser surfaces: focus, selection, caret, form accents
 * ------------------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--fb-primary-deep);
	outline-offset: 3px;
	border-radius: 6px;
}
:where(.wp-element-button, .wp-block-button__link, .button, .fb-chip, .fb-spool, .filbert-stockpill, .filbert-fb-pill):focus-visible {
	outline-offset: 3px;
	border-radius: var(--fb-rad-btn);
}
::selection { background: var(--fb-primary-tint); color: var(--fb-ink); }
input, textarea { caret-color: var(--fb-primary-deep); }
:root { accent-color: var(--fb-primary); }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------------------
 * Hero: the H1 is "printed" layer by layer on load — the one authored motion
 * moment on the site. Pure CSS; reduced-motion users get the finished heading.
 * ------------------------------------------------------------------------- */
.fb-layer-build {
	position: relative;
	animation: fb-print 0.9s steps(14, end) 0.05s both;
}
.fb-layer-build::after {
	/* the nozzle line riding the top of the build */
	content: ""; position: absolute; left: -6px; right: -6px; height: 2px; border-radius: 2px;
	background: var(--fb-primary); opacity: 0; bottom: 0;
	transform: translateY(2px); /* sit just inside the printed (visible) edge */
	animation: fb-nozzle 0.9s steps(14, end) 0.05s both;
}
@keyframes fb-print { from { clip-path: inset(100% -8px 0 -8px); } to { clip-path: inset(-8px -8px -8px -8px); } }
@keyframes fb-nozzle {
	from { bottom: 0; opacity: 1; }
	96% { bottom: 100%; opacity: 1; }
	to { bottom: 100%; opacity: 0; }
}

/* Hero card foot: local-stock readouts */
.filbert-hero-card .wp-block-buttons { margin-bottom: 36px; }
.fb-hero-facts {
	margin: auto 0 0; padding: 22px 0 0;
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
	border-top: 1px solid var(--fb-line);
}
.fb-hero-fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; margin: 0; }
.fb-hero-fact dd {
	margin: 0; font-family: var(--fb-mono); font-weight: 700; font-size: 24px; line-height: 1.1;
	letter-spacing: -0.02em; color: var(--fb-primary-deep); font-variant-numeric: tabular-nums;
}
.fb-hero-fact dt { font-size: 13.5px; line-height: 1.4; color: var(--fb-body); }

/* Trust row: small headings instead of mono eyebrows */
.fb-trust-row .fb-trust-title { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; margin: 0 0 6px; }

/* Spectrum range card: title + text only */
.fb-desc-card .fb-desc-title { text-wrap: balance; }

/* ---------------------------------------------------------------------------
 * Header: mobile search (≤781px) — a 44px icon that opens a full-width bar
 * under the sticky header.
 * ------------------------------------------------------------------------- */
.fb-msearch { display: none; }
@media (max-width: 781px) {
	.fb-msearch { display: block; }
	.fb-msearch > summary {
		list-style: none; cursor: pointer;
		width: var(--fb-tap); height: var(--fb-tap); border-radius: var(--fb-rad-btn);
		display: inline-flex; align-items: center; justify-content: center; color: var(--fb-ink);
	}
	.fb-msearch > summary::-webkit-details-marker { display: none; }
	.fb-msearch[open] > summary { background: var(--fb-surface-alt); }
	.fb-msearch-panel {
		position: absolute; left: 0; right: 0; top: 100%;
		display: flex; gap: 8px; padding: 12px 16px 14px;
		background: var(--fb-base); border-bottom: 1px solid var(--fb-line);
		box-shadow: 0 12px 24px -12px rgba(42, 36, 29, 0.18);
	}
	.fb-msearch-panel input[type="search"] {
		flex: 1 1 auto; min-width: 0; min-height: var(--fb-tap);
		border: 1px solid var(--fb-border-strong); border-radius: var(--fb-rad-btn);
		padding: 0 18px; font: inherit; font-size: 16px; background: var(--fb-surface); color: var(--fb-ink);
	}
	.fb-msearch-panel button {
		min-height: var(--fb-tap); padding: 0 20px; border: 0; border-radius: var(--fb-rad-btn);
		background: var(--fb-primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
	}
	.filbert-actions { gap: 6px; }
	.filbert-actions .wc-block-mini-cart__button { padding: 0 14px; }
}

/* Large inline search (results page, 404) */
.fb-search-big { display: flex; gap: 10px; max-width: 560px; margin: 18px 0 0; }
.fb-empty-state .fb-search-big { margin: 24px auto 28px; }
.filbert-page-hero > .fb-search-big { margin-left: 0 !important; margin-right: 0 !important; }
.fb-search-big input[type="search"] {
	flex: 1 1 auto; min-width: 0; min-height: 48px;
	border: 1px solid var(--fb-border-strong); border-radius: var(--fb-rad-btn); padding: 0 20px;
	font: inherit; font-size: 16px; background: var(--fb-surface); color: var(--fb-ink);
}
.fb-search-big input[type="search"]::placeholder { color: var(--fb-muted); opacity: 1; }
.fb-search-big button { min-height: 48px; }

/* ---------------------------------------------------------------------------
 * Page heroes + empty states carry the layer texture
 * ------------------------------------------------------------------------- */
.filbert-page-hero { position: relative; isolation: isolate; }
.filbert-page-hero::before {
	content: ""; position: absolute; z-index: -1; inset: 0;
	background: var(--fb-layers);
	-webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
	mask-image: linear-gradient(to bottom, #000 30%, transparent);
	pointer-events: none;
}
.fb-empty-state { background: var(--fb-layers); }

/* Goymsla stat row (was an inline 3-col grid that never collapsed) */
.fb-stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 32px; }
@media (max-width: 700px) { .fb-stat-row { grid-template-columns: 1fr; gap: 10px; } }

/* ---------------------------------------------------------------------------
 * Spools — the swatch motif. A coloured disc with a cream hub, like a spool
 * seen end-on. Used by the colour row, search chips and the Litur filter.
 * ------------------------------------------------------------------------- */
.fb-spool, .fb-chip__spool, .filbert-litur-dot {
	position: relative; flex: none; border-radius: 50%;
	background: var(--spool, #cfc4b5);
	box-shadow: inset 0 0 0 1px rgba(42, 36, 29, 0.18), inset 0 -4px 8px rgba(0, 0, 0, 0.12);
}
.fb-spool::after, .fb-chip__spool::after, .filbert-litur-dot::after {
	content: ""; position: absolute; inset: 32%; border-radius: 50%;
	background: var(--fb-surface); box-shadow: 0 0 0 1px rgba(42, 36, 29, 0.14);
}
/* Litur filter dots (filbert-core block) get the same treatment */
.filbert-litur-list .filbert-litur-dot { width: 18px; height: 18px; border: 0; }
.filbert-litur-list a { min-height: 36px; }

/* PDP colour row */
.fb-colours { margin: 0 0 20px; }
.fb-colours__label { margin: 0 0 10px; font-size: 14.5px; color: var(--fb-body); }
.fb-colours__label strong { color: var(--fb-ink); font-weight: 700; }
.fb-colours__count { color: var(--fb-muted); font-size: 13px; margin-left: 4px; }
.fb-colours__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.fb-spool {
	display: block; width: 40px; height: 40px; margin: 2px;
	transition: transform 0.2s var(--fb-ease-out);
}
.fb-spool:hover { transform: translateY(-2px); }
.fb-spool.is-current { box-shadow: inset 0 0 0 1px rgba(42, 36, 29, 0.18), 0 0 0 2px var(--fb-base), 0 0 0 4px var(--fb-ink); }
.fb-spool.is-out { opacity: 0.45; }
.fb-spool.is-out::before {
	content: ""; position: absolute; z-index: 1; left: 50%; top: -3px; bottom: -3px; width: 2px;
	background: var(--fb-ink); transform: rotate(45deg); border-radius: 2px;
}

/* ---------------------------------------------------------------------------
 * Single product
 * ------------------------------------------------------------------------- */
.fb-meta {
	margin: 0 0 18px; font-size: 15px; font-weight: 600; color: var(--fb-body);
	display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0;
}
.fb-meta__sep { margin: 0 9px; color: var(--fb-muted); }
.fb-vat-note { margin: 0; display: flex; flex-direction: column; gap: 2px; align-self: center; }
.fb-vat-note__incl { font-size: 14px; font-weight: 700; color: var(--fb-ink); }
.fb-vat-note__ex { font-size: 14px; font-weight: 500; color: var(--fb-muted); }
.fb-vat-note__ex .woocommerce-Price-amount { font-weight: 600; }
.filbert-price-row { align-items: center; }
.fb-buybox .wp-block-add-to-cart-form { margin-bottom: 0; }

/* Store notices (e.g. "… er lagt í tína kurv" after adding) */
.wc-block-store-notices .wc-block-components-notice-banner,
.woocommerce-notices-wrapper .wc-block-components-notice-banner {
	border-radius: var(--fb-rad-inner); border: 1px solid var(--fb-line);
	background: var(--fb-surface); color: var(--fb-ink); font-size: 15px;
	box-shadow: 0 6px 20px -10px rgba(42, 36, 29, 0.25); margin-bottom: 18px;
}
.wc-block-components-notice-banner:focus { outline: none; }
.wc-block-components-notice-banner.is-success { border-color: #bfe0c9; background: var(--fb-success-bg); }
.wc-block-components-notice-banner.is-success > svg { background: var(--fb-success-ink); }
.wc-block-components-notice-banner.is-error { border-color: #e9c4bd; background: #fbefec; }
.wc-block-components-notice-banner .wc-forward,
.wc-block-components-notice-banner a { color: var(--fb-primary-deep) !important; font-weight: 700; text-underline-offset: 3px; }

/* Description band: readable measure (supplier copy ran ~200 characters/line) */
.fb-details-band .woocommerce-Tabs-panel--description,
.fb-details-band #tab-description { max-width: 62ch; }
.fb-details-band #tab-description p,
.fb-details-band #tab-description li { line-height: 1.65; color: var(--fb-body); }
/* Supplier copy brings its own H2s: give them heading rhythm (more space above). */
.fb-details-band #tab-description :is(h2, h3, h4) { font-size: 20px; line-height: 1.25; letter-spacing: -0.01em; margin: 1.9em 0 0.45em; }
.fb-details-band #tab-description > :first-child { margin-top: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { min-height: var(--fb-tap); display: inline-flex; align-items: center; }
/* WooCommerce's tabs default to a lavender grey that belongs to no palette here. */
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background: var(--fb-soft); border-color: var(--fb-line); border-radius: 10px 10px 0 0; margin: 0 4px 0 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--fb-surface); border-bottom-color: var(--fb-surface); }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--fb-body); font-weight: 700; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--fb-ink); }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }

/* ---- Buy row: one height, one corner ------------------------------------
 * Quantity, "Legg í kurv" and the option chips share a 52px height and a 12px
 * corner (they were 999px pills of different heights — "bubbly" next to a
 * square select). */
.fb-buybox form.cart .quantity { border-radius: var(--fb-rad-btn) !important; min-height: 52px; }
.fb-buybox form.cart button.single_add_to_cart_button {
	border-radius: var(--fb-rad-btn) !important; min-height: 52px; padding: 0 28px !important;
	border: 0 !important; white-space: nowrap; line-height: 1.2;
}

/* Variable products: options stacked above the buy row (the form was a flex
 * row, which squeezed the button into three lines and on phones pushed the
 * page sideways). */
.woocommerce div.product form.variations_form { display: block; }
.fb-buybox table.variations { width: 100%; margin: 0 0 18px; border: 0; border-collapse: collapse; }
.fb-buybox table.variations tbody, .fb-buybox table.variations tr,
.fb-buybox table.variations th, .fb-buybox table.variations td { display: block; padding: 0 !important; border: 0; background: none; line-height: 1.3 !important; }
.fb-buybox table.variations tr + tr { margin-top: 16px; }
.fb-buybox table.variations th.label { margin: 0 0 8px; text-align: left; line-height: 1.3; }
.fb-buybox table.variations th.label label { display: block; margin: 0 !important; font-size: 14.5px; font-weight: 600; color: var(--fb-body); }
.fb-buybox table.variations select {
	width: 100%; max-width: 360px; min-height: 48px; padding: 0 40px 0 14px;
	border: 1px solid var(--fb-border-strong); border-radius: 12px; background-color: var(--fb-surface);
	font: inherit; font-size: 16px; color: var(--fb-ink);
}
/* With chips (assets/js/v2.js) the select stays as WooCommerce's source of truth, hidden. */
.fb-buybox select.fb-opts-source { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fb-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-opt {
	min-height: 48px; padding: 0 18px; border-radius: var(--fb-rad-btn); cursor: pointer;
	border: 1px solid var(--fb-border-strong); background: var(--fb-surface); color: var(--fb-ink-2);
	font: inherit; font-size: 15px; font-weight: 600;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.fb-opt:hover { border-color: var(--fb-primary-deep); color: var(--fb-ink); }
.fb-opt.is-on { border: 2px solid var(--fb-primary); background: var(--fb-primary-tint); color: var(--fb-ink); padding: 0 17px; }
.fb-opt:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
/* The chosen option always shows, so "Reinsa" (clear) is redundant; the big
 * price follows the variation, so its own price line under the select is too. */
.fb-opts-on .reset_variations { display: none !important; }
.fb-buybox .woocommerce-variation-price { display: none; }
.fb-buybox .woocommerce-variation.single_variation:empty,
.fb-buybox .woocommerce-variation.single_variation:not(:has(.woocommerce-variation-description p, .woocommerce-variation-availability:not(:empty))) { margin: 0 !important; }
.fb-buybox .woocommerce-variation-description p { margin: 0 0 12px; color: var(--fb-body); }
.fb-buybox .woocommerce-variation-add-to-cart { display: flex; gap: 12px; align-items: stretch; }
.fb-buybox .woocommerce-variation-add-to-cart button.single_add_to_cart_button { flex: 1; }
.fb-buybox .single_add_to_cart_button.disabled { opacity: 0.55; cursor: not-allowed; }

/* "frá" before a variable product's lowest price */
.fb-from { font-size: max(0.4em, 13px); font-weight: 700; color: var(--fb-body); margin-right: 0.15em; letter-spacing: 0; }

@media (max-width: 781px) {
	.filbert-price-row .wp-block-woocommerce-product-price,
	.filbert-price-row .wp-block-woocommerce-product-price .wc-block-components-product-price__value,
	.filbert-price-row .wp-block-woocommerce-product-price .woocommerce-Price-amount { font-size: clamp(36px, 11vw, 58px); }
	/* the inline 3-column perks grid stacks on phones */
	.filbert-perks { grid-template-columns: 1fr !important; }
	.fb-buybox form.cart .quantity .filbert-qty-btn { width: 44px; }
	.fb-buybox form.cart .quantity .qty { width: 36px; }
	.fb-buybox form.cart button.single_add_to_cart_button { padding: 0 18px !important; }
}

/* WooCommerce block buttons (mini-cart "Mín kurv" / "Far til kassan", cart and
 * checkout) and core buttons take the same corner. */
.wc-block-components-button:not(.is-link), .wp-element-button, .wp-block-button__link,
.wc-block-mini-cart__footer-actions .wc-block-components-button { border-radius: var(--fb-rad-btn) !important; }
.wc-block-components-drawer__close { border-radius: var(--fb-rad-btn) !important; }

/* Checkout delivery + payment option groups: warm frame, same corner, a
 * hazelnut ring on the chosen option (WooCommerce: square, near-black). */
.wc-block-components-radio-control--highlight-checked { border-radius: var(--fb-rad-btn); }
.wc-block-components-radio-control--highlight-checked::after {
	border: 1px solid var(--fb-line) !important; border-radius: var(--fb-rad-btn) !important;
	box-shadow: none !important;
}
.wc-block-components-radio-control-accordion-option::after,
.wc-block-components-radio-control__option::after { box-shadow: none !important; border-color: transparent !important; }
.wc-block-components-radio-control__option-checked {
	box-shadow: inset 0 0 0 2px var(--fb-primary) !important;
	border-radius: var(--fb-rad-btn) !important;
	background: var(--fb-surface);
}
/* Payment accordion: WooCommerce rings the OUTER option (1.5px near-black,
 * 4px corners) under the inner one, so its corners showed. The inner option
 * carries the ring instead. */
.wc-block-components-radio-control-accordion-option[class*="accordion-option--checked"] {
	box-shadow: none !important; border-radius: var(--fb-rad-btn) !important;
}
.wc-block-components-radio-control__input { border-color: var(--fb-border-strong) !important; }
.wc-block-components-radio-control__input:checked { border-color: var(--fb-primary) !important; }
.wc-block-components-radio-control__input:checked::before { background: var(--fb-primary) !important; }

/* Sticky mobile buy bar (assets/js/v2.js) */
.fb-buybar {
	position: fixed; z-index: 40; left: 10px; right: 10px; bottom: 10px;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 10px 10px 10px 18px; border-radius: 16px;
	background: var(--fb-ink); color: #f3ece1;
	box-shadow: 0 14px 30px -10px rgba(42, 36, 29, 0.45);
	transform: translateY(calc(100% + 24px)); visibility: hidden;
	transition: transform 0.35s var(--fb-ease-out), visibility 0s linear 0.35s;
}
.fb-buybar.is-visible { transform: none; visibility: visible; transition: transform 0.35s var(--fb-ease-out); }
.fb-buybar__text { min-width: 0; display: flex; flex-direction: column; }
.fb-buybar__name { font-size: 13px; color: #cfc4b5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-buybar__price { font-size: 17px; font-weight: 800; color: #fff; }
.fb-buybar__btn {
	flex: none; min-height: var(--fb-tap); padding: 0 22px; border: 0; border-radius: var(--fb-rad-btn);
	background: var(--fb-primary); color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
@media (min-width: 782px) { .fb-buybar { display: none; } }

/* ---------------------------------------------------------------------------
 * Catalogue: filter bar + tiles (filbert-core blocks, restyled from the theme)
 * ------------------------------------------------------------------------- */
.filbert-fb-pill, .filbert-sort, .filbert-stockpill {
	/* One compact height on every screen: the plugin's 8px vertical padding on
	 * top of a min-height made desktop pills ~60px tall vs 40px on phones. */
	box-sizing: border-box; min-height: 40px; padding-top: 0 !important; padding-bottom: 0 !important;
}
/* filbert-core draws its filter controls and subcategory chips as pills */
.filbert-fb-pill, .filbert-sort, .filbert-stockpill, .filbert-chip,
.filbert-price-form input, .filbert-price-form button { border-radius: var(--fb-rad-btn) !important; }
.filbert-stockpill .dot {
	/* off = an empty ring, on = filled: the dot no longer looks active when off */
	background: transparent; box-shadow: inset 0 0 0 1.5px var(--fb-success-ink);
	width: 9px; height: 9px;
}
.filbert-stockpill.is-on .dot { background: #fff; box-shadow: none; }
.filbert-dd-panel { box-shadow: 0 16px 34px -12px rgba(42, 36, 29, 0.28); }
.filbert-merki-list a, .filbert-litur-list a { padding-top: 7px; padding-bottom: 7px; }
.filbert-dd-clear { display: inline-flex; align-items: center; min-height: 36px; }
/* filbert-core prints its counts in #888 (3.5:1) — bring them up to AA */
.filbert-litur-list a span[style], .filbert-merki-count { color: var(--fb-muted) !important; }
@media (pointer: coarse) {
	.filbert-litur-list a, .filbert-merki-list a { min-height: var(--fb-tap); }
}

/* Filter links land on the grid (#vorur = the filter bar, see functions.php);
 * leave room for the sticky header above it. */
#vorur { scroll-margin-top: 92px; }

/* Phones: the filter bar is two fixed rows instead of four wrapped ones —
 * one swipeable row of pills, then count + sort. Dropdowns open as a bottom
 * sheet: a panel hanging under a pill would be clipped by the scrolling row,
 * and the sheet sits in the thumb zone anyway. */
@media (max-width: 700px) {
	.filbert-filterbar { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 0 12px; }
	.filbert-fb-left {
		flex-wrap: nowrap; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
		margin: 0 -16px; padding: 2px 16px; scrollbar-width: none;
		/* No fade mask here: a mask clips descendants, including the fixed
		 * bottom sheet. The pill cut off at the edge already says "scroll". */
	}
	.filbert-fb-left::-webkit-scrollbar { display: none; }
	.filbert-fb-label { display: none; }
	.filbert-fb-left > * { flex: none; }
	.filbert-fb-pill, .filbert-stockpill, .filbert-sort { white-space: nowrap; }
	.filbert-fb-right { flex-wrap: nowrap; gap: 10px; }
	.filbert-fb-count { flex: none; }
	.filbert-sort { min-width: 0; }
	.filbert-sort .orderby { min-width: 0; max-width: 46vw; text-overflow: ellipsis; }

	.filbert-dd { position: static; }
	.filbert-dd[open]::before {
		content: ""; position: fixed; inset: 0; z-index: 55;
		background: rgba(42, 36, 29, 0.38);
	}
	.filbert-dd[open] .filbert-dd-panel {
		position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto;
		min-width: 0; max-height: 72vh; overflow-y: auto;
		border-radius: 20px 20px 0 0; border-width: 1px 0 0;
		padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
		box-shadow: 0 -16px 36px -12px rgba(42, 36, 29, 0.35);
		animation: fb-sheet 0.28s var(--fb-ease-out);
	}
	.filbert-dd[open] .filbert-dd-panel::before {
		/* grab handle */
		content: ""; display: block; width: 40px; height: 4px; border-radius: 4px;
		background: var(--fb-line); margin: -8px auto 16px;
	}
	.filbert-litur-list, .filbert-merki-list { gap: 2px 14px; }
	.filbert-price-form input { flex: 1 1 120px; width: auto; min-height: var(--fb-tap); font-size: 16px; }
	.filbert-price-form button { min-height: var(--fb-tap); }
}
@keyframes fb-sheet { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .filbert-dd[open] .filbert-dd-panel { animation: none; } }

/* Brand tiles carry the brand's logo (functions.php) instead of a letter
 * avatar + name: shorter tiles, the logo does the naming. */
.filbert-tile-brand { min-height: 0; gap: 20px; padding: 20px 22px 18px; }
.filbert-tile-brand .filbert-tile-head.fb-has-logo { min-height: 56px; align-items: center; }
.fb-brand-logo { display: block; max-width: 100%; height: auto; }

/* Phones: the material / brand tiles become one swipeable row so products are
 * visible on the first screen instead of five stacked tiles. */
@media (max-width: 600px) {
	.fb-tiles-wrap { margin-top: 20px !important; }
	.fb-tiles-wrap .filbert-tiles {
		display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 46%);
		grid-template-columns: none; gap: 10px;
		overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
		margin: 0 -16px 16px; padding: 2px 16px 8px; scrollbar-width: none;
	}
	.fb-tiles-wrap .filbert-tiles::-webkit-scrollbar { display: none; }
	.fb-tiles-wrap .filbert-tile { scroll-snap-align: start; min-height: 0; padding: 14px; gap: 10px; }
	.fb-tiles-wrap .filbert-tile:hover { transform: none; }
	.fb-tiles-wrap .filbert-swatch { width: 34px; height: 34px; }
	.fb-tiles-wrap .filbert-swatch::after { width: 12px; height: 12px; }
	.fb-tiles-wrap .filbert-type-name, .fb-tiles-wrap .filbert-tile-name { font-size: 17px; }
	.filbert-page-hero { padding-top: 24px; }
	.filbert-page-hero h1, .filbert-page-hero .wp-block-query-title { font-size: 34px; }
}

/* Archive product titles are now H2 (outline: H1 → H2); keep the card size. */
li.wc-block-product h2.wp-block-post-title { font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: 0; }

/* ---------------------------------------------------------------------------
 * Search help (no results)
 * ------------------------------------------------------------------------- */
.fb-search-help { max-width: 760px; margin: 24px 0 0; padding: 32px; border-radius: var(--fb-rad); background: var(--fb-layers), var(--fb-surface); border: 1px solid var(--fb-line); }
.fb-search-help__lead { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--fb-ink); }
.fb-search-help__title { font-size: 15px; font-weight: 800; letter-spacing: 0; margin: 24px 0 10px; }
.fb-chip-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-chip {
	display: inline-flex; align-items: center; gap: 9px; min-height: var(--fb-tap);
	padding: 0 16px; border-radius: var(--fb-rad-btn); border: 1px solid var(--fb-line);
	background: var(--fb-surface); color: var(--fb-ink-2); font-weight: 600; font-size: 14px;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.fb-chip:hover { border-color: var(--fb-primary); color: var(--fb-ink); }
.fb-chip__spool { display: inline-block; width: 20px; height: 20px; margin-left: -4px; }

/* ---------------------------------------------------------------------------
 * Cart & checkout
 * ------------------------------------------------------------------------- */
/* The supplier's English one-liner under each line item is noise here. */
.wc-block-cart .wc-block-components-product-metadata__description,
.wc-block-checkout .wc-block-components-product-metadata__description,
.wc-block-mini-cart__drawer .wc-block-components-product-metadata__description { display: none; }

/* WooCommerce sets a few totals labels at ~10px; lift them to a legible size. */
.wc-block-components-totals-shipping__via,
.wc-block-components-totals-footer-item-tax,
.wc-block-components-totals-item__description { font-size: 13px !important; }

/* Inputs: rounded, warm borders (WooCommerce ships square near-black ones) */
.wc-block-components-text-input input[type],
.wc-block-components-text-input textarea,
.wc-block-components-textarea,
.wc-blocks-components-select .wc-blocks-components-select__select,
.wc-block-components-combobox .wc-block-components-combobox-control input {
	border-radius: var(--fb-rad-input) !important;
	border-color: var(--fb-border-strong) !important;
	background-color: var(--fb-surface) !important;
}
.wc-block-components-text-input.is-active input[type]:focus,
.wc-block-components-text-input input[type]:focus,
.wc-block-components-textarea:focus {
	border-color: var(--fb-primary-deep) !important;
	box-shadow: 0 0 0 1px var(--fb-primary-deep) !important;
	outline: none;
}
.wc-block-components-text-input label { color: var(--fb-muted); }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
	border-color: var(--fb-border-strong); border-radius: 5px; background-color: var(--fb-surface);
}
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked { background-color: var(--fb-primary); border-color: var(--fb-primary); }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"]:checked + .wc-block-components-checkbox__mark { fill: #fff; }

/* Send / Heinta toggle */
.wc-block-checkout__shipping-method-container { background: var(--fb-surface-alt) !important; border-radius: calc(var(--fb-rad-input) + 4px) !important; }
.wc-block-checkout__shipping-method-option {
	border-radius: var(--fb-rad-input) !important; border: 1px solid transparent !important; color: var(--fb-ink-2);
}
.wc-block-checkout__shipping-method-option--selected {
	border: 2px solid var(--fb-primary) !important; background: var(--fb-surface) !important; color: var(--fb-ink);
}

/* Title and form share one left edge */
.fb-checkout-main > .wp-block-post-title,
.fb-cart-main > .wp-block-post-title {
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin-left: auto !important; margin-right: auto !important; width: 100%;
}

/* Cart line-item controls: real touch targets */
.wc-block-components-quantity-selector { border-radius: var(--fb-rad-btn) !important; border-color: var(--fb-border-strong) !important; overflow: hidden; }
.wc-block-components-quantity-selector::after { border-color: var(--fb-border-strong) !important; border-radius: var(--fb-rad-btn) !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { min-width: 40px; min-height: 40px; color: var(--fb-ink); }
.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { min-height: 40px; }
.wc-block-cart-item__remove-link {
	display: inline-flex !important; align-items: center; justify-content: center;
	min-width: 40px; min-height: 40px; margin-left: 4px;
}
@media (pointer: coarse) {
	.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,
	.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input,
	.wc-block-cart-item__remove-link { min-width: var(--fb-tap); min-height: var(--fb-tap); }
}
/* The items card is a padded <table> at width:100% in content-box sizing, so it
 * overflowed its column by its own padding (the price ran off-screen on phones). */
.wp-block-woocommerce-cart .wc-block-cart-items { box-sizing: border-box; width: 100%; }
@media (max-width: 700px) {
	.wp-block-woocommerce-cart .wc-block-cart-items { padding: 4px 14px; }
	/* Phone row: smaller thumb, a flexible product column, price at the end.
	 * Controls stay 40px here (WCAG 2.2 target ≥24px) so stepper + remove fit. */
	.wc-block-cart .wc-block-cart-items__row { grid-template-columns: 64px minmax(0, 1fr) 0 auto !important; }
	.wc-block-cart .wc-block-cart-item__image { padding-right: 12px !important; }
	.wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button,
	.wc-block-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input,
	.wc-block-cart .wc-block-cart-item__remove-link { min-width: 40px; min-height: 40px; }
	.wc-block-cart .wc-block-cart-item__quantity { gap: 6px; }
}

/* Empty cart */
.fb-empty-cart { padding: 48px 24px 56px; border-radius: var(--fb-rad); background: var(--fb-layers), var(--fb-surface); border: 1px solid var(--fb-line); }
.fb-empty-cart h2 { font-size: 30px; margin: 18px 0 8px; }
.fb-empty-cart p { margin: 0 0 24px; }
.fb-empty-spool {
	--spool: var(--fb-primary);
	width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; position: relative;
	background: repeating-radial-gradient(circle, #b5875f 0 2px, var(--fb-primary) 2px 5px);
	box-shadow: inset 0 0 0 1px rgba(42, 36, 29, 0.2), 0 8px 18px -8px rgba(42, 36, 29, 0.4);
}
.fb-empty-spool::after {
	content: ""; position: absolute; inset: 34%; border-radius: 50%;
	background: var(--fb-surface); box-shadow: 0 0 0 1px rgba(42, 36, 29, 0.18);
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */
.filbert-footer .filbert-footer-head { font-size: 13px; letter-spacing: 0; line-height: 1.4; }
.filbert-footer-bottom a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(207, 196, 181, 0.4); }

/* ---------------------------------------------------------------------------
 * Responsive: hero
 * ------------------------------------------------------------------------- */
@media (max-width: 781px) {
	.filbert-hero-card { padding: 32px 24px 26px; }
	.filbert-hero-card h1 { font-size: 38px; }
	.fb-hero-facts { gap: 12px; }
	.fb-hero-fact dd { font-size: 20px; }
	.fb-hero-fact dt { font-size: 12.5px; }
	.filbert-hero-card .wp-block-buttons { margin-bottom: 28px; }
}
@media (max-width: 400px) {
	.fb-hero-facts { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------------------
 * Reduced motion: finished states, no travel
 * ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	.fb-layer-build, .fb-layer-build::after { animation: none; }
	.fb-layer-build::after { display: none; }
	.fb-inf-status::after { animation: none; transform: none; }
	.fb-buybar, .fb-buybar.is-visible { transition: none; }
	.woocommerce ul.products li.product:hover, li.wc-block-product:hover, .filbert-tile:hover, .fb-spool:hover { transform: none; }
}
