/*
 * Homepage menu grid ([fp_menu_grid]) and its configurator popup.
 * Plain CSS, no SCSS source — edit this file directly.
 */

.fp-menu-grid {
	--fp-green: #2b5346;
	--fp-green-2: #37a03b;
	--fp-ink: #1f2124;
	--fp-muted: #5c6661;
	--fp-tint: #ddeae1;
	margin: 0 auto;
	max-width: 1500px;
}

/* Close the gap under the header: the theme's page wrapper adds 40px and the row another 30px */
.container-wrap:has(.fp-menu-grid) {
	padding-top: 6px !important;
}

.vc_row:has(.fp-menu-grid) {
	padding-top: 0 !important;
}

/* "Delivers ... all over Bulgaria" strip: the page's main heading (h1), so the theme's own
   h1 sizes are overridden */
.fp-menu-grid .fp-menu-grid__banner {
	background: #f3c120;
	border-radius: 999px;
	color: #1f2124;
	font-family: Oswald, sans-serif;
	font-size: clamp(16px, 2.2vw, 26px) !important;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 1.25 !important;
	margin: 0 0 18px;
	padding: 12px 22px;
	text-align: center;
	text-transform: uppercase;
}

.fp-menu-grid__section-title {
	color: var(--fp-ink);
	font-size: clamp(20px, 2.4vw, 28px);
	line-height: 1.2;
	margin: 38px 0 18px;
	text-align: center;
}

/* ── Goal filters: the first line under the navigation ── */
.fp-menu-grid__filters {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin-bottom: 22px;
}

.fp-menu-grid__filter {
	align-items: center;
	background: #fff;
	border: 2px solid var(--fp-green);
	border-radius: 999px !important;
	color: var(--fp-green);
	cursor: pointer;
	display: flex;
	font-size: 16px;
	font-weight: 700;
	gap: 8px;
	justify-content: center;
	line-height: 1.1;
	min-height: 48px;
	padding: 8px 14px;
	transition: background-color .15s, color .15s;
}

.fp-menu-grid__filter svg {
	flex: 0 0 auto;
}

.fp-menu-grid__filter:hover,
.fp-menu-grid__filter[aria-pressed="true"] {
	/* border-box origin: otherwise the gradient starts inside the transparent border and its
	   repeat shows as a thin light line at the left and right edges */
	background: linear-gradient(90deg, var(--fp-green), var(--fp-green-2)) border-box no-repeat;
	border-color: transparent;
	color: #fff;
}

.fp-menu-grid__filter:focus-visible,
.fp-menu-card__button:focus-visible,
.fp-menu-modal__close:focus-visible {
	outline: 3px solid #f59e0b;
	outline-offset: 2px;
}

/* ── Cards: two per row on phones and tablets, four on big screens ── */
.fp-menu-grid__cards {
	display: grid;
	gap: 26px 22px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1100px) {
	.fp-menu-grid__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.fp-menu-card__title {
		font-size: 19px;
	}
}

.fp-menu-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.fp-menu-card[hidden] {
	display: none;
}

.fp-menu-card__image {
	aspect-ratio: 4 / 3;
	background: var(--fp-tint);
	border-radius: 14px;
	display: block;
	overflow: hidden;
	position: relative;
}

.fp-menu-card__image img {
	display: block;
	height: 100% !important;
	object-fit: cover;
	transition: transform .3s;
	width: 100% !important;
}

.fp-menu-card:hover .fp-menu-card__image img {
	transform: scale(1.03);
}

.fp-menu-card__price {
	background: rgba(31, 33, 36, .82);
	border-radius: 999px;
	bottom: 10px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	left: 10px;
	line-height: 1;
	padding: 7px 12px;
	position: absolute;
}

/* Figures under the photo. Each box keeps its number and unit on one line and the boxes share
   the card's full width: a lone calorie box spans it, four boxes sit side by side or wrap. */
.fp-menu-card__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.fp-menu-card__stat {
	align-items: baseline;
	background: var(--fp-tint);
	border-radius: 10px;
	display: flex;
	flex: 1 1 auto;
	gap: 5px;
	justify-content: center;
	padding: 8px 10px;
	white-space: nowrap;
}

