/* Flashback Order Form – front end. Inherits the theme's fonts; change --fof-accent to match branding. */
.fof-wrap {
	--fof-accent: #c8102e;
	--fof-ink: #1d1d1f;
	--fof-muted: #6b6b70;
	--fof-line: #dcdce0;
	--fof-bg: #ffffff;
	--fof-soft: #f6f6f8;
	--fof-error: #b3261e;
	--fof-radius: 10px;
	max-width: 960px;
	margin: 0 auto;
	color: var(--fof-ink);
	box-sizing: border-box;
}
.fof-wrap *, .fof-wrap *::before, .fof-wrap *::after { box-sizing: border-box; }
.fof-wrap.is-busy { opacity: .6; pointer-events: none; }

.fof-head h2 { margin: 0 0 .4em; }
.fof-head p { color: var(--fof-muted); margin: 0 0 1em; }
.fof-test-banner { background: #fff4ce; color: #5c4400 !important; padding: 8px 12px; border-radius: 6px; font-size: 14px; }

.fof-section {
	border: 1px solid var(--fof-line);
	border-radius: var(--fof-radius);
	padding: 20px;
	margin: 0 0 24px;
	background: var(--fof-bg);
	min-width: 0;
}
.fof-section legend {
	font-size: 1.15em;
	font-weight: 700;
	padding: 0 8px;
	margin-left: -8px;
}

.fof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.fof-span, .fof-when, .fof-w-full { grid-column: 1 / -1; }
.fof-field[hidden] { display: none; }
.fof-field label, .fof-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.fof-req { color: var(--fof-error); }
.fof-field input[type="text"], .fof-field input[type="email"], .fof-field input[type="tel"],
.fof-field input[type="date"], .fof-field select, .fof-field textarea {
	width: 100%;
	padding: 10px 12px;
	font: inherit;
	font-size: 16px; /* stops iOS zoom on focus */
	border: 1px solid var(--fof-line);
	border-radius: 8px;
	background: #fff;
	color: var(--fof-ink);
}
.fof-field input:focus, .fof-field select:focus, .fof-qty input:focus {
	outline: 2px solid var(--fof-accent);
	outline-offset: 1px;
	border-color: transparent;
}
.fof-field.has-error input, .fof-field.has-error select, .fof-field.has-error textarea { border-color: var(--fof-error); }
.fof-field textarea { resize: vertical; }
.fof-sub { display: grid; gap: 10px 14px; }
.fof-sub-2 { grid-template-columns: 1fr 1fr; }
.fof-sub-address { grid-template-columns: 2fr 1fr 1fr; }
.fof-sub-full { grid-column: 1 / -1; }
.fof-sublabel { display: block; font-weight: 400 !important; font-size: 12px !important; color: var(--fof-muted); margin: 3px 0 0 !important; }
.fof-help { font-size: 13px; color: var(--fof-muted); margin: 4px 0 0; }
.fof-paragraph { color: var(--fof-muted); }
.fof-paragraph p { margin: 0 0 .5em; }
.fof-choices { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 4px; }
.fof-choices label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.fof-choice-group { flex-basis: 100%; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--fof-muted); margin-top: 6px; }
.fof-err { color: var(--fof-error); font-size: 13px; margin: 4px 0 0; min-height: 0; }
.fof-err:empty { display: none; }
.fof-radios { display: flex; gap: 24px; padding-top: 4px; }
.fof-radios label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.fof-when .fof-field { max-width: 260px; }

/* Products */
.fof-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.fof-products-package { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.fof-product {
	display: flex;
	flex-direction: column;
	border: 2px solid var(--fof-line);
	border-radius: var(--fof-radius);
	overflow: hidden;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.fof-product.is-selected { border-color: var(--fof-accent); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.fof-thumb { background: var(--fof-soft); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.fof-thumb:empty { display: none; }
.fof-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fof-pinfo { padding: 12px 14px 4px; flex: 1; }
.fof-pinfo h4 { margin: 0 0 4px; font-size: 16px; line-height: 1.3; }
.fof-desc { margin: 0 0 6px; color: var(--fof-muted); font-size: 13px; line-height: 1.4; }
.fof-price { margin: 0; font-weight: 700; font-size: 17px; color: var(--fof-accent); }
.fof-qty { display: flex; align-items: stretch; margin: 10px 14px 12px; border: 1px solid var(--fof-line); border-radius: 8px; overflow: hidden; width: fit-content; }
.fof-qty button {
	width: 40px; border: 0; background: var(--fof-soft); color: var(--fof-ink);
	font-size: 20px; line-height: 1; cursor: pointer; padding: 0;
}
.fof-qty button:hover { background: #ebebef; }
.fof-qty input {
	width: 48px; text-align: center; border: 0; font: inherit; font-size: 16px; padding: 8px 0;
	-moz-appearance: textfield; appearance: textfield;
}
.fof-qty input::-webkit-outer-spin-button, .fof-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fof-digital { display: flex; align-items: center; gap: 8px; margin: -4px 14px 12px; font-size: 14px; }
.fof-digital[hidden] { display: none; }

/* Summary */
.fof-lines { list-style: none; margin: 0 0 12px; padding: 0; }
.fof-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--fof-line); font-size: 15px; }
.fof-lines .fof-empty { color: var(--fof-muted); justify-content: flex-start; }
.fof-totals { margin: 0 0 16px; }
.fof-totals > div { display: flex; justify-content: space-between; padding: 4px 0; }
.fof-totals > div[hidden] { display: none; }
.fof-totals dt, .fof-totals dd { margin: 0; }
.fof-total-row { font-size: 1.25em; font-weight: 700; border-top: 2px solid var(--fof-ink); margin-top: 6px; padding-top: 10px !important; }
.fof-secure { font-size: 13px; color: var(--fof-muted); margin: 0 0 12px; }
.fof-form-error { background: #fdecea; color: var(--fof-error); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; font-size: 14px; }
.fof-form-error[hidden] { display: none; }
.fof-paypal-buttons { max-width: 420px; }
.fof-closed { border: 1px solid #dcdce0; border-radius: 10px; padding: 20px; text-align: center; }
.fof-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fof-done { text-align: center; padding: 48px 20px; border: 1px solid var(--fof-line); border-radius: var(--fof-radius); }
.fof-done:focus { outline: none; }
.fof-done h2 { color: var(--fof-accent); margin-top: 0; }
.fof-done-num { font-weight: 700; }

@media (max-width: 640px) {
	.fof-section { padding: 16px 14px; }
	.fof-grid { grid-template-columns: 1fr; }
	.fof-sub-address { grid-template-columns: 1fr 1fr; }
	.fof-sub-address > div:nth-child(3) { grid-column: 1 / -1; }
	.fof-products, .fof-products-package { grid-template-columns: 1fr 1fr; gap: 10px; }
	.fof-pinfo { padding: 10px 10px 2px; }
	.fof-pinfo h4 { font-size: 15px; }
	.fof-qty { margin: 8px 10px 10px; }
	.fof-qty button { width: 34px; }
	.fof-qty input { width: 38px; }
	.fof-digital { margin: -2px 10px 10px; font-size: 13px; }
}
@media (max-width: 380px) {
	.fof-products, .fof-products-package { grid-template-columns: 1fr; }
}
