/* THEFLOW card selectors (Size, Vase) — theme tokens (Woodmart), soft corners, hairline borders. */

/* Same type as Julie's Flowers: Tenor Sans for small caps labels; Lora regular only, so
   600 renders as the browser's faux bold, exactly as there. */
@font-face {
	font-family: "TF Tenor Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/tenor-sans-latin.woff2") format("woff2");
}
@font-face {
	font-family: "TF Lora";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/lora-400-latin.woff2") format("woff2");
}

.tf-choice {
	--tf-gold: var(--tf-accent, #95774d); /* bronze accents (buttons use the beige --btn-accented-bgcolor) */
	--tf-gold-text: #7f6136; /* bronze text, 5:1 on white */
	--tf-ink: #111;
	--tf-text: #3a3a3a;
	--tf-muted: #6b6b6b;
	--tf-line: #e3ddd5;
	--tf-line-strong: #bfb5a9;
	--tf-tint: #f7f3ee;
	--tf-gap: 10px;
	--tf-radius: 4px;
	--tf-serif: "TF Lora", Lora, Georgia, serif;
	--tf-caps: var(--tf-label-font, "TF Tenor Sans", Georgia, serif); /* size names, tags: label font */
	min-width: 0;
	margin: 0 0 22px;
	padding: 0;
	border: 0;
}

/* Native selects stay for WooCommerce, hidden from view and from assistive tech duplication. */
.tf-native {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The row label ("Vase", "Size") is replaced by the legend; rows become plain blocks. */
.variations_form table.variations tr:has(.tf-choice) > th,
.variations_form table.variations tr.tf-choice-row > th {
	display: none;
}
.variations_form table.variations tr:has(.tf-choice),
.variations_form table.variations tr.tf-choice-row,
.variations_form table.variations tr:has(.tf-choice) > td,
.variations_form table.variations tr.tf-choice-row > td {
	display: block;
	width: 100%;
	padding: 0;
}
/* A table would grow to fit the fixed-width vase row; as blocks, the row scrolls instead. */
.variations_form table.variations:has(.tf-choice),
.variations_form table.variations:has(.tf-choice) > tbody {
	display: block;
	width: 100%;
	min-width: 0;
}
/* Every attribute always holds a value: "Clear" has no job. */
.variations_form table.variations tbody > tr:only-child .tf-choice ~ .wd-reset-var,
form.tf-all-choices .wd-reset-var,
form.tf-all-choices .reset_variations {
	display: none !important;
}

/* Legend: step title left, hint (and arrows) right. */
.tf-legend {
	display: flex;
	float: none;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 18px;
	margin: 0 0 10px;
	padding: 0;
	border: 0;
}
.tf-legend__title {
	font-family: var(--tf-caps); /* "Size", "Add a vase": small caps labels in the label font */
	font-size: 12px;
	font-weight: 400;
	line-height: 1.714;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tf-ink);
}
.tf-legend__hint {
	margin-left: auto;
	font-family: var(--tf-serif);
	font-size: 13px;
	line-height: 1.714;
	letter-spacing: 0;
	text-transform: none;
	color: var(--tf-muted);
	text-align: right;
}
.tf-legend__hint:empty {
	display: none;
}

/* The bronze check badge of the default style; here a dot marks the selection instead. */
.tf-choice .tf-check {
	display: none;
}

/* No "SIZE" title (the tiles speak for themselves; the legend stays for screen readers),
   no "Available for Standard" hint. */
.tf-size > .tf-legend {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}
.tf-legend__hint[data-tf-hint] {
	display: none;
}
.tf-legend__hint[data-tf-hint] + .tf-vase__nav {
	margin-left: auto;
}

/* Hairline between the description and the options, as before. */
.variations_form table.variations tbody > tr:first-child:has(.tf-choice) {
	margin-top: 4px;
	padding-top: 20px;
	border-top: 1px solid var(--tf-line, #e3ddd5);
}

/* Shared option mechanics. */
.tf-opt {
	position: relative;
	display: block;
	margin: 0;
	font-weight: 400;
	white-space: normal;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
.tf-opt::after,
.tf-opt::before {
	content: none !important; /* theme adds ":" after variation labels */
}
.tf-opt.is-hidden {
	display: none;
}
.tf-opt input {
	position: absolute;
	top: 0;
	left: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}
.tf-opt.is-disabled {
	cursor: not-allowed;
}

/* Cards (shared): hairline border; selected = ink rim + one bronze dot. */
.tf-size__card,
.tf-vase__card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	border: 1px solid var(--tf-line);
	border-radius: var(--tf-radius);
	transition: border-color .18s ease, box-shadow .18s ease;
}
.tf-opt input:checked + .tf-size__card,
.tf-opt input:checked + .tf-vase__card {
	border-color: var(--tf-gold);
	box-shadow: inset 0 0 0 1px var(--tf-gold); /* our bronze instead of JF's black */
}
.tf-opt input:checked + .tf-size__card::after,
.tf-opt input:checked + .tf-vase__card::after {
	content: "";
	position: absolute;
	top: 9px;
	right: 9px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--tf-gold);
}
.tf-opt input:focus-visible + .tf-size__card,
.tf-opt input:focus-visible + .tf-vase__card {
	outline: 2px solid var(--tf-gold);
	outline-offset: 3px;
}
.tf-opt.is-disabled .tf-size__card,
.tf-opt.is-disabled .tf-vase__card {
	background: var(--tf-tint);
}

/* Product price under the title: JF size, regular weight like the size-card prices. */
.single-product .summary-inner > p.price,
.single-product .summary-inner > p.price .amount,
.single-product .summary-inner > p.price bdi {
	font-family: "TF Lora", Lora, Georgia, serif;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: -.01em; /* a touch tighter */
	font-variant-numeric: proportional-nums; /* colour stays the theme's brown */
}

/* Trial: headings and the buy button in Tenor Sans (it has one weight, so no bold). */
.single-product .tf-gifts__title,
.single-product .tf-dlv__title,
.single-product .woocommerce-Reviews-title,
.single-product .related-products .title,
.single-product .wd-el-title.slider-title {
	font-family: var(--tf-head-font, "TF Tenor Sans", Georgia, serif);
	font-weight: 400;
	letter-spacing: var(--tf-head-ls, -.01em);
}
.single-product form.cart .single_add_to_cart_button,
.single-product form.cart .single_add_to_cart_button span {
	font-family: var(--tf-head-font, "TF Tenor Sans", Georgia, serif);
	font-weight: 400;
	-webkit-text-stroke: .4px currentColor; /* a touch heavier; Tenor Sans has no bold */
	letter-spacing: var(--tf-head-ls, 0);
}
.single-product form.cart .single_add_to_cart_button .tf-btn-price,
.single-product form.cart .single_add_to_cart_button .tf-btn-price * { /* the sum: same Lora as every price */
	font-family: var(--wd-text-font, Lora), Georgia, serif;
	-webkit-text-stroke: 0;
	letter-spacing: 0;
}

/* Desktop: the photos stay in view on the left while the options scroll past (as on JF).
   Top = Woodmart's sticky header (101px) + breathing room. */
@media (min-width: 1025px) {
	.single-product .product-images .woocommerce-product-gallery {
		position: sticky;
		top: 121px;
	}
}

/* ---------- Size: name, price, "As pictured" ---------- */

.tf-size__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	gap: var(--tf-gap);
}
.tf-size__card {
	gap: 2px;
	min-height: 84px;
	padding: 13px 14px 12px;
}
.tf-size__name { /* STANDARD / LARGE: caps in Tenor Sans, like the block titles */
	padding-right: 14px;
	font-family: var(--tf-caps);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.714;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--tf-ink);
}
.tf-size__comp { /* mono/duo bouquets: "10 stems of spray roses" right under the size name */
	font-family: var(--tf-serif);
	font-size: 14px;
	line-height: 1.45;
	color: var(--tf-muted);
}
.tf-size__price {
	margin-top: auto;
	padding-top: 6px;
}
.tf-size__price,
.tf-size__price .amount,
.tf-size__price bdi {
	font-family: var(--tf-serif);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.714;
	font-variant-numeric: tabular-nums;
	color: var(--tf-ink);
}
.tf-size__tag {
	display: block;
	margin-top: 2px;
	font-family: var(--tf-caps);
	font-size: 11px;
	line-height: 1.714;
	letter-spacing: .08em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--tf-gold-text);
}
.tf-size__opt.is-disabled .tf-size__name,
.tf-size__opt.is-disabled .tf-size__price .amount {
	color: var(--tf-muted);
	text-decoration: line-through;
	text-decoration-thickness: 1px;
}

