/* ==========================================================================
   Food Menu & Quote Request System
   Colours inherit from the Toastie Foods theme when active, else fall back.
   ========================================================================== */

.fmos-menu,
.fmos-grid,
.fmos-services,
.fmos-events,
.fmos-form,
.fmos-modal,
.fmos-details {
	--fmos-green: var(--tf-primary, var(--tf-green, #e02b20));
	--fmos-red: var(--tf-red, #a81b12);
	--fmos-gold: var(--tf-gold, #f6a01a);
	--fmos-ink: var(--tf-ink, #10120f);
	--fmos-line: var(--tf-line, #e6e8e4);
	--fmos-bg: var(--tf-bg-alt, #f7f8f5);
	--fmos-radius: var(--tf-radius, 14px);
}

.fmos-icon { width: 1em; height: 1em; flex: none; }

/*
 * Flex/inline-flex elements ignore the plain `hidden` attribute because their
 * `display` wins, so force it for the toggled bits (total row, count badge…).
 */
.fmos-menu [hidden],
.fmos-form [hidden] { display: none !important; }

/* ---------------------------------------------------------------- top bar */

.fmos-menu__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-bottom: 28px;
}

.fmos-menu__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	flex: 1 1 340px;
}

.fmos-select,
.fmos-search {
	min-height: 48px;
	padding: 12px 15px;
	border: 1px solid var(--fmos-line);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-size: 0.95rem;
	color: var(--fmos-ink);
	min-width: 0;
}

.fmos-select { flex: 0 1 210px; }

.fmos-searchbox {
	position: relative;
	display: flex;
	align-items: center;
	flex: 1 1 200px;
	min-width: 0;
}

.fmos-searchbox .fmos-icon {
	position: absolute;
	left: 15px;
	width: 18px;
	height: 18px;
	color: #6c736e;
	pointer-events: none;
}

.fmos-search { width: 100%; padding-left: 44px; }

.fmos-select:focus-visible,
.fmos-search:focus-visible {
	outline: none;
	border-color: var(--fmos-green);
	box-shadow: 0 0 0 3px var(--tf-primary-ring, rgba(224, 43, 32, 0.20));
}

.fmos-modebar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.fmos-modes {
	display: inline-flex;
	padding: 4px;
	border-radius: 50px;
	background: var(--fmos-bg);
	gap: 2px;
}

.fmos-when {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid var(--fmos-line);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	font-size: 0.85rem;
	color: var(--fmos-ink);
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.fmos-when:hover { border-color: var(--fmos-green); }
.fmos-when .fmos-icon { width: 16px; height: 16px; color: var(--fmos-green); }

.fmos-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fmos-line);
	border-radius: 12px;
	font: inherit;
	color: var(--fmos-ink);
	background: #fff;
}

.fmos-input:focus-visible { outline: none; border-color: var(--fmos-green); box-shadow: 0 0 0 3px var(--tf-primary-ring, rgba(224, 43, 32, 0.20)); }
.fmos-input--error { border-color: var(--fmos-red); }

textarea.fmos-input { resize: vertical; }

.fmos-modal__actionbar--single { display: block; }

.fmos-mode {
	min-height: 44px;
	padding: 10px 22px;
	border: 0;
	border-radius: 50px;
	background: transparent;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--fmos-ink);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.fmos-mode:hover { background: rgba(16, 18, 15, 0.06); }
/* Brand red keeps the active pill legible in dark mode (--fmos-ink flips light). */
.fmos-mode.is-active { background: var(--tf-primary, #e02b20); color: #fff; }
.fmos-mode:focus-visible { outline: 3px solid var(--fmos-gold); outline-offset: 2px; }

/* ----------------------------------------------------------------- layout */

.fmos-menu__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 30px;
	align-items: start;
}

@media (min-width: 992px) {
	.fmos-menu__layout { grid-template-columns: minmax(0, 1fr) 330px; }
}

.fmos-menu__heading { margin: 0 0 18px; font-size: 1.5rem; }

/* ------------------------------------------------------------------ cards */

/* Two dishes per row, matching the requested layout. */
.fmos-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

/* Three across on desktop, two on tablet, one on a phone. */
@media (max-width: 900px) {
	.fmos-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
	.fmos-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Homepage grid: four across, stepping down with the viewport ---- */

.fmos-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1200px) {
	.fmos-grid--home { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
	.fmos-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/*
 * The row wrappers exist only so each line can scroll on its own on a phone.
 * On wider screens they dissolve, letting the cards sit directly in the grid.
 */
.fmos-row { display: contents; }

/*
 * Phones: each row becomes its own horizontally swiped track, so the two lines
 * move independently rather than scrolling as one block.
 */
@media (max-width: 700px) {
	.fmos-grid--home {
		display: block;
	}

	.fmos-row {
		display: flex;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
		/* Let cards reach the screen edge, hinting there is more to swipe. */
		margin-right: -18px;
		padding-right: 18px;
	}

	.fmos-row::-webkit-scrollbar { display: none; }

	.fmos-row + .fmos-row { margin-top: 14px; }

	.fmos-row .fmos-card {
		flex: 0 0 66%;
		min-width: 0;
		scroll-snap-align: start;
	}

	/* Shorter image so two rows fit comfortably on a phone screen. */
	.fmos-grid--home .fmos-card__media { aspect-ratio: 16 / 11; }
}

.fmos-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--fmos-line);
	border-radius: var(--fmos-radius);
	overflow: hidden;
	cursor: pointer;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fmos-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(16, 18, 15, 0.1); }
.fmos-card:focus-visible { outline: 3px solid var(--fmos-gold); outline-offset: 2px; }
.fmos-card[hidden] { display: none; }

.fmos-card.is-unavailable { cursor: default; opacity: 0.55; }
.fmos-card.is-unavailable:hover { transform: none; box-shadow: none; }

.fmos-card::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: inset 0 0 0 2px transparent;
	transition: box-shadow 0.2s ease;
	pointer-events: none;
}

.fmos-card:hover::after { box-shadow: inset 0 0 0 2px var(--fmos-green); }

.fmos-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--fmos-bg); }

.fmos-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.fmos-card:hover .fmos-card__media img { transform: scale(1.06); }

/* Placeholder for dishes without a photo. */
.fmos-card__ph {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--tf-primary-soft, rgba(224, 43, 32, 0.10)), rgba(246, 160, 26, 0.12));
	color: var(--fmos-green); opacity: 0.55;
}

