/*!
 * Treetale Home — PLP "Final V3 — Magazine Mix"
 * Loaded conditionally on archive-product / taxonomy-product_cat.
 * Source design: ~/Downloads/treetale-home-design-system/project/product-list/
 */

/* ============================================================
   TOKENS (mirror of theme.json + design-system colors_and_type.css)
   ============================================================ */
body.plp-page {
	--cream:        #FAF8F5;
	--ivory:        #F5F0EB;
	--sand:         #EDE8E1;
	--white:        #FFF;
	--ink:          #1A1A1A;
	--graphite:     #4A4A4A;
	--stone:        #6E6A5F;
	--border:       #E2DDD6;
	--border-light: #EDEBE7;
	--star:         #D4A853;

	--tr-tightest:  -0.02em;
	--tr-tight:     -0.01em;
	--tr-editorial: 0.08em;
	--tr-wide:      0.12em;
	--tr-widest:    0.16em;

	--dur-fast:   150ms;
	--dur-base:   200ms;
	--dur-slow:   500ms;
	--dur-slower: 700ms;
	--ease-brand: cubic-bezier(0.22, 0.61, 0.36, 1);

	background: var(--cream);
	color: var(--ink);
}

body.plp-page :focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: 3px;
}

/* Kill block-gap between the sticky site header and the PLP <main>.
 * WP's root layout adds `--wp--style--block-gap` between top-level
 * children of .wp-site-blocks — we don't want any breathing room
 * between the nav (sticky) and the subnav under it. */
body.plp-page .wp-site-blocks > main.plp-page,
body.plp-page .wp-site-blocks > .site-header + main { margin-top: 0 !important; }
body.plp-page .wp-site-blocks > .site-header { margin-bottom: 0 !important; }
body.plp-page main.plp-page > * { margin-top: 0 !important; margin-bottom: 0 !important; }

/* ============================================================
   ANNOUNCE BAR — glued to the site header (no block-gap above/below)
   ============================================================ */
.plp-page .wp-site-blocks > .announce-bar,
.plp-page .announce-bar {
	background: var(--ink); color: var(--cream);
	min-height: 36px;
	display: flex; align-items: center; justify-content: center; gap: 14px;
	font-size: 11px; font-weight: 400;
	text-transform: uppercase; letter-spacing: var(--tr-wide);
	padding: 8px 24px;
	margin: 0 !important;       /* override Ollie / FSE block-gap */
}
/* Kill the gap that WordPress's wp-site-blocks > * + * adds. */
.plp-page .wp-site-blocks > .announce-bar + header,
.plp-page .wp-site-blocks > .announce-bar + .site-header,
.plp-page .wp-site-blocks > .announce-bar + .wp-block-template-part {
	margin-top: 0 !important;
}
.plp-page .site-header { margin-top: 0 !important; }
.plp-page .announce-bar .dot {
	width: 6px; height: 6px; border-radius: 50%; background: var(--star);
	display: inline-block;
}
.plp-page .announce-bar .sep { color: rgba(255,255,255,0.4); }
.plp-page .announce-bar .cta {
	color: var(--cream); display: inline-flex; align-items: center; gap: 6px;
	border-bottom: 1px solid rgba(255,255,255,0.4); padding-bottom: 2px;
}

/* ============================================================
   SUBNAV — text tabs with 2px underline on active (V3 design)
   ============================================================ */
.plp-page .subnav {
	display: flex; align-items: stretch;
	height: 52px;
	padding: 0 80px;
	border-bottom: 1px solid rgba(26,26,26,0.08);
	overflow-x: auto;
	scrollbar-width: none;
	background: var(--cream);
}
.plp-page .subnav::-webkit-scrollbar { display: none; }
.plp-page .subnav .subnav-l { display: inline-flex; gap: 28px; align-items: stretch; }
.plp-page .subnav a {
	flex-shrink: 0;
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
	color: var(--graphite); font-weight: 400;
	white-space: nowrap;
	text-decoration: none;
	border: 0; padding: 0;
	position: relative;
	transition: color var(--dur-base) var(--ease-brand);
}
.plp-page .subnav a::after {
	content: ""; position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 2px; background: transparent;
	transition: background var(--dur-base) var(--ease-brand);
}
.plp-page .subnav a:hover { color: var(--ink); }
.plp-page .subnav a.on { color: var(--ink); font-weight: 500; }
.plp-page .subnav a.on::after { background: var(--ink); }
.plp-page .subnav a .n {
	font-size: 10px; color: var(--stone); font-weight: 300;
	margin-left: 2px;
	letter-spacing: 0.04em;
}
.plp-page .subnav a.on .n { color: var(--graphite); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.plp-page .plp-crumbs,
.plp-page .wp-block-woocommerce-breadcrumbs {
	padding: 22px 80px 0;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--stone); font-weight: 400;
}
.plp-page .wp-block-woocommerce-breadcrumbs a { color: var(--stone); text-decoration: none; }
.plp-page .wp-block-woocommerce-breadcrumbs a:hover { color: var(--ink); }

