/* v2.css: the menu app in the design of the new fu-cafe.com (design v2). Loaded after the original styles and overrides them.
   Colours and fonts as in src/styles/global.css: Bordeaux, Ink, Creme, Amber, Grey; Fira Sans for headings, Open Sans for text. */

:root {
	--bordeaux: #6e0e0a;
	--ink: #262a2c;
	--creme: #ece4da;
	--amber: #d8943c;
	--grey: #4c5457;
	--paper: #ffffff;
	--primary-color: var(--bordeaux);
	--secondary-color: var(--amber);
	--main-font: 'Open Sans', system-ui, sans-serif;
	--heading-font: 'Fira Sans', system-ui, sans-serif;
	--z-popup: 1200;
}

body {
	display: block;
	max-width: none;
	margin: 0 !important;
	padding: 0;
	background: var(--creme);
	color: var(--ink);
	font-family: var(--main-font);
	line-height: 1.5;
}

#mainBody {
	max-width: none;
	padding: 0 0 6rem;
	background: transparent;
	border-radius: 0;
}

/* ---------- header and hero ---------- */
.menu-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.75rem max(16px, calc((100% - 50rem) / 2));
	background: var(--ink);
}

.menu-logo img {
	display: block;
	width: 112px;
	height: auto;
	filter: brightness(0) invert(1);
}

.language-flags {
	display: flex;
	gap: 0.35rem;
	margin: 0;
}

.flag {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.3rem 0.6rem 0.3rem 0.35rem;
	border: 1px solid rgb(255 255 255 / 0.25);
	border-radius: 999px;
	background: transparent;
	color: var(--paper);
	font: 700 0.8rem/1 var(--heading-font);
	letter-spacing: 0.04em;
	cursor: pointer;
	transform: none;
}

.flag svg {
	width: 1.15rem;
	height: 1.15rem;
	display: block;
}

.flag.grey {
	filter: none;
	transform: none;
	opacity: 0.8;
}

.flag:not(.grey) {
	background: var(--paper);
	border-color: var(--paper);
	color: var(--ink);
	opacity: 1;
}

.menu-hero {
	position: relative;
	padding: 1.5rem max(16px, calc((100% - 50rem) / 2)) 2.25rem;
	background: radial-gradient(120% 100% at 90% 0%, #3a1512 0%, var(--ink) 60%);
	color: var(--paper);
}

.menu-back {
	display: inline-flex;
	gap: 0.4rem;
	margin-bottom: 1.25rem;
	color: rgb(255 255 255 / 0.75);
	font-size: 0.9rem;
	text-decoration: none;
}

.menu-back:hover,
.menu-back:focus-visible {
	color: var(--paper);
}

.menu-kicker {
	margin: 0 0 0.5rem;
	font: 700 0.8rem/1.2 var(--heading-font);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--amber);
}

.menu-hero h1 {
	margin: 0 0 0.75rem;
	text-align: left;
	font: 900 clamp(2.8rem, 12vw, 4.5rem)/0.92 var(--heading-font);
	letter-spacing: -0.035em;
	color: var(--creme);
}

.menu-promo {
	display: inline-flex;
	gap: 0.4rem;
	margin-top: 1.25rem;
	padding: 0.5rem 1rem;
	border-radius: 999px;
	background: var(--amber);
	color: var(--ink);
	font: 700 0.9rem var(--heading-font);
	text-decoration: none;
}

.menu-promo:hover,
.menu-promo:focus-visible {
	background: var(--creme);
}

#menu-sub {
	max-width: 32rem;
	margin: 0;
	font-size: 1rem;
	color: rgb(255 255 255 / 0.82);
}

/* ---------- search, filter and category bar (sticky) ---------- */
.menu-tools {
	position: sticky;
	top: 0;
	z-index: 1000;
	padding: 0.75rem max(16px, calc((100% - 50rem) / 2)) 0;
	background: rgb(236 228 218 / 0.94);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid rgb(38 42 44 / 0.08);
}

.search-filter-container {
	position: static;
	display: flex;
	gap: 0.5rem;
	height: auto;
	margin: 0;
	padding: 0;
	background: none;
	box-shadow: none;
	border-radius: 0;
}

.menu-tools #search-input {
	flex: 1;
	min-width: 0;
	height: auto;
	margin: 0;
	padding: 0.7rem 1rem;
	border: 1px solid rgb(38 42 44 / 0.15) !important;
	border-radius: 999px !important;
	background: var(--paper);
	color: var(--ink);
	font: 400 1rem var(--main-font);
}

#search-input::placeholder {
	color: var(--grey);
}

#search-input:focus {
	outline: 2px solid var(--bordeaux);
	outline-offset: 1px;
	box-shadow: none;
}

