/* THEFLOW shop filters: quick picks, dropdown bar, active chips; bottom sheet on phones.
   2026-10-12: pills and phone shortcuts made compact (32px, 11px caps, 14px swatches) to match the occasion pages. */

.tf-f {
	--tf-gold: var(--tf-accent, #95774d); /* bronze accents (buttons use the beige --btn-accented-bgcolor) */
	--tf-ink: #1f1f1f;
	--tf-muted: #6b6b6b;
	--tf-line: #e3ddd5;
	--tf-tint: #fbf8f4;
	--tf-caps: var(--tf-label-font, "TF Tenor Sans", Georgia, serif); /* labels; buttons use --tf-head-font */
	--tf-serif: var(--wd-text-font, "Lora"), Georgia, serif;
	position: relative;
	z-index: 20;
	margin: 0;
	font-family: var(--tf-serif);
}

/* The theme prints the shop head as a flex row; the bar takes its own full-width line under it. */
.woodmart-archive-shop .shop-loop-head {
	flex-wrap: wrap;
	margin-bottom: 20px;
}
.shop-loop-head .wd-shop-tools:has(> .tf-f) {
	display: block;
	flex: 0 0 100%;
	order: 5;
	max-width: 100%;
	margin-top: 0;
}

/* Category intro: title and subtitle share one line, each kept to a single line (the full text
   stays in the page; a long intro is cut with "…"). */
.woodmart-archive-shop .wd-content-area > .term-description {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 18px;
	margin-bottom: 16px;
}
.woodmart-archive-shop .wd-content-area > .term-description > * {
	flex: 0 0 100%;
	margin: 0;
}
.woodmart-archive-shop .wd-content-area > .term-description > :is(h2, p) {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.woodmart-archive-shop .wd-content-area > .term-description > h2 {
	flex: 0 1 auto;
	max-width: 100%;
	font-size: 20px;
	line-height: 1.3;
}
.woodmart-archive-shop .wd-content-area > .term-description > h2 + p {
	flex: 1 1 0;
	min-width: 0;
	font-size: 14px;
	color: var(--wd-text-color, #6b6b6b);
}
@media (max-width: 767px) {
	.woodmart-archive-shop .wd-content-area > .term-description > h2 {
		font-size: 17px;
	}
	.woodmart-archive-shop .wd-content-area > .term-description > h2 + p {
		flex: 0 0 100%;
		font-size: 13px;
	}
}

/* Theme tools that the bar replaces. */
.woodmart-archive-shop .shop-loop-head .wd-show-sidebar-btn,
.woodmart-archive-shop .shop-loop-head .wd-products-per-page,
.woodmart-archive-shop .shop-loop-head .wd-products-shop-view,
.woodmart-archive-shop .shop-loop-head .woocommerce-ordering,
.woodmart-archive-shop .shop-loop-head .woocommerce-result-count,
.woodmart-archive-shop .wd-content-area > .wd-active-filters {
	display: none !important; /* our chips show what is selected */
}

/* ---------- Quick picks ---------- */

.tf-f__quick {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}
.tf-f .tf-f__pill {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 14px;
	border-radius: 16px;
	background: #f4f0ea;
	color: var(--tf-ink);
	font-family: var(--tf-caps);
	font-size: 11px;
	letter-spacing: .12em;
	text-transform: uppercase;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease;
}
.tf-f .tf-f__pill:hover {
	background: #ebe4da;
	color: var(--tf-ink);
}
.tf-f .tf-f__pill.is-on {
	background: var(--tf-gold);
	color: #fff;
}

/* A facet shown as picks above isn't repeated in the bar (desktop) or the shortcuts row (phone);
   the phone's Filters sheet still lists it. */
@media (min-width: 1025px) {
	.tf-f .tf-f__drop.is-picked {
		display: none;
	}
}
.tf-f .tf-f__shortcut.is-picked {
	display: none !important;
}

/* Category picks: "How many" roses and the colours there are, one tap each. */
.tf-f__picks {
	display: grid;
	gap: 10px;
	margin: 0 0 14px;
}
.tf-f__pickrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.tf-f__picklabel {
	flex: 0 0 84px;
	font-family: var(--tf-caps);
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tf-muted);
}
.tf-f .tf-f__pill--color {
	gap: 7px;
	padding-left: 9px;
}
.tf-f .tf-f__pill--color .tf-f__swatch {
	width: 14px;
	height: 14px;
}
.tf-f .tf-f__pill--color.is-on .tf-f__swatch {
	box-shadow: 0 0 0 2px #fff;
}

/* ---------- Bar: text facets with hairline dividers ---------- */

.tf-f__bar {
	display: flex;
	align-items: center;
	gap: 0;
	min-height: 56px;
	border-bottom: 1px solid var(--tf-line);
}
.tf-f__facets {
	display: flex;
	align-items: center;
}
.tf-f__drop {
	position: relative;
}
.tf-f__facets > .tf-f__drop + .tf-f__drop::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	width: 1px;
	height: 16px;
	margin-top: -8px;
	background: var(--tf-line);
}
.tf-f .tf-f__btn,
.tf-f .tf-f__open {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 56px;
	min-height: 0;
	padding: 0 20px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--tf-ink);
	font-family: var(--tf-caps);
	font-size: 12.5px;
	font-weight: 400;
	-webkit-text-stroke: 0;
	letter-spacing: 0;
	text-transform: uppercase;
	cursor: pointer;
	transition: color .18s ease;
}
.tf-f__facets > .tf-f__drop:first-child > .tf-f__btn {
	padding-left: 0;
}
.tf-f .tf-f__btn:hover,
.tf-f .tf-f__btn[aria-expanded="true"],
.tf-f .tf-f__open:hover {
	background: none;
	color: var(--tf-gold);
}
.tf-f .tf-f__btn.is-on {
	background: none;
	color: var(--tf-gold);
}
.tf-f__btn[aria-expanded="true"]::after {
	content: "";
	position: absolute;
	right: 20px;
	bottom: -1px;
	left: 20px;
	height: 1px;
	background: var(--tf-gold);
}
.tf-f__facets > .tf-f__drop:first-child > .tf-f__btn[aria-expanded="true"]::after {
	left: 0;
}
.tf-f__chev {
	width: 13px;
	height: 13px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .2s ease;
}
.tf-f__btn[aria-expanded="true"] .tf-f__chev {
	transform: rotate(180deg);
}
.tf-f__badge {
	display: inline-grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--tf-gold);
	color: #fff;
	font-family: var(--tf-serif);
	font-size: 11px;
	line-height: 1;
}
.tf-f__count {
	margin-left: auto;
	padding-right: 20px;
	font-size: 13px;
	font-style: italic;
	color: var(--tf-muted);
	white-space: nowrap;
}
.tf-f__drop--sort {
	padding-left: 20px;
	border-left: 1px solid var(--tf-line);
}
.tf-f .tf-f__btn--sort {
	padding-right: 0;
}
.tf-f__drop--sort .tf-f__btn[aria-expanded="true"]::after {
	right: 0;
	left: 0;
}
.tf-f__sort-label {
	color: var(--tf-muted);
}