.fmos-card__ph .fmos-icon { width: 40px; height: 40px; }

.fmos-card__add {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: auto;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fmos-green);
}

.fmos-card__add .fmos-icon { width: 14px; height: 14px; }

.fmos-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	flex: 1;
	padding: 18px;
}

.fmos-card__cat {
	align-self: flex-start;
	padding: 3px 9px;
	border-radius: 30px;
	background: var(--tf-primary-soft, rgba(224, 43, 32, 0.10));
	font-size: 0.63rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9c1a12;
}

.fmos-card__title {
	margin: 0;
	font-family: var(--tf-heading-font, inherit);
	font-size: 1.08rem;
	line-height: 1.25;
	color: var(--fmos-ink);
}

.fmos-card__foot {
	margin-top: auto;
	padding-top: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.fmos-card__price { font-weight: 700; color: var(--fmos-ink); font-variant-numeric: tabular-nums; }

.fmos-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 30px;
	background: var(--tf-primary-tint, rgba(224, 43, 32, 0.14));
	color: var(--fmos-green);
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.fmos-badge--hot { background: rgba(224, 43, 32, 0.12); color: var(--fmos-red); }
.fmos-badge--medium { background: rgba(246, 160, 26, 0.18); color: #8a5b00; }
.fmos-badge--off { background: #eceeea; color: #5b625d; }
.fmos-badge--diet { background: rgba(16, 18, 15, 0.06); color: #3f463f; }

/* Card tag row: spice level and dietary badges */

.fmos-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin-top: 2px;
}

/* Active event-type filter chip */

.fmos-activefilter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding: 12px 18px;
	border-radius: 12px;
	background: var(--tf-primary-soft, rgba(224, 43, 32, 0.10));
	font-size: 0.94rem;
}

.fmos-activefilter a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--fmos-ink);
	font-size: 0.84rem;
	font-weight: 700;
	text-decoration: underline;
}

.fmos-activefilter a .fmos-icon { width: 14px; height: 14px; }
.fmos-activefilter a:hover { color: var(--fmos-red); }

.fmos-grid__more { margin-top: 28px; text-align: center; }

.fmos-empty,
.fmos-noresults {
	grid-column: 1 / -1;
	padding: 34px;
	text-align: center;
	background: var(--fmos-bg);
	border-radius: var(--fmos-radius);
}

