/* FF Seal Hand-Carved configurator – fully scoped, ffsh- prefix. Only loaded
   on the bound product page; does not modify theme styles. */

.ffsh-wrap {
	--ffsh-accent: #2e6e4e;
	--ffsh-border: #e3e0da;
	--ffsh-muted: #6b6b66;
	--ffsh-radius: 10px;
	box-sizing: border-box;
	margin: 1.5em 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #24241f;
}
.ffsh-wrap *,
.ffsh-wrap *::before,
.ffsh-wrap *::after { box-sizing: border-box; }

.ffsh-block {
	border: 1px solid var(--ffsh-border);
	border-radius: var(--ffsh-radius);
	padding: 16px 18px;
	margin: 0 0 14px;
	background: #fff;
}
.ffsh-title {
	font-size: 1.02em;
	font-weight: 700;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.ffsh-title .ffsh-step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--ffsh-accent);
	color: #fff;
	font-size: 0.8em;
	flex: 0 0 auto;
}
.ffsh-optional {
	font-weight: 400;
	font-style: normal;
	color: var(--ffsh-muted);
	font-size: 0.85em;
}

.ffsh-materials {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.ffsh-card {
	position: relative;
	display: block;
	border: 1.5px solid var(--ffsh-border);
	border-radius: var(--ffsh-radius);
	padding: 12px 12px 10px;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	background: #fff;
}
.ffsh-card:hover { border-color: #c9c4ba; }
.ffsh-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ffsh-card:has(input[type="radio"]:checked) {
	border-color: var(--ffsh-accent);
	box-shadow: 0 0 0 1.5px var(--ffsh-accent) inset;
}
.ffsh-card:has(input[type="radio"]:checked)::after {
	content: "✓";
	position: absolute;
	top: 8px;
	right: 10px;
	color: var(--ffsh-accent);
	font-weight: 700;
}
.ffsh-card-body { display: block; }
.ffsh-card-name {
	display: block;
	font-weight: 700;
	margin-bottom: 2px;
}
.ffsh-card-desc {
	display: block;
	color: var(--ffsh-muted);
	font-size: 0.84em;
	line-height: 1.35;
	min-height: 2.6em;
}
.ffsh-card-price {
	display: block;
	font-weight: 700;
	color: var(--ffsh-accent);
	margin-top: 6px;
	font-size: 1.05em;
}
@supports not selector(:has(*)) {
	.ffsh-card input[type="radio"],
	.ffsh-chip input[type="radio"] {
		position: static;
		opacity: 1;
		pointer-events: auto;
		margin-right: 6px;
	}
}

.ffsh-label {
	display: block;
	font-weight: 600;
	margin: 0 0 6px;
}
.ffsh-hint {
	color: var(--ffsh-muted);
	font-size: 0.84em;
	margin: 6px 0 0;
}
.ffsh-wrap input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	border: 1.5px solid var(--ffsh-border);
	border-radius: 8px;
	font-size: 15px;
	background: #fff;
	color: inherit;
}
.ffsh-wrap input[type="text"]:focus {
	outline: none;
	border-color: var(--ffsh-accent);
}

.ffsh-check {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 10px 0 0;
	cursor: pointer;
}
.ffsh-check input[type="checkbox"] {
	margin-top: 3px;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	accent-color: var(--ffsh-accent);
}

.ffsh-contacts {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-bottom: 10px;
}
.ffsh-chip {
	position: relative;
	display: block;
	border: 1.5px solid var(--ffsh-border);
	border-radius: 8px;
	padding: 9px 10px;
	cursor: pointer;
	text-align: center;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	background: #fff;
	font-size: 0.95em;
}
.ffsh-chip input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.ffsh-chip:has(input[type="radio"]:checked) {
	border-color: var(--ffsh-accent);
	box-shadow: 0 0 0 1.5px var(--ffsh-accent) inset;
}

.ffsh-notice {
	border: 1.5px solid #e8c37a;
	background: #fdf6e7;
	border-radius: var(--ffsh-radius);
	padding: 12px 14px;
	margin: 0 0 14px;
}

.ffsh-total {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 1.5px solid var(--ffsh-accent);
	border-radius: var(--ffsh-radius);
	padding: 10px 16px;
	margin: 0 0 14px;
	background: #f2f7f4;
}
.ffsh-total strong {
	font-size: 1.25em;
	color: var(--ffsh-accent);
}

.ffsh-error {
	border: 1.5px solid #d9534f;
	background: #fdf0ef;
	color: #a8322f;
	border-radius: 8px;
	padding: 10px 14px;
	margin: 0 0 14px;
	font-size: 0.93em;
}
.ffsh-error[hidden] { display: none; }
.ffsh-error ul { margin: 4px 0 0 18px; padding: 0; }

form.ffsh-active .variations {
	display: none;
}

@media (max-width: 600px) {
	.ffsh-materials { grid-template-columns: 1fr; }
	.ffsh-contacts { grid-template-columns: 1fr 1fr; }
	.ffsh-card-desc { min-height: 0; }
}