/* Dropdown panel */
.tf-f__panel {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 30;
	display: none;
	width: max-content;
	min-width: 250px;
	max-width: 340px;
	max-height: 380px;
	padding: 12px;
	overflow: auto;
	border: 0;
	border-radius: 0 0 8px 8px;
	background: #fff;
	box-shadow: 0 24px 48px -20px rgba(40, 30, 20, .28), 0 0 0 1px rgba(40, 30, 20, .04);
}
.tf-f__panel--right {
	right: 0;
	left: auto;
}
.tf-f__drop.is-open > .tf-f__panel {
	display: block;
	animation: tf-f-in .18s ease;
}
@keyframes tf-f-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: none; }
}
.tf-f__drop--color .tf-f__panel {
	min-width: 320px;
}
.tf-f__drop--color .tf-f__list {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 6px;
}
.tf-f__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.tf-f__list li {
	margin: 0;
}
.tf-f .tf-f__opt {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 9px 10px;
	border-radius: 6px;
	color: var(--tf-ink);
	font-size: 14px;
	line-height: 1.3;
	transition: background-color .15s ease;
}
.tf-f .tf-f__opt:hover {
	background: #f7f3ee;
	color: var(--tf-ink);
}
.tf-f .tf-f__opt.is-empty {
	color: #bdb6ad;
	pointer-events: none;
}
.tf-f__name {
	flex: 1;
}
.tf-f__n {
	font-size: 12px;
	color: #a39a90;
}
.tf-f__box {
	position: relative;
	flex: none;
	width: 16px;
	height: 16px;
	border: 1px solid #cdc4b8;
	border-radius: 3px;
	background: #fff;
	transition: background-color .15s ease, border-color .15s ease;
}
.tf-f__opt.is-on .tf-f__box {
	border-color: var(--tf-gold);
	background: var(--tf-gold);
}
.tf-f__opt.is-on .tf-f__box::after {
	content: "";
	position: absolute;
	top: 2px;
	left: 5px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}