/* ---------------------------------------------------------------- summary */

/*
 * Sticky lives on the grid ITEM (the aside), not the inner card. With the
 * layout's `align-items: start`, the aside is only as tall as its content, so a
 * sticky inner card would have no room to travel — the aside itself must be the
 * sticky element for it to follow the page scroll.
 */
.fmos-menu__summary {
	position: sticky;
	top: 96px;
	align-self: start;
}

.fmos-summary {
	background: #fff;
	border: 1px solid var(--fmos-line);
	border-radius: var(--fmos-radius);
	padding: 22px;
	box-shadow: 0 14px 34px rgba(16, 18, 15, 0.06);
}

.fmos-summary__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 16px;
}

.fmos-summary__title { margin: 0; font-size: 1.2rem; }

.fmos-summary__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 8px;
	border-radius: 30px;
	background: var(--fmos-green);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.fmos-summary__empty { text-align: center; padding: 26px 10px; color: #6c736e; }

.fmos-summary__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: var(--fmos-bg);
	color: var(--fmos-green);
}

.fmos-summary__icon .fmos-icon { width: 26px; height: 26px; }

.fmos-line { padding: 12px 0; border-bottom: 1px solid var(--fmos-line); }

.fmos-line__head { display: flex; align-items: baseline; gap: 8px; }
.fmos-line__qty { font-weight: 700; color: var(--fmos-green); }
.fmos-line__name { flex: 1; font-size: 0.94rem; color: var(--fmos-ink); }
.fmos-line__name small { display: block; font-size: 0.78rem; opacity: 0.7; }
.fmos-line__price { font-weight: 700; font-variant-numeric: tabular-nums; }
.fmos-line__notes { margin: 6px 0 0; font-size: 0.82rem; font-style: italic; opacity: 0.8; }

.fmos-line__actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }

.fmos-line__btn {
	width: 30px;
	height: 30px;
	border: 1px solid var(--fmos-line);
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.fmos-line__btn:hover { border-color: var(--fmos-green); color: var(--fmos-green); }
.fmos-line__btn:focus-visible { outline: 2px solid var(--fmos-gold); outline-offset: 1px; }

.fmos-line__remove {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-left: auto;
	border: 0;
	background: none;
	padding: 6px;
	font: inherit;
	font-size: 0.8rem;
	color: var(--fmos-red);
	cursor: pointer;
}

.fmos-line__remove .fmos-icon { width: 14px; height: 14px; }
.fmos-line__remove:hover { text-decoration: underline; }

.fmos-summary__foot { padding-top: 16px; }

.fmos-summary__total {
	display: flex;
	justify-content: space-between;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--fmos-ink);
	margin-bottom: 8px;
}

.fmos-summary__total span:last-child { font-variant-numeric: tabular-nums; }

.fmos-summary__note { margin: 0 0 14px; font-size: 0.8rem; opacity: 0.75; }

.fmos-clear {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	min-height: 40px;
	margin-top: 10px;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.82rem;
	color: #6c736e;
	cursor: pointer;
}

.fmos-clear .fmos-icon { width: 15px; height: 15px; }
.fmos-clear:hover { color: var(--fmos-red); }

/* ----------------------------------------------------------------- modals */

.fmos-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.fmos-modal[hidden] { display: none; }

.fmos-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(16, 18, 15, 0.6);
	backdrop-filter: blur(3px);
	animation: fmos-fade 0.2s ease;
}

.fmos-modal__content {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 540px;
	max-height: min(92vh, 760px);
	overflow: hidden;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 30px 80px rgba(16, 18, 15, 0.35);
	animation: fmos-pop 0.26s cubic-bezier(0.34, 1.3, 0.5, 1);
}

.fmos-modal__content--wide { max-width: 760px; }

@keyframes fmos-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fmos-pop { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }

.fmos-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.92);
	color: var(--fmos-ink);
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(16, 18, 15, 0.14);
	transition: background 0.2s ease, color 0.2s ease;
}