/* ============================================================
   INTRO
   ============================================================ */
.plp-page .plp-intro {
	display: grid; grid-template-columns: 1.3fr 1fr; gap: 80px;
	padding: 56px 80px 40px;
}
.plp-page .plp-intro .l .eyebrow {
	display: block; margin-bottom: 18px;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-widest);
	color: var(--stone); font-weight: 400;
}
.plp-page .plp-intro h1 {
	font-size: 52px; font-weight: 300; letter-spacing: var(--tr-tight);
	color: var(--ink); margin: 0; line-height: 1.05;
	text-transform: none;
}
.plp-page .plp-intro h1 em { font-style: normal; font-weight: 600; }
.plp-page .plp-intro .r { display: flex; flex-direction: column; gap: 28px; justify-content: flex-end; padding-bottom: 6px; }
.plp-page .plp-intro p {
	font-size: 15px; color: var(--graphite); font-weight: 300;
	line-height: 1.65; margin: 0; max-width: 460px;
}
.plp-page .plp-intro .meta {
	display: flex; gap: 24px; align-items: center;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--graphite); font-weight: 400;
}
.plp-page .plp-intro .meta b { color: var(--ink); font-weight: 500; margin-right: 4px; }
.plp-page .plp-intro.slim { padding: 36px 80px 28px; }
.plp-page .plp-intro.slim h1 { font-size: 44px; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.plp-page .filter-bar {
	display: flex; justify-content: space-between; align-items: center;
	padding: 22px 80px;
	border-bottom: 1px solid rgba(26,26,26,0.08);
	border-top: 1px solid rgba(26,26,26,0.08);
	background: rgba(250,248,245,0.95);
	position: sticky; top: 0; z-index: 10;
	backdrop-filter: blur(8px);
}
.plp-page .filter-bar .group { display: inline-flex; align-items: center; gap: 10px; }
.plp-page .filter-pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px;
	font-size: 11px; font-weight: 400; font-family: inherit;
	text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--ink); background: transparent;
	border: 1px solid rgba(26,26,26,0.18);
	cursor: pointer; text-decoration: none;
	transition: all var(--dur-base) var(--ease-brand);
}
.plp-page .filter-pill:hover { border-color: var(--ink); }
.plp-page .filter-pill.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.plp-page .filter-pill .count { font-size: 10px; color: var(--stone); font-weight: 300; }
.plp-page .filter-pill.on .count { color: rgba(255,255,255,0.6); }
.plp-page .toolbar-divider {
	display: inline-block; width: 1px; height: 18px;
	background: rgba(26,26,26,0.18); margin: 0 6px;
}
.plp-page .sort-trigger {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 11px; font-weight: 400; font-family: inherit;
	text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--ink); background: transparent; border: 0;
	cursor: pointer; padding: 6px 0;
}
.plp-page .sort-trigger b { font-weight: 500; }
.plp-page .sort-dropdown { position: relative; }
.plp-page .sort-dropdown[open] > .sort-trigger svg { transform: rotate(180deg); }
.plp-page .sort-dropdown .sort-menu {
	position: absolute; right: 0; top: calc(100% + 8px);
	min-width: 220px; background: var(--cream);
	border: 1px solid var(--border);
	list-style: none; padding: 6px 0; margin: 0;
	z-index: 30; box-shadow: 0 8px 24px rgba(20,18,14,0.08);
}
.plp-page .sort-dropdown .sort-menu li { margin: 0; }
.plp-page .sort-dropdown .sort-menu a {
	display: block; padding: 10px 16px;
	font-size: 12px; color: var(--ink); text-decoration: none;
	text-transform: uppercase; letter-spacing: var(--tr-editorial);
}
.plp-page .sort-dropdown .sort-menu a:hover,
.plp-page .sort-dropdown .sort-menu a.on { background: var(--ivory); }