.tf-f__drop--price .tf-f__box {
	border-radius: 50%;
}
.tf-f__drop--price .tf-f__opt.is-on .tf-f__box::after {
	top: 4px;
	left: 4px;
	width: 6px;
	height: 6px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	transform: none;
}
.tf-f__swatch {
	flex: none;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.tf-f__opt.is-on .tf-f__swatch {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--tf-gold);
}
.tf-f .tf-f__opt--sort.is-on {
	color: var(--tf-gold);
}
.tf-f .tf-f__search {
	width: 100%;
	height: 38px;
	margin: 0 0 8px;
	padding: 0 12px;
	border: 1px solid var(--tf-line);
	border-radius: 6px;
	background: #fbf9f6;
	font-size: 14px;
}

/* Flowers: small round pictures with the name under them. */
.tf-f__drop--flower .tf-f__panel {
	width: 452px;
	max-width: 452px;
	max-height: 420px;
}
.tf-f__drop--flower .tf-f__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 4px;
}
.tf-f .tf-f__drop--flower .tf-f__opt {
	flex-direction: column;
	gap: 6px;
	padding: 10px 4px 8px;
	text-align: center;
}
.tf-f__drop--flower .tf-f__box {
	display: none;
}
.tf-f__pic {
	display: block;
	width: 58px;
	height: 58px;
	overflow: hidden;
	border-radius: 50%;
	background: #f3eee7;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .05);
	transition: box-shadow .15s ease, transform .2s ease;
}
.tf-f__pic img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}
.tf-f__drop--flower .tf-f__opt:hover .tf-f__pic {
	transform: scale(1.04);
}
.tf-f__drop--flower .tf-f__opt.is-on .tf-f__pic {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--tf-gold);
}
.tf-f__drop--flower .tf-f__name {
	flex: none;
	max-width: 100%;
	font-size: 12.5px;
	line-height: 1.25;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.tf-f__drop--flower .tf-f__n {
	font-size: 11px;
}
.tf-f__drop--flower .tf-f__opt.is-on .tf-f__name {
	color: var(--tf-gold);
}

/* ---------- Active chips ---------- */

.tf-f__active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding-top: 14px;
}
.tf-f .tf-f__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 30px;
	padding: 0 10px 0 14px;
	border: 1px solid var(--tf-gold);
	border-radius: 15px;
	background: #fff;
	color: var(--tf-ink);
	font-size: 13px;
	transition: background-color .15s ease;
}
.tf-f .tf-f__chip span {
	color: var(--tf-gold);
	font-size: 15px;
	line-height: 1;
}
.tf-f .tf-f__chip:hover {
	background: #fbf8f4;
	color: var(--tf-ink);
}
.tf-f .tf-f__clear {
	margin-left: 6px;
	font-size: 13px;
	color: var(--tf-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Sheet (phones) ---------- */

.tf-f__open,
.tf-f__sheet-head,
.tf-f__sheet-foot,
.tf-f__shortcuts {
	display: none !important;
}
.tf-f__sheet {
	display: contents; /* desktop: the facets sit inline in the bar */
}

/* Loading state while the next page of results is fetched. */
.wd-content-area.tf-f-loading .products {
	opacity: .45;
	transition: opacity .2s ease;
	pointer-events: none;
}

@media (max-width: 1024px) {
	.tf-f__pickrow {
		flex-wrap: nowrap;
		margin-right: -15px;
		padding-right: 15px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.tf-f__pickrow::-webkit-scrollbar {
		display: none;
	}
	.tf-f__picklabel {
		flex-basis: auto;
		margin-right: 4px;
	}
	.tf-f__quick {
		flex-wrap: nowrap;
		margin-right: -15px;
		padding-right: 15px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.tf-f__quick::-webkit-scrollbar {
		display: none;
	}
	/* Phones: each facet button opens the filter sheet itself, so there is no separate "Filters" button. */
	.tf-f__shortcuts {
		display: flex !important;
		gap: 8px;
		margin: 0 -15px 12px 0;
		padding-right: 15px;
		overflow-x: auto;
		scrollbar-width: none;
	}
	.tf-f__shortcuts::-webkit-scrollbar {
		display: none;
	}
	.tf-f .tf-f__shortcut,
	.tf-f .tf-f__open {
		flex: none;
		height: 32px;
		padding: 0 12px;
		border: 1px solid var(--tf-line);
		border-radius: 16px;
		background: #fff;
		font-size: 11px;
		letter-spacing: .1em;
	}
	.tf-f .tf-f__shortcut.is-on {
		border-color: var(--tf-gold);
		color: var(--tf-gold);
	}
	.tf-f__bar {
		min-height: 52px;
		gap: 12px;
	}
	/* Phones: the sort on the left edge, "41 designs" on the right, no divider. */
	.tf-f__drop--sort {
		order: -1;
		padding-left: 0;
		border-left: 0;
	}
	.tf-f__drop--sort .tf-f__panel--right {
		right: auto;
		left: 0;
	}
	.tf-f .tf-f__btn--sort {
		height: 52px;
		padding-left: 0;
	}
	.tf-f__count {
		margin-left: auto;
		padding-right: 0;
	}
	.tf-f__sheet .tf-f__drop::before,
	.tf-f__sheet .tf-f__btn::after {
		display: none;
	}
	.tf-f__sheet .tf-f__btn:hover,
	.tf-f__sheet .tf-f__btn[aria-expanded="true"] {
		color: var(--tf-ink);
	}
	.tf-f__open svg {
		width: 16px;
		height: 16px;
		fill: none;
		stroke: currentColor;
		stroke-width: 1.6;
		stroke-linecap: round;
	}
	.tf-f__sheet {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 9999;
		display: flex;
		flex-direction: column;
		max-height: 86vh;
		border-radius: 12px 12px 0 0;
		background: #fff;
		box-shadow: 0 -16px 40px rgba(0, 0, 0, .18);
		transform: translateY(105%);
		transition: transform .3s ease;
	}
	.tf-f.is-sheet-open .tf-f__sheet {
		transform: none;
	}
	.tf-f.is-sheet-open,
	.shop-loop-head:has(.tf-f.is-sheet-open),
	.wd-shop-tools:has(.tf-f.is-sheet-open) {
		z-index: 100000; /* above the sticky header and the bottom toolbar */
	}
	.tf-f.is-sheet-open::before {
		content: "";
		position: fixed;
		inset: 0;
		z-index: 9998;
		background: rgba(20, 16, 12, .45);
	}
	.tf-f__sheet-head {
		display: flex !important;
		align-items: center;
		justify-content: space-between;
		padding: 16px 18px;
		border-bottom: 1px solid var(--tf-line);
		font-family: var(--tf-caps);
		font-size: 14px;
		text-transform: uppercase;
	}
	.tf-f .tf-f__close {
		width: 32px;
		height: 32px;
		min-height: 0;
		padding: 0;
		border: 0;
		background: none;
		box-shadow: none;
		color: var(--tf-ink);
		font-size: 26px;
		line-height: 1;
	}
	.tf-f__facets {
		display: block;
		flex: 1;
		padding: 4px 18px;
		overflow: auto;
	}
	.tf-f__sheet .tf-f__drop {
		border-bottom: 1px solid var(--tf-line);
	}
	.tf-f__sheet .tf-f__btn {
		justify-content: space-between;
		width: 100%;
		height: 52px;
		padding: 0;
		border: 0;
		background: none;
	}
	.tf-f__sheet .tf-f__btn.is-on {
		background: none;
	}
	.tf-f__sheet .tf-f__btn .tf-f__chev {
		margin-left: auto;
	}
	.tf-f__sheet .tf-f__drop--flower .tf-f__panel {
		width: auto;
	}
	.tf-f__sheet .tf-f__pic {
		width: 52px;
		height: 52px;
	}
	.tf-f__sheet .tf-f__drop--flower .tf-f__name {
		font-size: 11px;
		letter-spacing: -.01em;
		overflow-wrap: normal;
	}
	.tf-f__sheet .tf-f__panel {
		position: static;
		width: auto;
		max-width: none;
		max-height: none;
		padding: 0 0 12px;
		border: 0;
		box-shadow: none;
	}
	.tf-f__sheet-foot {
		display: flex !important;
		align-items: center;
		gap: 16px;
		padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
		border-top: 1px solid var(--tf-line);
	}
	.tf-f .tf-f__show {
		flex: 1;
		height: 44px;
		min-height: 0;
		border: 0;
		border-radius: 4px;
		background: var(--btn-accented-bgcolor, #bc9764);
		color: #fff;
		font-family: var(--tf-head-font, "TF Tenor Sans", Georgia, serif);
		font-size: 13px;
		-webkit-text-stroke: .4px currentColor;
		letter-spacing: var(--tf-head-ls, 0);
		text-transform: uppercase;
	}
	.tf-f .tf-f__reset {
		font-size: 13px;
		color: var(--tf-muted);
		text-decoration: underline;
	}
	.tf-f__count {
		font-size: 12px;
	}
	.tf-f__sort-label {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tf-f__sheet,
	.tf-f__chev {
		transition: none;
	}
}