.fmos-modal__close .fmos-icon { width: 20px; height: 20px; }
.fmos-modal__close:hover { background: var(--fmos-red); color: #fff; }
.fmos-modal__close:focus-visible { outline: 3px solid var(--fmos-gold); outline-offset: 2px; }

.fmos-modal__figure {
	margin: 0;
	flex: none;
	aspect-ratio: 16 / 7;
	background: var(--fmos-bg);
	overflow: hidden;
}

.fmos-modal__figure img { width: 100%; height: 100%; object-fit: cover; }

.fmos-modal__body {
	flex: 1 1 auto;
	/*
	 * min-height: 0 is essential: without it a flex child refuses to shrink
	 * below its content height, so the body never scrolls and the long quote
	 * form spills past the sheet and gets clipped by the content's overflow.
	 */
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 26px 28px 22px;
}

.fmos-modal__cat {
	display: inline-block;
	margin-bottom: 10px;
	padding: 4px 11px;
	border-radius: 30px;
	background: var(--tf-primary-soft, rgba(224, 43, 32, 0.10));
	font-size: 0.64rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9c1a12;
}

.fmos-modal__body h2 {
	margin: 0 0 8px;
	padding-right: 40px;
	font-size: 1.7rem;
	line-height: 1.15;
}

.fmos-modal__desc { margin: 0 0 22px; color: #55605b; }

.fmos-modal__label {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--fmos-ink);
}

.fmos-required,
.fmos-optional {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 20px;
}

.fmos-required { color: var(--fmos-red); background: rgba(224, 43, 32, 0.1); }
.fmos-optional { color: #6c736e; background: var(--fmos-bg); }

.fmos-sizes { margin-bottom: 22px; scroll-margin-top: 12px; }
.fmos-sizes.has-error .fmos-size { border-color: rgba(224, 43, 32, 0.4); }
.fmos-sizes.has-error .fmos-modal__label { color: var(--fmos-red); }

.fmos-size-options { display: flex; flex-direction: column; gap: 10px; }

.fmos-size {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	width: 100%;
	min-height: 58px;
	padding: 14px 18px;
	border: 2px solid var(--fmos-line);
	border-radius: 14px;
	background: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.fmos-size:hover { border-color: var(--fmos-green); }
.fmos-size:focus-visible { outline: none; border-color: var(--fmos-green); box-shadow: 0 0 0 3px var(--tf-primary-ring, rgba(224, 43, 32, 0.20)); }
.fmos-size.is-selected { border-color: var(--fmos-green); background: var(--tf-primary-soft, rgba(224, 43, 32, 0.08)); }

.fmos-size__label { position: relative; padding-left: 30px; font-weight: 600; color: var(--fmos-ink); }

.fmos-size__label::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	border: 2px solid var(--fmos-line);
	border-radius: 50%;
	transition: border-color 0.2s ease;
}

.fmos-size.is-selected .fmos-size__label::before {
	border-color: var(--fmos-green);
	background: radial-gradient(var(--fmos-green) 0 5px, transparent 6px);
}

.fmos-size__label small { display: block; padding-left: 0; font-weight: 400; font-size: 0.8rem; color: #6c736e; }
.fmos-size__price { font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--fmos-ink); }

.fmos-modal__field { margin-bottom: 4px; }

.fmos-modal__field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fmos-line);
	border-radius: 12px;
	font: inherit;
	resize: vertical;
}

.fmos-modal__field textarea:focus-visible { outline: none; border-color: var(--fmos-green); box-shadow: 0 0 0 3px var(--tf-primary-ring, rgba(224, 43, 32, 0.20)); }

.fmos-charcount { display: block; margin-top: 5px; text-align: right; font-size: 0.78rem; color: #8a908b; font-variant-numeric: tabular-nums; }

.fmos-modal__actionbar {
	flex: none;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 28px;
	border-top: 1px solid var(--fmos-line);
	background: #fff;
}

.fmos-qty {
	display: flex;
	align-items: center;
	flex: none;
	border: 1px solid var(--fmos-line);
	border-radius: 12px;
	overflow: hidden;
}

.fmos-qty__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 52px;
	border: 0;
	background: #fff;
	cursor: pointer;
	color: var(--fmos-ink);
	transition: background 0.2s ease;
}

.fmos-qty__btn .fmos-icon { width: 16px; height: 16px; }
.fmos-qty__btn:hover { background: var(--fmos-bg); }
.fmos-qty__btn:focus-visible { outline: 2px solid var(--fmos-gold); outline-offset: -2px; }

/*
 * Themes commonly ship a blanket `input[type="number"] { width: 100% }`, which
 * has the SAME specificity as `.fmos-qty input` — so whichever stylesheet loads
 * second wins, and the stepper stretches, shoving the Add button off the edge.
 * The extra class here raises specificity so the fixed width always holds, and
 * the padding/border/background are reset for the same reason.
 */