/* ============================================================
   GRID + PRODUCT CARD
   ============================================================ */
.plp-page .grid-wrap { padding: 32px 80px 80px; }
.plp-page .grid-4,
.plp-page .grid-wrap .wp-block-woocommerce-product-collection,
.plp-page .grid-wrap .wc-block-product-template {
	display: grid; grid-template-columns: repeat(4, 1fr);
	gap: 44px 24px; list-style: none; padding: 0; margin: 0;
}
.plp-page .grid-4 > * { list-style: none; }

.plp-page .pcard {
	display: block; position: relative; text-decoration: none; color: inherit;
}
.plp-page .pcard .img {
	position: relative; aspect-ratio: 4/5; background: var(--sand);
	margin-bottom: 16px; overflow: hidden;
}
.plp-page .pcard .img img {
	width: 100%; height: 100%; object-fit: cover;
	transition: transform var(--dur-slow) var(--ease-brand);
}
.plp-page .pcard:hover .img img { transform: scale(1.02); }

.plp-page .pcard .badge {
	position: absolute; top: 14px; left: 14px;
	padding: 5px 10px; font-size: 10px; font-weight: 500;
	text-transform: uppercase; letter-spacing: var(--tr-wide);
	background: var(--cream); color: var(--ink);
	border: 1px solid var(--ink);
	z-index: 2;
}
.plp-page .pcard .badge.alt { background: var(--ink); color: var(--cream); }

.plp-page .pcard .fav {
	position: absolute; top: 12px; right: 12px;
	width: 36px; height: 36px;
	background: rgba(250,248,245,0.85);
	border: 0; cursor: pointer; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--ink);
	opacity: 0; transition: opacity var(--dur-base) var(--ease-brand);
	z-index: 2;
}
.plp-page .pcard:hover .fav,
.plp-page .pcard .fav:focus-visible { opacity: 1; }

.plp-page .pcard .quick {
	position: absolute; bottom: 14px; left: 14px; right: 14px;
	padding: 12px 14px; background: var(--ink); color: #fff;
	border: 0; cursor: pointer; font-family: inherit;
	font-size: 11px; font-weight: 500;
	text-transform: uppercase; letter-spacing: var(--tr-wide);
	opacity: 0; transform: translateY(6px);
	transition: opacity var(--dur-base) var(--ease-brand), transform var(--dur-base) var(--ease-brand);
	z-index: 2;
}
.plp-page .pcard:hover .quick { opacity: 1; transform: translateY(0); }

.plp-page .pcard .footer {
	display: flex; justify-content: space-between; align-items: flex-start;
	gap: 12px;
}
.plp-page .pcard .name {
	font-size: 14px; font-weight: 400; color: var(--ink);
	letter-spacing: var(--tr-tightest);
	text-transform: none;
}
.plp-page .pcard .meta {
	font-size: 11px; color: var(--stone); font-weight: 300;
	margin-top: 4px; letter-spacing: 0.02em;
}
.plp-page .pcard .price {
	font-size: 14px; font-weight: 400; color: var(--ink);
	letter-spacing: var(--tr-tight); text-align: right;
	white-space: nowrap;
}
.plp-page .pcard .price del,
.plp-page .pcard .price .was {
	color: var(--stone); font-weight: 300; margin-right: 6px;
	text-decoration: line-through;
}
.plp-page .pcard .swatches {
	display: inline-flex; gap: 6px; align-items: center;
	margin-top: 10px;
}
.plp-page .pcard .swatches .sw {
	width: 14px; height: 14px; border-radius: 50%;
	display: inline-block;
	box-shadow: inset 0 0 0 1px rgba(26,26,26,0.06);
}
.plp-page .pcard .swatches .sw.on {
	outline: 1px solid var(--ink); outline-offset: 2px;
}
.plp-page .pcard .swatches .more {
	font-size: 10px; color: var(--stone); font-weight: 300;
	margin-left: 2px;
}

/* ============================================================
   EDITORIAL TILE
   ============================================================ */