.fp-menu-card__stat-value {
	color: var(--fp-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
}

.fp-menu-card__stat-label {
	color: var(--fp-muted);
	font-size: 12px;
	line-height: 1.3;
}

.fp-menu-card__kcal {
	color: var(--fp-muted);
	font-size: 13px;
	line-height: 1.4;
	margin: 8px 0 0;
	padding: 0;
}

.fp-menu-card__title {
	font-size: clamp(17px, 1.8vw, 22px);
	line-height: 1.25;
	margin: 8px 0 12px;
}

.fp-menu-card__title a {
	color: var(--fp-ink);
	text-decoration: none;
}

/* Cake names are long: three lines at most, so the buttons of a row line up */
.fp-menu-card--cake .fp-menu-card__title {
	display: -webkit-box;
	font-size: 16px;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
	text-transform: none;
}

.fp-menu-card__button {
	background: linear-gradient(90deg, var(--fp-green), var(--fp-green-2));
	border-radius: 999px;
	color: #fff !important;
	display: block;
	font-weight: 700;
	line-height: 1.2;
	margin-top: auto;
	padding: 14px 16px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
}

.fp-menu-card__button:hover {
	filter: brightness(1.08);
}

.fp-menu-grid__weekly {
	margin: 26px 0 0;
	padding: 0;
	text-align: center;
}

.fp-menu-grid__weekly-link {
	border: 2px solid var(--fp-green);
	border-radius: 999px;
	color: var(--fp-green);
	display: inline-block;
	font-weight: 700;
	padding: 12px 26px;
	text-decoration: none;
}

.fp-menu-grid__weekly-link:hover {
	background: var(--fp-green);
	color: #fff;
}

@media (max-width: 690px) {
	.fp-menu-grid__filters {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.fp-menu-grid__filter {
		font-size: 15px;
	}

	.fp-menu-grid .fp-menu-grid__banner {
		border-radius: 22px;
		padding: 10px 14px;
	}

	.fp-menu-grid__cards {
		gap: 22px 12px;
	}

	.fp-menu-card__stats {
		gap: 6px;
	}

	.fp-menu-card__stat {
		padding: 7px 6px;
	}

	.fp-menu-card__stat-value {
		font-size: 13px;
	}

	.fp-menu-card__price {
		font-size: 12px;
		padding: 6px 9px;
	}

	/* The theme enlarges h2/h3 on phones (with more specific rules): keep card titles inside
	   their half-width column */
	.fp-menu-grid .fp-menu-card .fp-menu-card__title {
		font-size: 15px !important;
		letter-spacing: .01em !important;
		line-height: 1.25 !important;
		overflow-wrap: anywhere;
	}

	.fp-menu-grid .fp-menu-card--cake .fp-menu-card__title {
		font-size: 14px !important;
	}

	.fp-menu-card__button {
		font-size: 14px;
		padding: 12px 8px;
	}
}

/* ── Popup ── */
.fp-menu-modal {
	inset: 0;
	position: fixed;
	z-index: 100000;
}

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

.fp-menu-modal__backdrop {
	background: rgba(15, 20, 18, .7);
	inset: 0;
	position: absolute;
}

.fp-menu-modal__dialog {
	background: #ddeae1;
	border-radius: 18px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, .45);
	height: min(92vh, 980px);
	left: 50%;
	max-width: 980px;
	overflow: hidden;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: calc(100% - 32px);
}

.fp-menu-modal__frame {
	border: 0;
	display: block;
	height: 100%;
	width: 100%;
}

.fp-menu-modal__loading {
	color: #5c6661;
	left: 0;
	position: absolute;
	right: 0;
	text-align: center;
	top: 45%;
}

.fp-menu-modal__close {
	align-items: center;
	background: #1f2124;
	border: 0;
	border-radius: 50% !important;
	color: #fff;
	cursor: pointer;
	display: flex;
	font-size: 26px;
	height: 40px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 10px;
	top: 10px;
	width: 40px;
	z-index: 2;
}

@media (max-width: 690px) {
	.fp-menu-modal__dialog {
		border-radius: 0;
		height: 100%;
		width: 100%;
	}
}

body.fp-menu-modal-open {
	overflow: hidden;
}

/* The page's own floating widgets (chat bubble, "Доверен сайт" badge, share, cookie button, back-to-top)
   sit above everything, so they would cover the popup's order bar. Hidden while the popup is open. */
body.fp-menu-modal-open #tidio-chat,
body.fp-menu-modal-open .ti-widget.ti-certificate,
body.fp-menu-modal-open .nectar-social.fixed,
body.fp-menu-modal-open .cky-btn-revisit-wrapper,
body.fp-menu-modal-open #to-top {
	display: none !important;
}

/* ── Embed mode: the product page inside the popup's iframe ── */
body.fp-embed {
	background: #ddeae1; /* the configurator's own green, edge to edge */
	margin: 0;
	padding: 0;
}

body.fp-embed .fp-embed__main {
	margin: 0 auto;
	max-width: 900px;
	padding: 14px 14px 150px; /* room for the sticky order bar */
}

body.fp-embed .fppr-configurator {
	margin-top: 0;
}

/* The bar's middle column (average price per component) centred between discount and price */
body.fp-embed .fppr-price-card .fppr-price-card__inner {
	align-items: center;
	gap: 12px;
}

body.fp-embed .fp-embed__title {
	font-size: clamp(22px, 3vw, 30px);
	line-height: 1.2;
	margin: 4px 56px 14px 0; /* clear of the popup's close button */
}

/* Chat, trust badge, share and cookie widgets do not belong inside the popup */
body.fp-embed #tidio-chat,
body.fp-embed .ti-widget.ti-certificate,
body.fp-embed .nectar-social.fixed,
body.fp-embed .cky-btn-revisit-wrapper,
body.fp-embed #to-top {
	display: none !important;
}