.fmos-modal__actionbar .fmos-qty input,
.fmos-qty input[type="number"] {
	width: 56px;
	min-width: 56px;
	max-width: 56px;
	height: 52px;
	padding: 0;
	border: 0;
	border-left: 1px solid var(--fmos-line);
	border-right: 1px solid var(--fmos-line);
	border-radius: 0;
	background: #fff;
	text-align: center;
	font: inherit;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	-moz-appearance: textfield;
	appearance: textfield;
	box-shadow: none;
}

.fmos-qty input::-webkit-outer-spin-button,
.fmos-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Keep the stepper from ever growing, whatever the theme does to inputs. */
.fmos-modal__actionbar .fmos-qty { flex: 0 0 auto; max-width: 160px; }

.fmos-btn--add {
	flex: 1 1 auto;
	min-width: 0;
	justify-content: center;
	gap: 10px;
	padding-left: 18px;
	padding-right: 18px;
	letter-spacing: 0.03em;
	text-align: center;
}

.fmos-btn__price { font-variant-numeric: tabular-nums; font-size: 0.95rem; }
.fmos-btn--add.is-waiting { background: var(--fmos-ink); border-color: var(--fmos-ink); }
.fmos-btn--add.is-waiting:hover { background: var(--fmos-green); border-color: var(--fmos-green); }

/* ------------------------------------------------------------------ form */

.fmos-form { max-width: 900px; margin: 0 auto; }
.fmos-form__title { margin-top: 0; }

.fmos-form__items { margin-bottom: 22px; padding: 16px 18px; background: var(--fmos-bg); border-radius: var(--fmos-radius); }
.fmos-form__items h4 { margin: 0 0 10px; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }
.fmos-form__items ul { list-style: none; margin: 0; padding: 0; }
.fmos-form__items li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 0.92rem; border-bottom: 1px dashed var(--fmos-line); }
.fmos-form__items li:last-child { border-bottom: 0; }
.fmos-form__items small { opacity: 0.7; }

.fmos-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }

.fmos-field { margin: 0 0 18px; }
.fmos-form__grid .fmos-field { margin: 0; }
.fmos-field--full { grid-column: 1 / -1; }

.fmos-field label { display: block; margin-bottom: 6px; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.05em; color: var(--fmos-ink); }

.fmos-field input,
.fmos-field select,
.fmos-field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fmos-line);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	color: var(--fmos-ink);
}

.fmos-field input:focus-visible,
.fmos-field select:focus-visible,
.fmos-field textarea:focus-visible { outline: none; border-color: var(--fmos-green); box-shadow: 0 0 0 3px var(--tf-primary-ring, rgba(224, 43, 32, 0.20)); }

.fmos-field.has-error input,
.fmos-field.has-error select { border-color: var(--fmos-red); }

.fmos-hint { font-size: 0.82rem; opacity: 0.75; }
.fmos-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fmos-form__status,
.fmos-notice {
	margin: 0 0 20px;
	padding: 15px 18px;
	border-radius: 10px;
	border-left: 4px solid var(--fmos-green, #e02b20);
	background: var(--tf-primary-soft, rgba(224, 43, 32, 0.10));
	font-size: 0.95rem;
}

.fmos-form__status--error,
.fmos-notice--error { border-left-color: var(--fmos-red, #e02b20); background: rgba(224, 43, 32, 0.09); }

/* --------------------------------------------------------------- buttons */

.fmos-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 30px;
	border: 2px solid var(--fmos-green);
	border-radius: 50px;
	background: var(--fmos-green);
	color: #fff;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.fmos-btn:hover { background: var(--fmos-red); border-color: var(--fmos-red); color: #fff; transform: translateY(-2px); }
.fmos-btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }
.fmos-btn--block { width: 100%; }

.fmos-link {
	margin-top: auto;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--fmos-green);
	text-decoration: none;
}

.fmos-link:hover { color: var(--fmos-red); }

/* -------------------------------------------------------------- services */

.fmos-services { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }

.fmos-service {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--fmos-line);
	border-radius: var(--fmos-radius);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fmos-service:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(16, 18, 15, 0.1); }
.fmos-service__media { aspect-ratio: 16 / 10; overflow: hidden; }
.fmos-service__media img { width: 100%; height: 100%; object-fit: cover; }