.plp-page .ed-tile {
	position: relative; overflow: hidden; aspect-ratio: 4/5;
	display: flex; flex-direction: column; justify-content: flex-end;
	padding: 24px; color: #fff; text-decoration: none;
}
.plp-page .ed-tile.pos-span-2 { grid-column: span 2; aspect-ratio: 16/9; }
.plp-page .ed-tile.pos-full-row { grid-column: 1 / -1; aspect-ratio: 24/9; }
.plp-page .ed-tile img {
	position: absolute; inset: 0;
	width: 100%; height: 100%; object-fit: cover;
	transition: transform var(--dur-slower) var(--ease-brand);
}
.plp-page .ed-tile:hover img { transform: scale(1.03); }
.plp-page .ed-tile .veil {
	position: absolute; inset: 0;
	background: linear-gradient(0deg, rgba(20,18,14,0.55), rgba(20,18,14,0) 60%);
}
.plp-page .ed-tile .copy { position: relative; z-index: 1; max-width: 380px; }
.plp-page .ed-tile .eyebrow {
	display: block; margin-bottom: 10px;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-widest);
	color: rgba(255,255,255,0.85); font-weight: 400;
}
.plp-page .ed-tile h3 {
	font-size: 24px; font-weight: 300; letter-spacing: -0.005em;
	margin: 0 0 14px; line-height: 1.18; color: #fff;
	text-transform: none;
}
.plp-page .ed-tile h3 em { font-style: normal; font-weight: 600; }
.plp-page .ed-tile .cta {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	font-weight: 500;
	border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 3px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.plp-page .pagination {
	padding: 32px 80px 96px;
	display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.plp-page .pagination .seen {
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--stone); font-weight: 400;
}
.plp-page .pagination .seen b { color: var(--ink); font-weight: 500; }
.plp-page .pagination .progress-line {
	width: 280px; height: 2px;
	background: rgba(26,26,26,0.12);
}
.plp-page .pagination .progress-line > span { display: block; height: 100%; background: var(--ink); }
.plp-page .pagination .btn-load {
	display: inline-flex; align-items: center; gap: 10px;
	padding: 14px 32px;
	font-size: 11px; font-weight: 500; font-family: inherit;
	text-transform: uppercase; letter-spacing: var(--tr-widest);
	background: transparent; border: 1px solid var(--ink);
	color: var(--ink); text-decoration: none;
	transition: all var(--dur-base) var(--ease-brand);
}
.plp-page .pagination .btn-load:hover { background: var(--ink); color: #fff; }

/* ============================================================
   HELP STRIP
   ============================================================ */
.plp-page .help-strip {
	display: grid; grid-template-columns: 1fr 1fr 1fr;
	background: var(--ivory);
	border-top: 1px solid rgba(26,26,26,0.08);
	border-bottom: 1px solid rgba(26,26,26,0.08);
}
.plp-page .help-strip .cell {
	padding: 36px;
	display: flex; flex-direction: column; gap: 8px;
	border-right: 1px solid rgba(26,26,26,0.06);
}
.plp-page .help-strip .cell:last-child { border-right: 0; }
.plp-page .help-strip .eyebrow {
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--stone); font-weight: 400;
}
.plp-page .help-strip .ttl { font-size: 17px; color: var(--ink); font-weight: 400; }
.plp-page .help-strip .lnk {
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--ink); font-weight: 500;
	border-bottom: 1px solid currentColor; padding-bottom: 2px;
	align-self: flex-start; margin-top: 8px;
	display: inline-flex; gap: 6px; text-decoration: none;
}

/* ============================================================
   FILTER DRAWER (desktop right + mobile bottom sheet)
   ============================================================ */
.plp-page .filter-drawer-host {
	position: fixed; inset: 0;
	z-index: 100;
	pointer-events: none; visibility: hidden;
}
.plp-page .filter-drawer-host.is-open { pointer-events: auto; visibility: visible; }
.plp-page .filter-drawer-host .drawer-backdrop {
	position: absolute; inset: 0;
	background: rgba(20,18,14,0.42);
	opacity: 0; transition: opacity var(--dur-base) var(--ease-brand);
}
.plp-page .filter-drawer-host.is-open .drawer-backdrop { opacity: 1; }

/* Westwing-style: desktop side drawer keeps the grid visible behind.
 * Very light cream wash, NOT a heavy dark overlay — the user filters
 * live and watches the grid update on the left. */
