/* ==========================================================================
   Tefillin Customizer — frontend
   Values ported 1:1 from the approved design.
   ========================================================================== */

@font-face { font-family: 'Google Sans'; src: url('../fonts/GoogleSans-Regular.woff2') format('woff2'), url('../fonts/GoogleSans-Regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Google Sans'; src: url('../fonts/GoogleSans-Medium.woff2') format('woff2'), url('../fonts/GoogleSans-Medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Google Sans'; src: url('../fonts/GoogleSans-SemiBold.woff2') format('woff2'), url('../fonts/GoogleSans-SemiBold.woff') format('woff'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Google Sans'; src: url('../fonts/GoogleSans-Bold.woff2') format('woff2'), url('../fonts/GoogleSans-Bold.woff') format('woff'); font-weight: 700; font-style: normal; font-display: swap; }

.tfc-block {
	font-family: 'Google Sans', system-ui, -apple-system, sans-serif;
	color: #1a1a1a;
	direction: rtl;
	text-align: right;
	margin: 26px 0 14px;
	max-width: 100%;
	-webkit-font-smoothing: antialiased;
}
.tfc-block *, .tfc-lightbox * { box-sizing: border-box; }

/* block header — mirrors the "התאמה אישית" divider */
.tfc-head { border-top: 1px solid #1a1a1a; padding-top: 18px; margin-bottom: 20px; }
.tfc-head-title { font-size: 18px; font-weight: 600; line-height: 1.3; }
.tfc-head-sub { font-size: 13px; color: #8a8a8a; margin-top: 4px; line-height: 1.6; }

/* group headers */
.tfc-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tfc-group-head--spaced { margin-top: 34px; }
.tfc-group-title { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.tfc-group-note { font-size: 12px; color: #8a8a8a; }

/* option rows */
.tfc-rows { display: flex; flex-direction: column; gap: 10px; }

.tfc-block .tfc-row {
	display: grid !important;
	grid-template-columns: 20px 66px minmax(0, 1fr) auto !important;
	align-items: center !important;
	gap: 14px !important;
	padding: 12px !important;
	border: 1px solid #ededed !important;
	background: #fff !important;
	cursor: pointer;
	margin: 0 !important;
	width: 100% !important;
	float: none !important;
	transition: border-color .15s ease, background-color .15s ease;
}
.tfc-block .tfc-row:hover { border-color: #c9c9c9 !important; }
.tfc-block .tfc-row.is-selected { border-color: #1a1a1a !important; background: #fbfbfb !important; }

.tfc-input-radio, .tfc-input-check {
	position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none;
}

.tfc-dot { width: 18px; height: 18px; flex-shrink: 0; border-radius: 50%; border: 1px solid #c9c9c9; display: flex; align-items: center; justify-content: center; }
.tfc-dot > span { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.tfc-row.is-selected .tfc-dot { border-color: #1a1a1a; }
.tfc-row.is-selected .tfc-dot > span { background: #1a1a1a; }

.tfc-box { width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; border: 1px solid #c9c9c9; background: #fff; display: flex; align-items: center; justify-content: center; position: relative; }
.tfc-row.is-selected .tfc-box { border-color: #1a1a1a; background: #1a1a1a; }
.tfc-row.is-selected .tfc-box::after { content: '\2713'; color: #fff; font-size: 12px; line-height: 1; }

.tfc-block .tfc-thumb { width: 66px; height: 66px; flex-shrink: 0; background: #f6f6f6 center/cover no-repeat; overflow: hidden; display: block; }

.tfc-text { flex: 1; min-width: 0; display: block; }
.tfc-label { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.3; }
.tfc-sub { display: block; font-size: 12.5px; color: #8a8a8a; margin-top: 3px; line-height: 1.5; }

.tfc-block .tfc-price { font-size: 14px; font-weight: 600; white-space: nowrap; color: #1a1a1a; justify-self: end; }
.tfc-price.is-muted { font-size: 13px; color: #8a8a8a; }
.tfc-price .woocommerce-Price-amount { font-weight: 600; }

/* zoom button */
.tfc-block button.tfc-zoom {
	-webkit-appearance: none;
	appearance: none;
	margin: 8px 0 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
	width: auto !important;
	min-height: 0 !important;
	height: auto !important;
	padding: 7px 14px !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #1a1a1a !important;
	background-image: none !important;
	color: #fff !important;
	font-family: 'Google Sans', system-ui, sans-serif !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	cursor: pointer;
	transition: background-color .15s ease;
}
.tfc-block button.tfc-zoom:hover,
.tfc-block button.tfc-zoom:focus,
.tfc-block button.tfc-zoom:focus-visible,
.tfc-block button.tfc-zoom:active {
	background: #3d3d3d !important;
	color: #fff !important;
	border: 0 !important;
	outline: none !important;
	box-shadow: none !important;
}
.tfc-block .tfc-zoom-ico { font-size: 12px; line-height: 1; }

/* engraving field */
.tfc-field { padding: 0 12px 14px; display: flex; flex-direction: column; gap: 8px; border: 1px solid #1a1a1a; border-top: 0; background: #fbfbfb; }
.tfc-extra .tfc-field[hidden] { display: none; }
.tfc-field-line { display: flex; align-items: center; gap: 10px; padding-top: 12px; }
.tfc-text-input {
	flex: 1; padding: 11px 13px; font-size: 15px;
	font-family: 'Google Sans', system-ui, sans-serif;
	border: 1px solid #d8d8d8; border-radius: 0; background: #fff; color: #1a1a1a;
	box-shadow: none; margin: 0; height: auto; line-height: 1.4;
}
.tfc-text-input:focus { border-color: #1a1a1a; outline: none; box-shadow: none; }
.tfc-counter { font-size: 12px; color: #8a8a8a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tfc-hint { font-size: 12px; color: #8a8a8a; line-height: 1.5; }
.tfc-hint.is-error { color: #b42318; }

/* nickel plate preview */
.tfc-plate-wrap { display: flex; align-items: center; gap: 12px; background: transparent; padding: 0; margin-top: 4px; }
.tfc-plate-cap { font-size: 10.5px; color: #8a8a8a; letter-spacing: 0.1em; white-space: nowrap; }
.tfc-plate {
	flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px;
	background: linear-gradient(180deg, #e8e8e8, #b9b9b9 50%, #dcdcdc);
	padding: 7px 12px; border-radius: 3px; min-height: 34px;
}
.tfc-plate i { width: 7px; height: 7px; border-radius: 50%; background: #8d8d8d; flex-shrink: 0; }
.tfc-plate-text { font-size: 15px; font-weight: 700; color: #3a3a3a; letter-spacing: 0.02em; text-align: center; }

/* summary */
.tfc-summary { margin-top: 34px; border: 1px solid #ededed; padding: 18px; }
.tfc-summary-line { display: flex; justify-content: space-between; gap: 14px; font-size: 14px; color: #4a4a4a; padding: 5px 0; }
.tfc-summary-line span:last-child { font-variant-numeric: tabular-nums; }
.tfc-summary-div { height: 1px; background: #ededed; margin: 12px 0; }
.tfc-summary-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.tfc-summary-total > span:first-child { font-size: 15px; font-weight: 700; }
.tfc-total { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tfc-total .woocommerce-Price-amount { font-weight: 600; }

.tfc-note { margin-top: 10px; font-size: 12.5px; color: #8a8a8a; line-height: 1.6; }

/* lightbox */
.tfc-lightbox {
	position: fixed; inset: 0; top: 0; right: 0; bottom: 0; left: 0;
	width: 100vw; height: 100vh; max-width: none; margin: 0;
	z-index: 2147483000;
	background: rgba(12, 12, 12, 0.88);
	-webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
	display: flex; align-items: center; justify-content: center;
	padding: 24px; overflow-y: auto; cursor: zoom-out;
}
.tfc-lightbox[hidden] { display: none; }
.tfc-lightbox-inner { position: relative; width: 100%; max-width: 780px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.tfc-lightbox-img { width: 100%; height: 70vh; background: center/contain no-repeat; }
.tfc-lightbox-cap { color: #f2f2f2; font: 500 15px/1.4 'Google Sans', system-ui, sans-serif; text-align: center; }
.tfc-lightbox-close {
	position: fixed; top: 18px; inset-inline-start: 18px;
	width: 44px; height: 44px; border-radius: 50%; border: 0;
	background: #fff; color: #1a1a1a; font-size: 20px; line-height: 1;
	display: flex; align-items: center; justify-content: center;
	cursor: pointer; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4); z-index: 2;
}
.tfc-lightbox-close:hover { background: #ededed; }

/* mobile */
@media (max-width: 991px) {
	.tfc-block { margin-top: 22px; }
	.tfc-block .tfc-row {
		grid-template-columns: 18px 56px minmax(0, 1fr) auto !important;
		gap: 10px !important;
		padding: 11px !important;
	}
	.tfc-block .tfc-thumb { width: 56px !important; height: 56px !important; }
	.tfc-block .tfc-label { font-size: 14.5px; }
	.tfc-block .tfc-sub { font-size: 12px; }
	.tfc-block .tfc-price { font-size: 13.5px !important; text-align: left; }
	.tfc-block .tfc-price.is-muted { font-size: 12.5px !important; }
	.tfc-block button.tfc-zoom { padding: 7px 12px !important; }
	.tfc-plate-wrap { flex-direction: column; align-items: stretch; gap: 8px; }
	.tfc-plate-cap { text-align: center; }
	.tfc-lightbox-img { height: 58vh; }
	.tfc-total { font-size: 23px; }
	.tfc-field-line { flex-wrap: wrap; }
	.tfc-text-input { flex: 1 1 100%; }
}

@media (max-width: 420px) {
	.tfc-block .tfc-row { grid-template-columns: 18px 48px minmax(0, 1fr) auto !important; gap: 9px !important; }
	.tfc-block .tfc-thumb { width: 48px !important; height: 48px !important; }
	.tfc-block .tfc-label { font-size: 14px; }
	.tfc-block .tfc-price { font-size: 13px !important; }
}

/* ------- mobile hardening: theme rules must not restack the row ------- */
.tfc-block .tfc-row > * { grid-row: 1 !important; }
.tfc-block .tfc-row .tfc-dot { grid-column: 1 !important; }
.tfc-block .tfc-row .tfc-box { grid-column: 1 !important; }
.tfc-block .tfc-row .tfc-thumb { grid-column: 2 !important; }
.tfc-block .tfc-row .tfc-text { grid-column: 3 !important; width: auto !important; max-width: 100% !important; float: none !important; }
.tfc-block .tfc-row .tfc-price {
	grid-column: 4 !important;
	width: auto !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
	display: block !important;
	justify-self: end !important;
	align-self: center !important;
	text-align: left !important;
}
.tfc-block .tfc-row .tfc-price .woocommerce-Price-amount { white-space: nowrap; }

/* ===================== generic template field types ===================== */
.tfc-info {
	background: #fafafa; border: 1px solid #ededed; padding: 14px 16px;
	font-size: 13.5px; line-height: 1.7; color: #4a4a4a; margin-bottom: 4px;
}
.tfc-textgroup { margin-bottom: 4px; }
.tfc-selectwrap { margin-bottom: 4px; }
.tfc-block .tfc-input-select {
	width: 100%; padding: 12px 13px; font-size: 15px;
	font-family: 'Google Sans', system-ui, sans-serif;
	border: 1px solid #d8d8d8; border-radius: 0; background: #fff; color: #1a1a1a;
	box-shadow: none; height: auto; line-height: 1.4; appearance: auto;
}
.tfc-block .tfc-input-select:focus { border-color: #1a1a1a; outline: none; box-shadow: none; }

/* ============================== step wizard ============================== */
.tfc-progress { margin: 4px 0 22px; }
.tfc-progress-label { font-size: 12px; font-weight: 600; letter-spacing: .04em; color: #8a8a8a; margin-bottom: 8px; }
.tfc-progress-track { height: 6px; background: #ededed; border-radius: 999px; overflow: hidden; }
.tfc-progress-bar { height: 100%; width: 0; background: #1a1a1a; border-radius: 999px; transition: width .35s cubic-bezier(.4,0,.2,1); }
.tfc-progress-steps { display: flex; gap: 6px; margin-top: 10px; }
.tfc-progress-dot { width: 8px; height: 8px; border-radius: 50%; background: #dcdcdc; transition: background-color .25s ease, transform .25s ease; }
.tfc-progress-dot.is-done { background: #1a1a1a; }
.tfc-progress-dot.is-active { background: #1a1a1a; transform: scale(1.35); }

.tfc-steps { position: relative; }
.tfc-step { animation: tfc-step-in .28s ease; }
.tfc-step .tfc-group-head { margin-top: 0; }
.tfc-step.tfc-step-error .tfc-text-input { border-color: #b42318; }
@keyframes tfc-step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tfc-wiz-nav {
	margin-top: 28px; padding: 18px; border: 1px solid #e6e6e6; border-radius: 14px;
	background: linear-gradient(180deg, #fff, #fafafa);
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
	display: flex; flex-direction: column; gap: 14px;
}
.tfc-wiz-line {
	display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
	padding-bottom: 14px; border-bottom: 1px dashed #e2e2e2;
}
.tfc-wiz-total-label { font-size: 13px; font-weight: 600; color: #8a8a8a; }
.tfc-wiz-amount { font-size: 26px; font-weight: 700; color: #1a1a1a; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tfc-wiz-btns { display: flex; gap: 10px; }
.tfc-wiz-btns .tfc-prev, .tfc-wiz-btns .tfc-next {
	-webkit-appearance: none; appearance: none;
	font-family: 'Google Sans', system-ui, sans-serif; font-weight: 600;
	cursor: pointer; border-radius: 10px; line-height: 1;
	transition: background-color .15s ease, color .15s ease, transform .05s ease;
}
.tfc-wiz-btns .tfc-prev:active, .tfc-wiz-btns .tfc-next:active { transform: translateY(1px); }
.tfc-wiz-btns .tfc-prev { flex: 0 0 auto; background: #fff; color: #1a1a1a; border: 1px solid #d8d8d8; padding: 15px 22px; font-size: 15px; }
.tfc-wiz-btns .tfc-prev:hover { background: #f2f2f2; }
.tfc-wiz-btns .tfc-next { flex: 1; background: #1a1a1a; color: #fff; border: 1px solid #1a1a1a; padding: 15px 24px; font-size: 16px; }
.tfc-wiz-btns .tfc-next:hover { background: #333; }
.tfc-wiz-btns .tfc-next.is-finish { background: #1a7f37; border-color: #1a7f37; }
.tfc-wiz-btns .tfc-next.is-finish:hover { background: #176a2e; }

/* swatches (compact chips, no images) */
.tfc-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.tfc-block .tfc-swatch {
	position: relative; display: inline-flex; flex-direction: column;
	align-items: center; justify-content: center; min-width: 62px;
	padding: 12px 18px; border: 1px solid #ededed; background: #fff;
	cursor: pointer; text-align: center; line-height: 1.2;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.tfc-block .tfc-swatch:hover { border-color: #c9c9c9; }
.tfc-block .tfc-swatch.is-selected { border-color: #1a1a1a; background: #fbfbfb; box-shadow: inset 0 0 0 1px #1a1a1a; }
.tfc-swatch .tfc-input-radio { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tfc-swatch-label { font-size: 15px; font-weight: 600; }
.tfc-swatch-price { font-size: 11.5px; color: #8a8a8a; margin-top: 3px; }

@media (max-width: 480px) {
	.tfc-wiz-nav { padding: 16px; border-radius: 12px; }
	.tfc-wiz-amount { font-size: 23px; }
	.tfc-wiz-btns .tfc-prev { padding: 14px 16px; font-size: 14px; }
	.tfc-wiz-btns .tfc-next { padding: 14px 18px; font-size: 15px; }
}

/* ===================== rounded surfaces + positive pricing ===================== */
.tfc-block .tfc-head-title { font-size: 21px; letter-spacing: -.01em; }
.tfc-block .tfc-head-sub { font-size: 13.5px; }
.tfc-group-title { font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.tfc-block .tfc-row { border-radius: 14px !important; }
.tfc-block .tfc-thumb { border-radius: 10px; }
.tfc-block .tfc-swatch { border-radius: 14px; }
.tfc-block .tfc-input-select { border-radius: 14px; }
.tfc-text-input { border-radius: 14px; }
.tfc-info { border-radius: 16px; }
.tfc-summary { border-radius: 18px; }

/* smaller, correctly-placed currency symbol on totals */
.tfc-total, .tfc-wiz-amount { display: inline-flex; direction: ltr; align-items: baseline; gap: 8px; }
.tfc-cur-sym { font-size: .68em; font-weight: 600; }
.tfc-summary-total .tfc-total { color: #1a7f37; }

/* option rows with no image collapse the thumbnail column */
.tfc-block .tfc-row--noimg { grid-template-columns: 20px minmax(0, 1fr) auto !important; }
.tfc-block .tfc-row--noimg .tfc-text { grid-column: 2 !important; }
.tfc-block .tfc-row--noimg .tfc-price { grid-column: 3 !important; }
@media (max-width: 991px) { .tfc-block .tfc-row--noimg { grid-template-columns: 18px minmax(0, 1fr) auto !important; } }
@media (max-width: 420px) { .tfc-block .tfc-row--noimg { grid-template-columns: 18px minmax(0, 1fr) auto !important; } }

/* wizard footer — positive green tone */
.tfc-wiz-nav { border-radius: 20px; }
.tfc-wiz-line { background: #eaf7ee; border: 1px solid #c4e7cf; border-radius: 16px; padding: 16px 18px; align-items: center; }
.tfc-wiz-total-label { color: #2f7d46; }
.tfc-wiz-amount { color: #1a7f37; }
.tfc-wiz-badge { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; background: #eaf7ee; color: #1a7f37; border-radius: 999px; padding: 8px 15px; font-size: 13px; font-weight: 600; }
.tfc-wiz-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: #1a7f37; }
.tfc-wiz-btns .tfc-prev, .tfc-wiz-btns .tfc-next { border-radius: 999px; }
.tfc-wiz-btns .tfc-next:hover, .tfc-wiz-btns .tfc-next:focus, .tfc-wiz-btns .tfc-next:focus-visible, .tfc-wiz-btns .tfc-next:active { color: #fff !important; }

/* when the wizard is active, the theme's own add-to-cart button is replaced by it */
.tfc-block[data-wizard] ~ .single_add_to_cart_button,
.tfc-block[data-wizard] ~ * .single_add_to_cart_button,
.tfc-block[data-wizard] ~ .quantity,
.tfc-block[data-wizard] ~ * .quantity { display: none !important; }

/* wizard quantity stepper */
.tfc-wiz-qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tfc-wiz-qty-label { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.tfc-stepper { display: inline-flex; align-items: center; border: 1px solid #d8d8d8; border-radius: 999px; overflow: hidden; background: #fff; }
.tfc-stepper button {
	-webkit-appearance: none; appearance: none; border: 0; background: transparent;
	width: 42px; height: 44px; font-size: 20px; line-height: 1; cursor: pointer; color: #1a1a1a;
	font-family: 'Google Sans', system-ui, sans-serif; transition: background-color .15s ease;
}
.tfc-stepper button:hover { background: #f2f2f2; }
.tfc-stepper .tfc-qty-input {
	width: 52px; height: 44px; border: 0; border-inline: 1px solid #ededed; text-align: center;
	font-size: 16px; font-weight: 600; background: #fff; color: #1a1a1a;
	-moz-appearance: textfield; padding: 0; border-radius: 0;
}
.tfc-stepper .tfc-qty-input::-webkit-outer-spin-button,
.tfc-stepper .tfc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }


/* ===================== v1.3 — colour / symbol / font swatches, notes, live preview ===================== */
@font-face { font-family: 'BA Askenaz'; src: url('../fonts/BA-Askenaz.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Kolofon'; src: url('../fonts/BA-Kolofon.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Shalhevet'; src: url('../fonts/BA-Shalhevet.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Yoel'; src: url('../fonts/BA-Yoel.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Ziporen Plus'; src: url('../fonts/BA-Ziporen-Plus.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Afikoman'; src: url('../fonts/BA-Afikoman.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Kolmus'; src: url('../fonts/BA-Kolmus.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'BA Platforma'; src: url('../fonts/BA-Platforma.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

.tfc-block .tfc-swatches--color { gap: 14px; }
.tfc-block .tfc-swatch--color, .tfc-block .tfc-swatch--color.is-selected { border: 0; background: transparent; box-shadow: none; padding: 0; min-width: 0; width: 66px; gap: 6px; }
.tfc-sw-dot { display: block; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 4px #e3e3e3; transition: box-shadow .15s ease; }
.tfc-swatch--color.is-selected .tfc-sw-dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 5px #1a1a1a; }
.tfc-swatch--color .tfc-swatch-label { font-size: 12.5px; margin-top: 4px; }

.tfc-block .tfc-swatches--symbol, .tfc-block .tfc-swatches--font { display: grid; gap: 8px; }
.tfc-block .tfc-swatches--symbol { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.tfc-block .tfc-swatches--font { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.tfc-block .tfc-swatch--symbol, .tfc-block .tfc-swatch--font { min-width: 0; padding: 12px 6px 10px; gap: 6px; }
.tfc-sw-sym { display: block; width: 40px; height: 40px; background: #1a1a1a; -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.tfc-sw-none { display: flex; align-items: center; height: 40px; font-size: 24px; color: #8a8a8a; }
.tfc-sw-sample { display: flex; align-items: center; height: 32px; font-size: 24px; line-height: 1.2; }
.tfc-swatch--symbol .tfc-swatch-label, .tfc-swatch--font .tfc-swatch-label { font-size: 12px; font-weight: 500; }

.tfc-block .tfc-textarea {
	width: 100%; padding: 12px 14px; font-size: 15px; line-height: 1.5;
	font-family: 'Google Sans', system-ui, sans-serif;
	border: 1px solid #d8d8d8; border-radius: 14px; background: #fff; color: #1a1a1a;
	box-shadow: none; margin: 0; resize: vertical; min-height: 92px;
}
.tfc-block .tfc-textarea:focus { border-color: #1a1a1a; outline: none; }
.tfc-block .tfc-text-input[data-lang] { font-size: 22px; }
.tfc-textgroup .tfc-hint { margin-top: 6px; }

/* live preview */
.tfc-pv { --tfc-bag: #7f7f7f; --tfc-ink: linear-gradient(135deg,#f8e89a 0%,#c9a227 48%,#8a6a12 100%); position: sticky; top: 12px; z-index: 3; background: transparent; padding: 0 0 12px; margin: 0 0 18px; }
.tfc-pv-cap { font-size: 10.5px; color: #8a8a8a; letter-spacing: .1em; margin-bottom: 8px; }
.tfc-pv-stage { border-radius: 16px; background: #efede8; padding: 20px; display: flex; justify-content: center; }
.tfc-pv-text { overflow-wrap: anywhere; line-height: 1.25; }
.tfc-pv-text.is-empty { opacity: .6; }

.tfc-book { width: 230px; max-width: 100%; aspect-ratio: 3 / 4; border-radius: 5px 12px 12px 5px; background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.12), rgba(255,255,255,0) 60%), var(--tfc-book, #3a2a20); box-shadow: inset -10px 0 14px rgba(0,0,0,.3), 0 10px 24px rgba(0,0,0,.18); display: flex; flex-direction: column; justify-content: flex-end; padding: 18px 14px 40px 22px; }
.tfc-book-stamp { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tfc-pv--book .tfc-pv-text { font-family: 'Frank Ruhl Libre', serif; font-size: 14px; letter-spacing: .02em; text-align: center; background-image: var(--tfc-ink); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tfc-pv-sym { display: none; width: 24px; height: 24px; background-image: var(--tfc-ink); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.tfc-pv--book.is-blind .tfc-pv-text { background-image: none; color: rgba(0,0,0,.42); text-shadow: 0 1px 0 rgba(255,255,255,.08); }
.tfc-pv--book.is-blind .tfc-pv-sym { background-image: none; background-color: rgba(0,0,0,.42); }

.tfc-bags { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: end; padding: 18px; }
.tfc-bag-wrap { display: flex; flex-direction: column; gap: 6px; }
.tfc-bag { position: relative; container-type: inline-size; border-radius: 12px; display: flex; align-items: flex-end; padding: 18px 20px 22px;
	background: radial-gradient(90% 70% at 35% 20%, rgba(255,255,255,.16), rgba(255,255,255,0) 60%), radial-gradient(80% 60% at 80% 85%, rgba(0,0,0,.18), rgba(0,0,0,0) 65%), linear-gradient(160deg, color-mix(in oklab, var(--tfc-bag) 88%, #fff) 0%, var(--tfc-bag) 55%, color-mix(in oklab, var(--tfc-bag) 82%, #000) 100%);
	box-shadow: inset 0 0 18px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.12), 0 8px 18px rgba(0,0,0,.18); }
.tfc-bag--tallit { aspect-ratio: 4 / 3; }
.tfc-bag--tefillin { aspect-ratio: 1 / 1; padding: 14px 14px 18px; }
.tfc-bag-zip { position: absolute; top: 0; left: 0; right: 0; height: 7px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #ebe6dc, #d6d0c4); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.tfc-bag-text { position: relative; width: 100%; display: flex; justify-content: center; text-align: center; }
.tfc-pv[data-place="right"] .tfc-bag-text { justify-content: flex-start; text-align: right; }
.tfc-pv[data-place="left"] .tfc-bag-text { justify-content: flex-end; text-align: left; }
.tfc-bag-label { font-size: 11.5px; color: #6a6a6a; text-align: center; }
.tfc-bag .tfc-pv-text { font-family: 'BA Askenaz', serif; }
.tfc-bag--tallit .tfc-pv-text { font-size: clamp(12px, 10cqw, 30px); overflow-wrap: normal; }
.tfc-bag--tefillin .tfc-pv-text { font-size: clamp(10px, 9.5cqw, 21px); overflow-wrap: normal; }
.tfc-pv--bags .tfc-pv-text {
	background-image: repeating-linear-gradient(75deg, rgba(255,255,255,.14) 0 .5px, rgba(0,0,0,.06) .5px 1px), linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,.14) 100%), var(--tfc-ink);
	-webkit-background-clip: text; background-clip: text; color: transparent;
	filter: drop-shadow(0 .8px .6px rgba(0,0,0,.35)) drop-shadow(0 1.5px 2px rgba(0,0,0,.18));
}
.tfc-pv--laser .tfc-pv-text { color: color-mix(in oklab, var(--tfc-bag) 36%, #000); filter: drop-shadow(0 .8px 0 rgba(255,255,255,.22)); }

.tfc-pv-stage, .tfc-bags.tfc-pv-stage { position: relative; padding-top: 56px; }
.tfc-pv-badge { position: absolute; top: 12px; right: 12px; display: flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: rgba(26,26,26,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; max-width: calc(100% - 84px); box-shadow: 0 4px 14px rgba(0,0,0,.12); font-size: 11.5px; line-height: 1.35; }
.tfc-pv-badge i { width: 6px; height: 6px; border-radius: 50%; background: #fff; flex-shrink: 0; opacity: .9; }
.tfc-pv-badge b { font-weight: 700; }
.tfc-pv-tint { position: absolute; top: 10px; left: 10px; display: flex; align-items: center; gap: 6px; }
.tfc-pv-swatch { position: relative; display: block; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; padding: 3px; margin: 0; background: conic-gradient(from 200deg, #e9c46a, #e76f51, #9b5de5, #4d96ff, #43aa8b, #e9c46a); box-shadow: 0 4px 14px rgba(0,0,0,.16); }
.tfc-pv-swatch-fill { display: block; width: 100%; height: 100%; border-radius: 50%; border: 2px solid #fff; box-sizing: border-box; }
.tfc-pv-picker { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; }
.tfc-block button.tfc-pv-reset { -webkit-appearance: none; appearance: none; width: 26px; height: 26px; min-height: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #1a1a1a; font-size: 13px; line-height: 1; cursor: pointer; padding: 0; margin: 0; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.tfc-block button.tfc-pv-reset[hidden] { display: none; }
@media (max-width: 480px) { .tfc-bags { padding: 14px; gap: 10px; } }

/* with / without customisation */
.tfc-choice { display: flex; gap: 3px; background: #f2f2f2; border-radius: 999px; padding: 3px; margin: 0 0 22px; }
.tfc-block .tfc-choice-opt { flex: 1; position: relative; display: flex; align-items: center; justify-content: center; text-align: center; padding: 11px 14px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; color: #4a4a4a; line-height: 1.2; margin: 0; transition: background-color .15s ease, color .15s ease; }
.tfc-block .tfc-choice-opt.is-selected { background: #1a1a1a; color: #fff; }
.tfc-choice-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }

/* ===================== v1.4 — related products + gift note ===================== */
.tfc-block button.tfc-more {
	-webkit-appearance: none; appearance: none;
	display: inline-flex !important; align-items: center !important; gap: 7px !important;
	width: auto !important; height: auto !important; min-height: 0 !important;
	margin: 8px 0 0 !important; padding: 6px 12px !important;
	border: 1px solid #d8d8d8 !important; border-radius: 999px !important;
	background: #fff !important; background-image: none !important; color: #1a1a1a !important;
	font-family: 'Google Sans', system-ui, sans-serif !important; font-size: 12px !important; font-weight: 500 !important;
	line-height: 1.2 !important; letter-spacing: 0 !important; text-transform: none !important;
	box-shadow: none !important; text-shadow: none !important; cursor: pointer;
	transition: border-color .15s ease;
}
.tfc-block button.tfc-more:hover, .tfc-block button.tfc-more:focus, .tfc-block button.tfc-more:focus-visible, .tfc-block button.tfc-more:active {
	border-color: #1a1a1a !important; background: #fff !important; color: #1a1a1a !important; outline: none !important; box-shadow: none !important;
}
.tfc-more-ico { display: inline-block; width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(-45deg); transition: transform .2s ease; }
.tfc-more[aria-expanded="true"] .tfc-more-ico { transform: translateY(1px) rotate(135deg); }
.tfc-prod-desc { margin-top: 8px; padding: 14px 16px; background: #fafafa; border: 1px solid #ededed; border-radius: 14px; font-size: 13.5px; line-height: 1.7; color: #4a4a4a; }
.tfc-prod-desc[hidden] { display: none; }
.tfc-prod-desc p { margin: 0 0 8px; }
.tfc-prod-desc ul { margin: 0 0 8px; padding-inline-start: 18px; }
.tfc-block .tfc-prod-link { display: inline-block; margin-top: 2px; font-size: 12.5px; font-weight: 600; color: #1a1a1a; text-decoration: underline; text-underline-offset: 3px; }

.tfc-gift { display: flex; align-items: flex-start; gap: 14px; margin: 34px 0 4px; padding: 16px 18px; background: #eaf7ee; border: 1px solid #c4e7cf; border-radius: 16px; }
.tfc-gift--first { margin-top: 0; }
.tfc-gift-ico { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #1a7f37; color: #fff; display: flex; align-items: center; justify-content: center; }
.tfc-gift-ico svg { width: 20px; height: 20px; display: block; }
.tfc-gift-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.tfc-gift-title { font-size: 15px; font-weight: 700; line-height: 1.35; color: #1a7f37; }
.tfc-gift-text { font-size: 13.5px; line-height: 1.65; color: #2f5a3c; }

/* preview overlay — mobile */
@media (max-width: 600px) {
	.tfc-pv-stage, .tfc-bags.tfc-pv-stage { padding-top: 66px; }
	.tfc-pv-stage { padding-left: 14px; padding-right: 14px; }
	.tfc-bags.tfc-pv-stage { padding-left: 12px; padding-right: 12px; }
	.tfc-pv-badge { border-radius: 14px; padding: 7px 11px 7px 10px; font-size: 11px; max-width: calc(100% - 96px); align-items: flex-start; }
	.tfc-pv-badge i { margin-top: 5px; }
	.tfc-pv-badge b { display: block; }
}