.fmos-service__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	margin: 26px 26px 0;
	border-radius: 16px;
	background: var(--tf-primary-soft, rgba(224, 43, 32, 0.10));
	color: var(--fmos-green);
}

.fmos-service__icon .fmos-icon { width: 28px; height: 28px; }

.fmos-service__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 22px 26px 26px; }
.fmos-service__body h3 { margin: 0; font-size: 1.18rem; }
.fmos-service__body h3 a { color: var(--fmos-ink); text-decoration: none; }
.fmos-service__body h3 a:hover { color: var(--fmos-green); }
.fmos-service__body p { margin: 0; font-size: 0.94rem; }
.fmos-service__price { font-weight: 700; color: var(--fmos-green); }

/* ----------------------------------------------------------- event types */

.fmos-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

.fmos-event {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 26px;
	text-align: center;
	background: #fff;
	border: 1px solid var(--fmos-line);
	border-radius: var(--fmos-radius);
	transition: transform 0.25s ease, border-color 0.25s ease;
}

.fmos-event:hover { transform: translateY(-4px); border-color: var(--fmos-gold); }

/*
 * Stretch the link across the whole card so a tap anywhere navigates — small
 * text links are easy to miss on a phone. The heading link stays above it so
 * it is still individually reachable.
 */
.fmos-event .fmos-link::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.fmos-event h3 { position: relative; z-index: 1; }

.fmos-event__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto;
	border-radius: 16px;
	background: rgba(246, 160, 26, 0.14);
	color: #a8690a;
}

.fmos-event__icon .fmos-icon { width: 26px; height: 26px; }
.fmos-event .fmos-link { align-self: center; display: inline-flex; align-items: center; gap: 5px; }
.fmos-event .fmos-link .fmos-icon { width: 14px; height: 14px; }
.fmos-event h3 { margin: 0; font-size: 1.08rem; }
.fmos-event h3 a { color: var(--fmos-ink); text-decoration: none; }
.fmos-event p { margin: 0; font-size: 0.9rem; opacity: 0.85; }

/* ------------------------------------------------------- single item view */

.fmos-details {
	margin-top: 34px;
	padding: 26px;
	background: var(--fmos-bg);
	border: 1px solid var(--fmos-line);
	border-radius: var(--fmos-radius);
}

.fmos-details__list { list-style: none; margin: 0 0 16px; padding: 0; }
.fmos-details__list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--fmos-line); }
.fmos-details__list li:last-child { border-bottom: 0; }
.fmos-details__list small { display: block; opacity: 0.7; font-size: 0.82rem; }

/* ------------------------------------------------------------------ toast */