/* Composition of the chosen size, under the size tiles: "LARGE SIZE" + list. */
.tf-size-comp {
	display: block;
	margin: 10px 0 0;
	padding: 12px 16px;
	background: #efebe5; /* taupe, same as the "On photo" tag */
	border-radius: var(--tf-radius, 4px);
}
.tf-size-comp--static { /* in the short description of bouquets without sizes */
	margin: 4px 0 0;
}
.tf-size-comp__label { /* "LARGE SIZE": all caps, equal height */
	display: block;
	margin: 0 0 3px;
	font-family: var(--wd-title-font, "Marcellus SC", serif); /* heading font, all caps = even height */
	font-size: 10px;
	font-weight: 400;
	-webkit-text-stroke: .35px currentColor; /* a touch heavier; Marcellus has no bold */
	line-height: 1.4;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: var(--tf-accent, #95774d);
}
.tf-size-comp__text {
	display: block;
	font-size: 12px;
	line-height: 1.5;
	color: #7a7066;
}
.tf-size-comp__n { /* stem counts: "(12)" */
	font-weight: 500;
	white-space: nowrap;
	color: var(--tf-accent, #95774d);
}
.tf-size-comp.is-changed {
	animation: tf-fade .35s ease;
}
@keyframes tf-fade {
	from { opacity: .2; }
	to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.tf-size-comp.is-changed {
		animation: none;
	}
}

/* ---------- Vase: photo cards ---------- */

.tf-vase__list {
	/* One row; a thin scrollbar and the next card peeking in show that it scrolls. */
	display: flex;
	gap: var(--tf-gap);
	margin: 0 -2px;
	padding: 2px 2px 6px;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: thin;
	scrollbar-color: var(--tf-line-strong) transparent;
}
.tf-vase__list::-webkit-scrollbar {
	height: 3px;
}
.tf-vase__list::-webkit-scrollbar-thumb {
	background: var(--tf-line-strong);
	border-radius: 3px;
}
.tf-vase__opt {
	flex: 0 0 132px;
	scroll-snap-align: start;
}
.tf-vase__list.is-dragging {
	scroll-snap-type: none; /* follow the mouse smoothly while dragging */
	cursor: grabbing;
	user-select: none;
}
.tf-vase__list.is-dragging img {
	pointer-events: none;
}
.tf-vase__card {
	padding: 6px 6px 10px;
}
.tf-opt input:checked + .tf-vase__card::after {
	top: 14px;
	right: 14px;
	box-shadow: 0 0 0 3px #fff;
}
.tf-vase__media {
	display: block;
	aspect-ratio: 1 / 1;
	margin-bottom: 8px;
	overflow: hidden;
	border-radius: 2px;
	background: var(--tf-tint);
}
.tf-vase__media--none { /* "No vase": dashed frame, HAND-TIED — as on Julie's Flowers */
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px dashed var(--tf-line-strong);
	background: #fff;
}
.tf-vase__media--none span {
	font-family: var(--tf-caps);
	font-size: 11px;
	line-height: 1.714;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--tf-muted);
}
.tf-vase__img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transition: transform .4s ease;
}
.tf-vase__name { /* vase / gift names keep the theme's own look (real Lora, regular) */
	display: -webkit-box;
	min-height: 2.7em;
	padding: 0 4px;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-family: var(--wd-text-font, "Lora", serif);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.35;
	color: var(--wd-title-color, #242424);
}
.tf-vase__price {
	display: block;
	min-height: 1.714em;
	margin-top: auto; /* prices align across a row */
	padding: 2px 4px 0;
	font-family: var(--tf-serif);
	font-size: 13px;
	line-height: 1.714;
	font-variant-numeric: tabular-nums;
	color: var(--tf-muted);
}
.tf-vase__price .amount,
.tf-vase__price bdi {
	color: inherit;
	font-weight: 400;
}
.tf-vase__opt.is-disabled .tf-vase__media,
.tf-vase__opt.is-disabled .tf-vase__name {
	opacity: .45;
}
.tf-vase__opt.is-disabled .tf-vase__img {
	filter: grayscale(1);
}

/* ← → in the legend, only while the row overflows (desktop). */
.tf-vase__nav {
	display: none;
	gap: 6px;
	margin-left: 4px;
}
.tf-legend__hint:empty + .tf-vase__nav,
.tf-legend__title + .tf-vase__nav {
	margin-left: auto;
}
.tf-vase.has-overflow .tf-vase__nav {
	display: inline-flex;
}
form.cart .tf-vase__arrow {
	display: inline-grid;
	place-items: center;
	width: 30px;
	min-width: 0;
	height: 30px;
	min-height: 0;
	padding: 0;
	border: 1px solid var(--tf-line);
	border-radius: 50%;
	background: #fff;
	box-shadow: none;
	color: var(--tf-ink);
	line-height: 1;
	cursor: pointer;
	transition: border-color .18s ease, opacity .18s ease;
}
form.cart .tf-vase__arrow:hover:not(:disabled) {
	border-color: var(--tf-ink);
	background: #fff;
	color: var(--tf-ink);
}
form.cart .tf-vase__arrow:disabled {
	opacity: .4;
	cursor: default;
}

/* ---------- "Add a vase" (vases sold separately) ---------- */

.tf-addon-wrap {
	flex: 0 0 100%; /* the buy row is a flex row: take a full row under the button */
	width: 100%;
	min-width: 0; /* fixed-width vase cards must scroll, not widen the buy row */
	margin: 22px 0 0;
}
form.cart:has(.tf-addon-wrap) .single_variation_wrap {
	min-width: 0; /* Woodmart makes the variation form a flex row */
}
.tf-addon-wrap.is-empty {
	display: none;
}
.tf-addon-wrap .tf-addon {
	margin: 0;
}

/* Hover (pointer devices only). */
@media (hover: hover) {
	.tf-opt:not(.is-disabled):hover .tf-size__card,
	.tf-opt:not(.is-disabled):hover .tf-vase__card {
		border-color: var(--tf-line-strong);
	}
	.tf-opt:not(.is-disabled):hover .tf-vase__img {
		transform: scale(1.03);
	}
	.tf-opt:hover input:checked + .tf-size__card,
	.tf-opt:hover input:checked + .tf-vase__card {
		border-color: var(--tf-gold);
	}
}

/* Price inside Add to cart. */
.tf-btn-price {
	white-space: nowrap;
}

/* Phone: about 2.3 vases visible, row bleeds to the screen edge. */
@media (max-width: 767px) {
	.tf-legend__hint {
		font-size: 12px;
	}
	.tf-size__card {
		min-height: 80px;
		padding: 12px 12px 11px;
	}
	.tf-vase__list {
		margin-right: -15px;
		padding-right: 15px;
	}
	.tf-vase__opt {
		flex-basis: calc((100vw - 30px - 2 * var(--tf-gap)) / 2.3);
	}
	.tf-vase__name {
		font-size: 13.5px;
	}
	.tf-vase .tf-vase__nav {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tf-size__card,
	.tf-vase__card,
	.tf-vase__img {
		transition: none;
	}
	.tf-opt:hover .tf-vase__img {
		transform: none;
	}
}

/* Woodmart styles variation labels/spans (nowrap, weight, display); scope ours above them. */
form.variations_form .tf-choice .tf-opt {
	margin: 0;
	padding: 0;
	font-size: inherit;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	white-space: normal;
}
form.variations_form .tf-choice .tf-vase__name {
	display: -webkit-box;
	white-space: normal;
}

/* Composition as a plain line of the description: "Standard size: garden roses (7), …". */
.tf-desc-comp .tf-size-comp__n {
	color: inherit; /* stem counts in the description read as plain text, like the flower names */
	font-weight: inherit;
	white-space: nowrap;
}
.tf-desc-comp.is-changed {
	animation: tf-fade .35s ease;
}
@keyframes tf-fade {
	from { opacity: .2; }
	to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.tf-desc-comp.is-changed {
		animation: none;
	}
}

/* ---------- Summary column: more air between the parts ---------- */
.single-product .summary-inner > .product_title {
	margin-bottom: 12px;
}
.single-product .summary-inner > .woocommerce-product-rating {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
}
.single-product .summary-inner > p.price {
	margin-bottom: 20px;
}
.single-product .summary-inner > .woocommerce-product-details__short-description {
	margin-bottom: 28px;
	line-height: 1.75;
}
.single-product .summary-inner > .woocommerce-product-details__short-description p {
	margin-bottom: 14px;
}
.single-product .summary-inner > .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}
.variations_form table.variations tbody > tr:first-child:has(.tf-choice) {
	padding-top: 26px;
}
.variations_form table.variations .tf-choice {
	margin-bottom: 30px;
}
.tf-choice > .tf-legend {
	margin-bottom: 14px;
}

/* Rating under the title: the same bronze stars as the reviews block. */
.single-product .woocommerce-product-rating .star-rating {
	--tf-s: 16px;
	position: relative;
	float: none;
	flex: none;
	width: calc(var(--tf-s) * 5 * 28 / 24);
	height: var(--tf-s);
	margin: 0;
	overflow: hidden;
	font-size: 0;
	line-height: 0;
	letter-spacing: 0;
	background: #ddd5c9;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 24'%3E%3Cpath d='M12 1.8l3.1 6.4 7 .9-5.1 4.9 1.3 7L12 17.6 5.7 21l1.3-7-5.1-4.9 7-.9z'/%3E%3C/svg%3E") left center / calc(var(--tf-s) * 28 / 24) var(--tf-s) repeat-x;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 24'%3E%3Cpath d='M12 1.8l3.1 6.4 7 .9-5.1 4.9 1.3 7L12 17.6 5.7 21l1.3-7-5.1-4.9 7-.9z'/%3E%3C/svg%3E") left center / calc(var(--tf-s) * 28 / 24) var(--tf-s) repeat-x;
}
.single-product .woocommerce-product-rating .star-rating::before,
.single-product .woocommerce-product-rating .star-rating span::before {
	content: none;
}
.single-product .woocommerce-product-rating .star-rating span {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	padding: 0;
	overflow: hidden;
	font-size: 0;
	background: var(--tf-accent, #95774d);
}
.single-product .woocommerce-product-rating .woocommerce-review-link {
	font-size: 13px;
	color: #6b6b6b;
}

/* Product title (Marcellus SC, as the site had it), a little smaller; smaller still on phones. */
.single-product .summary-inner > .product_title {
	font-family: var(--wd-entities-title-font, "Marcellus SC", Georgia, serif);
	font-size: 21px;
	line-height: 1.25;
	letter-spacing: var(--tf-head-ls, 0);
}
@media (max-width: 767px) {
	.single-product .summary-inner > .product_title {
		font-size: 17px;
	}
	.single-product .summary-inner > p.price,
	.single-product .summary-inner > p.price .amount,
	.single-product .summary-inner > p.price bdi {
		font-size: 18px;
	}
}

/* Picked size: a barely-there beige fill behind the bronze rim. */
.tf-opt input:checked + .tf-size__card {
	background: #fbf8f4;
}