#filter-button {
	flex: none;
	width: auto;
	height: auto;
	padding: 0.7rem 1.25rem;
	border: 0;
	border-radius: 999px;
	background: var(--bordeaux);
	color: var(--paper);
	font: 700 0.95rem var(--heading-font);
	cursor: pointer;
}

.category-jump {
	display: flex;
	gap: 0.4rem;
	overflow-x: auto;
	padding: 0.65rem 0 0.75rem;
	scrollbar-width: none;
}

.category-jump::-webkit-scrollbar {
	display: none;
}

.category-jump a {
	flex: none;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	background: var(--paper);
	color: var(--ink);
	font: 700 0.85rem var(--heading-font);
	text-decoration: none;
	white-space: nowrap;
}

.category-jump a:hover,
.category-jump a:focus-visible {
	background: var(--ink);
	color: var(--paper);
}

/* ---------- list ---------- */
#items-container {
	max-width: 50rem;
	margin: 0 auto;
	padding: 0 16px;
}

.category {
	scroll-margin-top: 8.5rem;
	margin-top: 2rem;
}

.category-title {
	margin: 0 0 0.75rem;
	padding: 0;
	font: 900 clamp(1.6rem, 6vw, 2.1rem)/1.05 var(--heading-font);
	letter-spacing: -0.02em;
	color: var(--ink);
	text-align: left;
}

#items-container .item {
	margin: 0 0 0.5rem;
	padding: 0.85rem 1rem;
	border: 0;
	border-radius: 1rem;
	background: var(--paper);
	box-shadow: 0 1px 2px rgb(38 42 44 / 0.06);
	cursor: pointer;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#items-container .item:hover {
	background: var(--paper);
	box-shadow: 0 0.5rem 1.25rem rgb(38 42 44 / 0.12);
	transform: translateY(-1px);
}

.item-details {
	align-items: flex-start;
	gap: 0.75rem;
}

.item-checkbox {
	flex: none;
	width: 1.2rem;
	height: 1.2rem;
	margin: 0.15rem 0 0 !important;
	transform: none !important;
	accent-color: var(--bordeaux);
	cursor: pointer;
}

.item-name {
	flex: 1;
	min-width: 0;
}

.item h3 {
	margin: 0;
	font: 700 1.05rem/1.25 var(--heading-font);
	color: var(--ink);
}

.item .item-description {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0.2rem 0 0;
	font-size: 0.875rem;
	line-height: 1.4;
	color: var(--grey);
}

.item-details > .item-price {
	flex: none;
}

.item .price,
.item .discount-price {
	margin: 0;
	font: 900 1.05rem/1.25 var(--heading-font);
	color: var(--bordeaux);
	white-space: nowrap;
}

.item .price.crossed {
	position: static;
	transform: none;
	font-size: 0.8rem !important;
	font-weight: 700;
	color: var(--grey);
}

.no-items-message {
	margin: 2rem 0;
	padding: 1.25rem;
	border-radius: 1rem;
	background: var(--paper);
	text-align: center;
}

/* ---------- "Mi Selección" button ---------- */
#saved-items-button.sticky-button {
	position: fixed;
	left: 50%;
	bottom: calc(16px + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	padding: 0.8rem 1.5rem !important;
	border-radius: 999px;
	background: var(--bordeaux);
	color: var(--paper);
	font: 700 1rem var(--heading-font);
	box-shadow: 0 0.75rem 2rem rgb(38 42 44 / 0.3);
}

/* ---------- popups (dish, filter, selection) ---------- */
.overlay {
	background: rgb(38 42 44 / 0.55);
}

.popup {
	border-radius: 1.5rem;
	font-family: var(--main-font);
	color: var(--ink);
}

.popup-title,
#saved-items-content .popup-title,
.saved-items-header h3 {
	font-family: var(--heading-font);
	font-weight: 900;
	color: var(--ink);
}

.popup-price {
	font-family: var(--heading-font);
	font-weight: 900;
	color: var(--bordeaux);
}

.popup-description {
	color: var(--grey);
}

.popup-details .tags span,
.popup-details .tag {
	border-radius: 999px;
}

.popup-close {
	color: var(--ink);
}

.popup-header {
	padding: 1.5rem 3rem 1.25rem;
}

.popup-details .category {
	font-family: var(--heading-font);
	font-weight: 700;
	font-size: 0.8rem;
	letter-spacing: 0.14em;
	color: var(--grey);
}

#filter-popup h3,
.filter-header h3 {
	font-family: var(--heading-font);
	font-weight: 900;
	color: var(--ink);
}

.action-button,
.icon-button,
.delete-all-button {
	font-family: var(--heading-font);
}

input[type='checkbox'] {
	accent-color: var(--bordeaux);
}

@media (prefers-reduced-motion: reduce) {
	.item {
		transition: none;
	}

	.item:hover {
		transform: none;
	}
}

.popup label,
.popup-description,
.popup-details,
.share-option {
	font-family: var(--main-font);
}