/* The order card is always the bottom bar here, whatever the popup's width */
@media (min-width: 1024px) {
	body.fp-embed .fppr-price-card {
		bottom: 0;
		left: 0;
		pointer-events: auto;
		right: 0;
		top: auto;
		width: auto;
	}

	body.fp-embed .fppr-price-card .fppr-price-card__inner {
		align-items: center;
		border-radius: 0;
		display: flex;
		justify-content: space-between;
		padding: 8px 20px;
	}
}

/* ── "Fit Panther® – 100% family company since 2016" section, 25% smaller ──
   Its sizes are inline styles in the page content, hence !important. The row is recognised by
   the stamp image (it has no id or class of its own). */
.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) h2 {
	font-size: 32px !important;
	line-height: 40px !important;
}

.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) h4 {
	font-size: 22px !important;
	line-height: 30px !important;
}

.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) h4 img {
	height: 21px !important;
	width: 21px !important;
}

.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) img[src*="fitpanther-standart-web"] {
	height: auto !important;
	max-width: 150px !important;
	width: 150px !important;
}

@media (max-width: 690px) {
	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) h2 {
		font-size: 26px !important;
		line-height: 32px !important;
	}

	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) h4 {
		font-size: 18px !important;
		line-height: 25px !important;
	}

	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) img[src*="fitpanther-standart-web"] {
		max-width: 120px !important;
		width: 120px !important;
	}
}

/* Same section on phones and tablets, where its two columns stack: drop the tall paddings
   around the text, between text and stamp, and before the next section. */
@media (max-width: 999px) {
	.vc_row:not(.inner_row):has(img[src*="fitpanther-standart-web"]) {
		margin-bottom: 0 !important;
		margin-top: 0 !important;
		padding-bottom: 0 !important;
		padding-top: 18px !important;
	}

	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]),
	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) .vc_column_container,
	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) .wpb_content_element,
	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) .img-with-aniamtion-wrap {
		margin-bottom: 0 !important;
		margin-top: 0 !important;
		padding-bottom: 0 !important;
		padding-top: 0 !important;
	}

	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) .wpb_text_column {
		padding: 0 6px 12px !important;
	}

	.vc_row.inner_row:has(img[src*="fitpanther-standart-web"]) .divider-wrap {
		display: none;
	}

	.vc_row:not(.inner_row):has(img[src*="fitpanther-standart-web"]) + .vc_row {
		margin-top: 0 !important;
		padding-top: 22px !important;
	}

	/* The next section's heading row starts with spacer blocks */
	.vc_row:not(.inner_row):has(img[src*="fitpanther-standart-web"]) + .vc_row .divider-wrap {
		display: none;
	}

	/* ...and the grid above ends with its own padding */
	.vc_row:has(.fp-menu-grid) {
		margin-bottom: 0 !important;
		padding-bottom: 10px !important;
	}
}

/* Popup: the menu's picture in the empty space right of the title, badges and weekly-menu button */
body.fp-embed .fp-embed__product {
	position: relative;
}

body.fp-embed .fp-embed__thumb {
	height: 150px;
	object-fit: contain;
	position: absolute;
	right: 60px; /* clear of the popup's close button */
	top: 0;
	width: 190px;
}

body.fp-embed .fppr-header,
body.fp-embed .fppr-header + .fppr-section {
	margin-right: 260px;
}

@media (max-width: 600px) {
	body.fp-embed .fp-embed__thumb {
		height: 96px;
		right: 0;
		top: 44px; /* under the close button */
		width: 110px;
	}

	body.fp-embed .fppr-header,
	body.fp-embed .fppr-header + .fppr-section {
		margin-right: 118px;
	}
}

/* Popup: the theme makes <body> a flex row, so the content would shrink to its widest visible
   element and jump when the wizard opens; the scrollbar's space is reserved for the same reason. */
body.fp-embed .fp-embed__main {
	box-sizing: border-box;
	width: 100%;
}

html:has(body.fp-embed) {
	overflow-y: scroll;
	scrollbar-gutter: stable;
}

/* Popup: the "choose men's or women's" heading now sits where the weekly-menu button used to be,
   next to the menu picture, so it keeps clear of it too (it wraps instead of running underneath) */
body.fp-embed .fppr-step__prompt {
	margin-right: 260px;
}

@media (max-width: 600px) {
	body.fp-embed .fp-embed__thumb {
		height: 84px;
		top: 40px;
		width: 96px;
	}

	body.fp-embed .fppr-header,
	body.fp-embed .fppr-step__prompt {
		margin-right: 104px;
	}

	/* The size cards always start below the picture, however short the heading is */
	body.fp-embed .fppr-step .fppr-counter-list {
		clear: both;
		margin-top: 4px;
	}

	body.fp-embed .fppr-step__prompt {
		min-height: 44px;
	}
}

/* Card button: cart icon + "Добави" */
.fp-menu-card__button {
	align-items: center;
	display: flex !important;
	gap: 8px;
	justify-content: center;
}

.fp-menu-card__button-icon {
	flex: none;
}

/* A little more air between one row of cards and the next */
.fp-menu-grid__cards {
	row-gap: 42px;
}

@media (max-width: 1099px) {
	.fp-menu-grid__cards {
		row-gap: 34px;
	}
}