@media (min-width: 769px) {
	.plp-page .filter-drawer-host[data-side="right"] .drawer-backdrop {
		background: rgba(250,248,245,0.4);
	}
	/* Pin the drawer to the visible viewport, not the page top, so it
	 * stays in view while the user scrolls through filtered results. */
	.plp-page .filter-drawer-host[data-side="right"] {
		position: fixed;
	}
}
.plp-page .filter-drawer {
	position: absolute; top: 0; right: 0; bottom: 0;
	width: 480px; max-width: 100vw;
	background: var(--cream);
	display: flex; flex-direction: column;
	transform: translateX(100%);
	transition: transform var(--dur-slow) var(--ease-brand);
	box-shadow: -24px 0 60px rgba(20,18,14,0.18);
}
.plp-page .filter-drawer-host.is-open .filter-drawer { transform: translateX(0); }

.plp-page .filter-drawer > header {
	display: flex; align-items: flex-start; justify-content: space-between;
	padding: 28px 36px 22px;
	border-bottom: 1px solid rgba(26,26,26,0.10);
}
.plp-page .filter-drawer > header .t h2 {
	font-size: 22px; font-weight: 400; margin: 0;
	letter-spacing: -0.005em; color: var(--ink); line-height: 1.2;
	text-transform: none;
}
.plp-page .filter-drawer > header .t .sub {
	display: block; margin-top: 4px;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--stone); font-weight: 400;
}
.plp-page .filter-drawer > header .close {
	width: 36px; height: 36px;
	background: transparent; border: 1px solid rgba(26,26,26,0.15);
	display: inline-flex; align-items: center; justify-content: center;
	color: var(--ink); cursor: pointer;
	transition: all var(--dur-base) var(--ease-brand);
	flex-shrink: 0;
}
.plp-page .filter-drawer > header .close:hover { border-color: var(--ink); background: var(--ink); color: #fff; }

.plp-page .filter-drawer .active-chips.inside {
	padding: 16px 36px;
	border-bottom: 1px solid rgba(26,26,26,0.06);
	background: var(--ivory);
	display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.plp-page .chip {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 7px 12px;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-editorial);
	color: var(--ink); background: transparent;
	border: 1px solid rgba(26,26,26,0.2);
	text-decoration: none;
}
.plp-page .chip .x { color: var(--stone); margin-left: 4px; }
.plp-page .chip-clear {
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--stone); font-weight: 400;
	background: transparent; border: 0; cursor: pointer;
	text-decoration: underline; text-underline-offset: 3px;
	font-family: inherit;
}

.plp-page .filter-drawer .drawer-body {
	flex: 1; overflow-y: auto;
	padding: 8px 36px 24px;
	border: 0; margin: 0;
}

.plp-page .filter-group {
	border-bottom: 1px solid rgba(26,26,26,0.08);
	padding: 18px 0;
}
.plp-page .filter-group:last-of-type { border-bottom: 0; }
.plp-page .filter-group summary {
	list-style: none; cursor: pointer;
	display: flex; align-items: center; justify-content: space-between;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-wide);
	color: var(--ink); font-weight: 500; padding: 4px 0;
}
.plp-page .filter-group summary::-webkit-details-marker { display: none; }
.plp-page .filter-group summary > span:first-child {
	display: inline-flex; align-items: center; gap: 10px;
}
.plp-page .filter-group summary .g-count {
	background: var(--ink); color: #fff;
	font-size: 10px; font-weight: 500;
	padding: 2px 7px; letter-spacing: 0.04em;
}
.plp-page .filter-group summary svg {
	color: var(--stone);
	transition: transform var(--dur-base);
}
.plp-page .filter-group[open] summary svg { transform: rotate(180deg); }
.plp-page .filter-group .body {
	padding-top: 14px;
	display: flex; flex-direction: column; gap: 10px;
}