.fmos-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translate(-50%, 20px);
	z-index: 1100;
	display: flex;
	align-items: center;
	gap: 10px;
	max-width: calc(100vw - 32px);
	padding: 13px 22px;
	border-radius: 50px;
	background: var(--tf-ink, #10120f);
	color: #fff;
	font-size: 0.9rem;
	box-shadow: 0 14px 34px rgba(16, 18, 15, 0.28);
	opacity: 0;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.fmos-toast svg { width: 18px; height: 18px; flex: none; color: var(--fmos-gold, #f6a01a); }
.fmos-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ small print */

@media (max-width: 991px) {
	/* Below the two-column breakpoint the summary flows inline, not sticky. */
	.fmos-menu__summary { position: static; }
}

@media (max-width: 768px) {
	/*
	 * flex-start + a fixed gap, so the column does not distribute the leftover
	 * height as a big empty gap between the filters and the mode bar.
	 */
	.fmos-menu__bar { flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 12px; margin-bottom: 20px; }

	/*
	 * flex: 0 0 auto is the fix for the "wild gap": the filters container
	 * inherits flex: 1 1 340px from desktop, so in the vertical mobile bar it
	 * grew to fill all the leftover height and shoved the mode bar to the
	 * bottom. Pinning it to its content height closes the gap.
	 */
	.fmos-menu__filters { flex: 0 0 auto; flex-direction: column; gap: 10px; }
	.fmos-select,
	.fmos-searchbox { flex: 0 0 auto; width: 100%; }

	/*
	 * Native selects on mobile can render very tall (the browser reserves room
	 * for its picker). Pin the height so the category dropdown matches the
	 * search box instead of towering over it.
	 */
	.fmos-select {
		height: 50px;
		line-height: 1.2;
		padding-top: 0;
		padding-bottom: 0;
		-webkit-appearance: none;
		appearance: none;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236c736e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-position: right 15px center;
		padding-right: 40px;
	}

	.fmos-search { height: 50px; }
	.fmos-modebar { flex-direction: column; align-items: stretch; gap: 10px; }
	.fmos-modes { justify-content: space-between; }
	.fmos-mode { flex: 1 1 auto; padding: 11px 8px; text-align: center; }
	.fmos-when { justify-content: center; width: 100%; }
	.fmos-modal__body { padding: 22px 20px 18px; }
	.fmos-modal__actionbar { padding: 14px 20px; }
}

/*
 * Narrow phones: the stepper spans the row with the −/+ pushed to the edges,
 * and the button sits full width beneath it, so neither is ever clipped.
 */
@media (max-width: 480px) {
	.fmos-modal__actionbar { flex-wrap: wrap; }

	.fmos-modal__actionbar .fmos-qty {
		flex: 1 0 100%;
		max-width: none;
		justify-content: space-between;
	}

	.fmos-btn--add { flex: 1 0 100%; }
}

@media (max-width: 560px) {
	.fmos-modal { align-items: flex-end; padding: 0; }

	.fmos-modal__content,
	.fmos-modal__content--wide {
		max-width: none;
		/*
		 * dvh, not vh: on mobile browsers the address bar counts against vh, so
		 * 94vh overflowed the visible area and clipped the bottom of the quote
		 * form. dvh tracks the *visible* viewport, and the fallback keeps older
		 * browsers working.
		 */
		max-height: 92vh;
		max-height: 92dvh;
		border-radius: 22px 22px 0 0;
		animation: fmos-sheet 0.3s cubic-bezier(0.34, 1.2, 0.5, 1);
	}

	/* The scrolling body clears the home-indicator / gesture bar. */
	.fmos-modal__body { padding-bottom: max(22px, env(safe-area-inset-bottom)); }
	.fmos-modal__actionbar { padding-bottom: max(14px, env(safe-area-inset-bottom)); }

	@keyframes fmos-sheet { from { transform: translateY(100%); } to { transform: none; } }
}

/* ---------------------------------------------------- floating bubble */

/*
 * A quote bubble that floats above the menu on phones. Hidden on desktop, where
 * the sticky summary panel is always in view; shown only once the quote has
 * something in it (JS toggles the hidden attribute).
 */
.fmos-fab {
	position: fixed;
	left: 16px;
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 995;
	display: none;
	align-items: center;
	gap: 9px;
	padding: 13px 20px 13px 16px;
	border: 0;
	border-radius: 50px;
	/* Brand red with white text, regardless of the theme's primary token. */
	background: var(--tf-primary, #e02b20);
	color: #fff;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	box-shadow: 0 12px 30px rgba(16, 18, 15, 0.28);
	animation: fmos-fab-in 0.25s ease;
}

.fmos-fab,
.fmos-fab .fmos-fab__label { color: #fff; }
.fmos-fab .fmos-icon { color: #fff; }

.fmos-fab .fmos-icon { width: 20px; height: 20px; }
.fmos-fab[hidden] { display: none !important; }

.fmos-fab__count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 24px;
	height: 24px;
	padding: 0 6px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 30px;
	/*
	 * Yellow badge with dark text. The --fmos-* tokens are only defined inside
	 * .fmos-menu, and the bubble lives at the page root, so they resolve to
	 * nothing here — use the theme token with an explicit yellow fallback.
	 */
	background: var(--tf-gold, #ffc21a);
	color: #10120f;
	font-size: 0.78rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 2px 6px rgba(16, 18, 15, 0.3);
}

@keyframes fmos-fab-in { from { opacity: 0; transform: translateY(12px) scale(0.9); } to { opacity: 1; transform: none; } }

/* Show the bubble on phones only; the desktop sidebar covers larger screens. */
@media (max-width: 991px) {
	.fmos-fab:not([hidden]) { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
	.fmos-fab { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
	.fmos-card,
	.fmos-service,
	.fmos-event,
	.fmos-btn,
	.fmos-toast,
	.fmos-modal__overlay,
	.fmos-modal__content {
		transition-duration: 0.01ms;
		animation: none;
	}

	.fmos-card:hover,
	.fmos-service:hover,
	.fmos-event:hover { transform: none; }
}