.plp-page .f-check {
	display: inline-flex; align-items: center; gap: 12px;
	font-size: 13px; color: var(--ink); font-weight: 300;
	cursor: pointer; text-decoration: none;
	background: transparent; border: 0; padding: 4px 0;
	font-family: inherit; text-align: left; width: 100%;
}
.plp-page .f-check .lbl { flex: 1; }
.plp-page .f-check .box {
	width: 16px; height: 16px;
	border: 1px solid rgba(26,26,26,0.3); background: var(--white);
	flex-shrink: 0;
	position: relative;
}
.plp-page .f-check.on .box { background: var(--ink); border-color: var(--ink); }
.plp-page .f-check.on .box::after {
	content: ""; position: absolute; left: 4px; top: 1px;
	width: 5px; height: 9px; border: solid #fff;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}
.plp-page .f-check .n {
	margin-left: auto; font-size: 11px; color: var(--stone); font-weight: 300;
}

.plp-page .f-swatches {
	display: flex; flex-wrap: wrap; gap: 10px;
}
.plp-page .f-swatch {
	width: 28px; height: 28px; border-radius: 50%;
	display: inline-block; cursor: pointer;
	box-shadow: inset 0 0 0 1px rgba(26,26,26,0.08);
	border: 0; padding: 0;
}
.plp-page .f-swatch.on {
	outline: 1px solid var(--ink); outline-offset: 3px;
}

/* Loading state for grid during fetch+swap */
.plp-page[data-plp-loading="1"] .grid-4 { pointer-events: none; }
html[data-plp-loading="1"] { cursor: progress; }

.plp-page .f-range .range-track {
	position: relative; height: 4px;
	background: rgba(26,26,26,0.12);
	margin: 18px 8px;
}
.plp-page .f-range .range-fill {
	position: absolute; top: 0; bottom: 0;
	background: var(--ink);
}
.plp-page .f-range .range-thumb {
	position: absolute; top: 50%; transform: translate(-50%, -50%);
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--cream); border: 2px solid var(--ink);
	cursor: grab; padding: 0;
}
.plp-page .f-range .range-thumb:active { cursor: grabbing; }
.plp-page .f-range .range-vals {
	display: flex; justify-content: space-between;
	font-size: 11px; color: var(--stone); margin: 8px 0;
	text-transform: uppercase; letter-spacing: var(--tr-editorial);
}
/* range-vals now act as live thumb labels — bigger, ink, tracking-tight */
.plp-page .f-range .range-vals {
	font-size: 13px; color: var(--ink); font-weight: 400;
	letter-spacing: var(--tr-tight);
	text-transform: none;
	margin-top: 10px;
}
.plp-page .f-range .range-input input::-webkit-outer-spin-button,
.plp-page .f-range .range-input input::-webkit-inner-spin-button {
	-webkit-appearance: none; margin: 0;
}
.plp-page .f-range .range-input:focus-within { border-color: var(--ink); }

.plp-page .filter-drawer > footer {
	display: grid; grid-template-columns: 1fr 1.2fr;
	gap: 12px;
	padding: 20px 36px;
	border-top: 1px solid rgba(26,26,26,0.12);
	background: var(--cream);
}
.plp-page .drawer-clear,
.plp-page .drawer-apply {
	height: 52px; border: 0; cursor: pointer;
	/* Match the canonical design-system button (theme.json button element):
	   0.8125rem / 0.12em, not the previous 11px / 0.16em. */
	font-size: 0.8125rem; text-transform: uppercase; letter-spacing: var(--tr-wide);
	font-weight: 500; font-family: inherit;
	display: inline-flex; align-items: center; justify-content: center;
	gap: 10px; text-decoration: none; white-space: nowrap;
	transition: background var(--dur-base) var(--ease-brand), border-color var(--dur-base) var(--ease-brand);
}
.plp-page .drawer-apply:hover { background: var(--graphite); }
.plp-page .drawer-clear {
	background: transparent; color: var(--ink);
	border: 1px solid rgba(26,26,26,0.2);
}
.plp-page .drawer-clear:hover { border-color: var(--ink); }
.plp-page .drawer-apply { background: var(--ink); color: #fff; }
.plp-page .drawer-apply b { font-weight: 600; margin: 0 2px; }

/* Bottom sheet (mobile) variant */
.plp-page .filter-drawer.bottom-sheet {
	top: auto; right: 0; bottom: 0; left: 0;
	width: auto; height: 88dvh;
	transform: translateY(100%);
	border-radius: 16px 16px 0 0;
	box-shadow: 0 -12px 40px rgba(20,18,14,0.2);
}
.plp-page .filter-drawer-host.is-open .filter-drawer.bottom-sheet { transform: translateY(0); }
/* Mobile sheet: stack the footer actions full-width so the longer Polish labels
   ("Wyczyść wszystko" / "Pokaż N wyników") never overflow the row at the
   design-system 13px button size. */
.plp-page .filter-drawer.bottom-sheet > footer { grid-template-columns: 1fr; }
.plp-page .filter-drawer .m-sheet-grab {
	width: 38px; height: 4px;
	background: rgba(26,26,26,0.2); border-radius: 2px;
	margin: 8px auto 0;
}

/* Hide desktop drawer on small viewports; hide mobile sheet on large */
@media (max-width: 768px) {
	.plp-page .filter-drawer-host[data-side="right"] { display: none; }
}
@media (min-width: 769px) {
	.plp-page .filter-drawer-host[data-side="bottom-sheet"] { display: none; }
}

/* ============================================================
   MOBILE STICKY BAR
   ============================================================ */
.plp-page .m-sticky-bar {
	position: fixed;
	left: 16px; right: 16px; bottom: 16px;
	display: grid; grid-template-columns: 1.5fr 1fr;
	gap: 8px;
	z-index: 30;
}
.plp-page .m-sticky-btn {
	height: 48px;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	font-size: 11px; text-transform: uppercase; letter-spacing: var(--tr-widest);
	font-weight: 500; font-family: inherit; cursor: pointer;
	background: var(--cream); border: 1px solid rgba(26,26,26,0.2);
	color: var(--ink);
	box-shadow: 0 6px 18px rgba(20,18,14,0.12);
}
.plp-page .m-sticky-btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.plp-page .m-sticky-btn .b {
	background: rgba(255,255,255,0.18); color: #fff;
	padding: 2px 7px; font-size: 10px;
	margin-left: 2px;
}
@media (min-width: 769px) {
	.plp-page .m-sticky-bar { display: none; }
}

/* ============================================================
   RWD — 1024 / 768 / 390
   ============================================================ */
@media (max-width: 1200px) {
	.plp-page .subnav,
	.plp-page .wp-block-woocommerce-breadcrumbs,
	.plp-page .plp-intro,
	.plp-page .filter-bar,
	.plp-page .grid-wrap,
	.plp-page .pagination { padding-left: 48px; padding-right: 48px; }
	.plp-page .plp-intro h1 { font-size: 42px; }
	.plp-page .grid-4 { gap: 36px 18px; }
}
@media (max-width: 1024px) {
	.plp-page .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
	.plp-page .subnav,
	.plp-page .wp-block-woocommerce-breadcrumbs,
	.plp-page .plp-intro,
	.plp-page .filter-bar,
	.plp-page .grid-wrap,
	.plp-page .pagination,
	.plp-page .announce-bar { padding-left: 20px; padding-right: 20px; }
	.plp-page .plp-intro { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; padding-bottom: 24px; }
	.plp-page .plp-intro h1 { font-size: 36px; }
	/* The inline filter-bar (category pills + sort-trigger) is redundant on
	   mobile and its wrapping chips overlap the sort-trigger and the product
	   grid. The fixed bottom FILTRY/SORTUJ sheet already owns filtering and
	   sorting here, so hide the inline bar entirely. */
	.plp-page .filter-bar { display: none; }
	/* Contain the subnav chips inside their own scroller so they can't push the
	   page wider than the viewport (horizontal-overflow fix). */
	.plp-page .subnav .subnav-l { width: 100%; }
	.plp-page .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 28px 14px; }
	.plp-page .help-strip { grid-template-columns: 1fr; }
	.plp-page .help-strip .cell { border-right: 0; border-bottom: 1px solid rgba(26,26,26,0.06); }
	.plp-page .help-strip .cell:last-child { border-bottom: 0; }
	.plp-page .pagination { padding-bottom: 120px; } /* room for sticky bar */
	.plp-page .pcard .fav { opacity: 1; }
	.plp-page .pcard .quick { display: none; }
	.plp-page .ed-tile.pos-span-2 { aspect-ratio: 16/9; }
}
@media (max-width: 480px) {
	.plp-page .plp-intro h1 { font-size: 30px; }
	/* Single product per row on phones — the 2-up grid is too cramped here. */
	.plp-page .grid-4 { grid-template-columns: 1fr; gap: 28px; }
}
