/* ==========================================================================
   Flipbook (assets/js/flipbook.js): revista-meniu și caietul de rețete.
   Se încarcă după restaurant.css și folosește variabilele de acolo.
   ========================================================================== */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.r-dish-art { overflow: hidden; }
.r-dish-art img { width: 100%; height: 100%; object-fit: cover; }
.r-story { max-width: 760px; }

.fb { --page-h: clamp(560px, calc(100svh - 220px), 720px); --paper-c: #fffdf8; }
.fb-stage { position: relative; display: flex; align-items: center; justify-content: center; gap: 16px; perspective: 2600px; }
.fb-book {
	position: relative; flex: none; width: min(1080px, 100% - 128px); height: var(--page-h);
	transform: translateX(var(--shift, 0)); transition: transform .9s cubic-bezier(.45, .05, .25, 1); outline: none;
}
.fb-book:focus-visible { outline: 2px solid var(--red); outline-offset: 12px; border-radius: 16px; }
.fb-leaf {
	position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
	transform-origin: left center; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.45, .05, .25, 1);
}
.fb-face {
	position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden;
	background: var(--paper-c); box-shadow: 0 24px 50px rgba(64, 42, 14, .16);
}
/* Umbra cotorului: pagina din dreapta e mai închisă la stânga, cea din stânga la dreapta. */
.fb-front { border-radius: 4px 16px 16px 4px; }
.fb-back { transform: rotateY(180deg); border-radius: 16px 4px 4px 16px; }
.fb-front::after, .fb-back::after { content: ''; position: absolute; top: 0; bottom: 0; width: 48px; pointer-events: none; z-index: 3; }
.fb-front::after { left: 0; background: linear-gradient(90deg, rgba(64, 42, 14, .18), transparent); }
.fb-back::after { right: 0; background: linear-gradient(-90deg, rgba(64, 42, 14, .18), transparent); }
.fb-scroll .fb-leaf, .fb-scroll .fb-book { transition: none; }

.fb-arrow {
	flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 9999px; border: 1px solid var(--border);
	background: var(--paper); color: var(--ink); font-size: 20px; cursor: pointer; box-shadow: var(--shadow);
	transition: transform .5s var(--ease), background-color .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.fb-arrow:hover:not(:disabled) { background: var(--red); color: #fff; transform: scale(1.06); }
.fb-arrow:active:not(:disabled) { transform: scale(.96); }
.fb-arrow:disabled { opacity: .35; cursor: default; }
.fb-status { margin-top: 24px; text-align: center; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.fb-hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }

/* Căutare */
.fb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 32px; }
.fb-search { position: relative; flex: 1 1 360px; max-width: 520px; }
.fb-search > i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--muted); pointer-events: none; }
.fb-search input {
	width: 100%; padding: 12px 16px 12px 48px; border-radius: 9999px; border: 1px solid var(--border); background: var(--paper);
	font: 500 16px/24px var(--sans); color: var(--ink); box-shadow: 0 6px 18px rgba(64, 42, 14, .06); transition: border-color .3s var(--ease);
}
.fb-search input:focus { outline: none; border-color: var(--red); }
.fb-results {
	position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; max-height: 380px; overflow-y: auto; padding: 8px;
	border-radius: 16px; border: 1px solid var(--border); background: var(--paper); box-shadow: var(--shadow); animation: r-pop .3s var(--ease);
}
.fb-result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; transition: background-color .3s var(--ease); }
.fb-result:hover, .fb-result:focus-visible { background: var(--cream); outline: none; }
.fb-result-img { flex: none; width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.fb-result-text { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 14px; line-height: 20px; }
.fb-result-text span { color: var(--muted); font-size: 13px; }
.fb-result-price { font: 600 16px/24px var(--serif); color: var(--red); white-space: nowrap; }
.fb-result-empty { padding: 12px; color: var(--muted); font-size: 14px; }

/* Semne de carte: panglici care atârnă peste marginea de sus a revistei */
.fb-marks { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; position: relative; z-index: 20; margin-bottom: -18px; padding: 0 64px; }
.fb-mark {
	position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 20px; border: 0; cursor: pointer;
	background: var(--c); color: #fff; font: 600 13px/16px var(--sans);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 10px), 0 100%);
	transform: translateY(-10px); transition: transform .5s var(--ease), filter .3s var(--ease);
}
.fb-mark i { font-size: 16px; }
.fb-mark:hover { transform: translateY(-4px); }
.fb-mark.is-active { transform: translateY(6px); filter: saturate(1.25); }
.fb-mark:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Paginile revistei ---------- */
.mz-page { position: relative; height: 100%; padding: 44px 40px 56px; overflow-y: auto; scrollbar-width: thin; }
.mz-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--c, var(--red)); font-size: 12px; line-height: 16px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.mz-title { margin: 8px 0 16px; font: 600 36px/40px var(--serif); color: var(--ink); }
.mz-cat .mz-title { padding-bottom: 12px; border-bottom: 3px solid var(--c); }
.mz-intro { color: var(--muted); }
.mz-pageno { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font: 500 13px/16px var(--serif); color: var(--muted); }

.mz-items { display: grid; gap: 4px; }
.mz-item { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: start; padding: 12px 8px; border-radius: 12px; }
.mz-item + .mz-item { border-top: 1px dashed var(--border); }
.mz-thumb { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; background: var(--cream); }
.mz-item-body h3 { font: 600 17px/24px var(--serif); }
.mz-item-body p { margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 20px; }
.mz-item-body .r-tags { margin-top: 6px; }
.mz-item-price { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.mz-item-price strong { font: 600 18px/24px var(--serif); color: var(--red); white-space: nowrap; }
.mz-item-price span { font-size: 12px; color: var(--muted); }
.mz-item.is-hit { animation: mz-hit 2.4s var(--ease); }
@keyframes mz-hit { 0%, 40% { background: var(--gold-soft); box-shadow: 0 0 0 2px var(--gold); } 100% { background: transparent; box-shadow: 0 0 0 2px transparent; } }

/* Coperta */
.mz-cover { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; color: #fff; background: var(--green); }
.mz-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Voal închis peste poză, ca textul să se citească (pe poză, nu pe fundalul paginii). */
.mz-cover::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20, 14, 8, .6), rgba(20, 14, 8, .05) 35%, rgba(20, 14, 8, .25) 55%, rgba(20, 14, 8, .88)); }
.mz-cover > div { position: relative; z-index: 2; }
.mz-cover-top { display: flex; flex-direction: column; }
.mz-mast-small { font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; color: #f0b6ae; }
.mz-mast { font: 600 60px/60px var(--serif); letter-spacing: -0.02em; }
.mz-edition { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .4); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.mz-cover-title { font: 600 48px/52px var(--serif); }
.mz-cover-bottom p { margin-top: 8px; color: #f3e9da; }
.mz-teasers { display: grid; gap: 4px; margin-top: 24px; }
.mz-teasers button {
	display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid rgba(255, 255, 255, .3);
	background: none; color: #fff; font: 600 15px/20px var(--sans); text-align: left; cursor: pointer; transition: color .3s var(--ease);
}
.mz-teasers button:hover { color: #f0b6ae; }
.mz-teaser-p { font: 500 13px/16px var(--serif); opacity: .8; white-space: nowrap; }

/* Cuprins */
.mz-toc { display: grid; gap: 4px; margin-top: 24px; }
.mz-toc button {
	display: flex; align-items: baseline; gap: 12px; width: 100%; padding: 12px 8px; border: 0; border-radius: 8px; background: none;
	font: 600 20px/28px var(--serif); color: var(--ink); cursor: pointer; text-align: left; transition: background-color .3s var(--ease), color .3s var(--ease);
}
.mz-toc button:hover { background: var(--cream); color: var(--c); }
.mz-toc i { align-self: center; font-size: 22px; color: var(--c); }
.mz-toc-dots { flex: 1; border-bottom: 2px dotted var(--border); }
.mz-toc-p { font-size: 16px; color: var(--muted); }
.mz-legend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.mz-legend-title { margin-right: 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Ofertă */
.mz-adpage { display: flex; flex-direction: column; gap: 24px; }
.mz-adpage > .r-btn { align-self: flex-start; }
.mz-ad { position: relative; overflow: hidden; padding: 32px; border-radius: 16px; background: var(--red); color: #fff; }
.mz-ad .mz-title { color: #fff; margin-bottom: 8px; }
.mz-kicker-inv { color: #f9d2cc; }
.mz-ad-price { display: block; font: 600 48px/48px var(--serif); color: var(--gold-soft); }
.mz-ad p { position: relative; z-index: 1; max-width: 60%; margin-top: 12px; color: #fbe1dc; }
.mz-ad-img { position: absolute; right: -40px; bottom: -40px; width: 200px; height: 200px; border-radius: 9999px; object-fit: cover; border: 6px solid rgba(255, 255, 255, .25); }
.mz-allergens { padding: 24px; border-radius: 16px; background: var(--gold-soft); }
.mz-allergens h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 600 18px/24px var(--serif); color: #7a5200; }
.mz-allergens p { color: #6b4e00; font-size: 14px; }

/* Coperta din spate */
.mz-back { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 16px; padding: 48px; background: var(--green); color: var(--cream); }
.mz-back .r-brand-mark { width: 56px; height: 56px; font-size: 30px; background: var(--cream); color: var(--red); }
.mz-back p { color: #c9d6c8; }
.mz-back ul { display: grid; gap: 8px; margin-top: 16px; font-size: 14px; }
.mz-back li { display: flex; align-items: center; gap: 8px; }

/* ---------- Caietul de rețete (Despre noi) ---------- */
.fb-scroll { --page-h: min(600px, calc(100svh - 300px)); --paper-c: #fbf6ea; position: relative; height: calc((var(--leaves) + 1.2) * 100svh); }
.fb-sticky { position: sticky; top: 72px; height: calc(100svh - 72px); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.admin-bar .fb-sticky { top: 104px; height: calc(100svh - 104px); }
.fb-scroll-head { display: flex; flex-direction: column; align-items: center; margin-bottom: 32px; text-align: center; }
.fb-scroll-head .r-h2 { margin-bottom: 8px; }
.fb-scroll .fb-book { width: min(940px, 100% - 32px); }

.bk-page {
	position: relative; height: 100%; padding: 40px 44px; overflow: hidden; color: #26324a;
	background-image: repeating-linear-gradient(transparent 0 31px, #dfe7f3 31px 32px); background-position: 0 72px;
}
.bk-page h3 { margin-bottom: 12px; font: 600 28px/32px var(--serif); color: #1f3b70; }
.bk-page h4 { margin: 16px 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.bk-page p, .bk-page li { font: 500 16px/32px var(--serif); }
.bk-page li::before { content: '— '; color: var(--red); }
.bk-date { display: inline-block; margin-bottom: 8px; font: 600 14px/16px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.bk-tip { margin-top: 12px; padding: 8px 12px; border-radius: 8px; background: rgba(201, 138, 18, .14); line-height: 24px !important; }
.bk-sign { margin-top: 8px; text-align: right; font-size: 20px !important; color: var(--red); }
.bk-pageno { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; font: 500 13px/16px var(--serif); color: #8a93a6; }
.bk-photo { margin: 12px 0; padding: 8px 8px 24px; background: #fff; box-shadow: 0 8px 20px rgba(38, 50, 74, .18); transform: rotate(1.5deg); }
.bk-photo-tilt { transform: rotate(-2deg); }
.bk-photo img { display: block; width: 100%; height: 150px; object-fit: cover; }
.bk-letter .bk-photo img { height: 170px; }
.bk-last { display: flex; flex-direction: column; align-items: flex-start; }
.bk-last .r-btn { margin-top: 16px; }
.bk-endpaper { background: #e9dfc9; }

.bk-cover {
	position: relative; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 48px;
	background: #2f4f8a radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px) 0 0 / 6px 6px; color: #e8eefb; text-align: center;
}
.bk-cover-band { position: absolute; left: 0; right: 0; top: 48px; height: 16px; background: var(--band) repeat-x center / 48px 16px; }
.bk-cover-year { font: 600 72px/1 var(--serif); }
.bk-cover-title { font: 600 36px/40px var(--serif); letter-spacing: .04em; }
.bk-cover p { color: #c7d3ee; }
.bk-cover > i { margin-top: 24px; font-size: 56px; color: #f0b6ae; }

/* ---------- Ajustări pentru designul premium (restaurant.css) ---------- */
.r-section-mz { background: var(--bone); }
.r-story { max-width: none; }
.fb-arrow { border-radius: 0; box-shadow: none; background: transparent; border-color: rgba(27, 22, 17, .3); }
.fb-arrow:hover:not(:disabled) { background: var(--night); color: var(--bone); transform: none; }
.fb-search input { border-radius: 0; border-color: transparent; border-bottom-color: rgba(27, 22, 17, .35); background: transparent; box-shadow: none; padding-left: 36px; font: 500 20px/28px var(--serif); }
.fb-search > i { left: 4px; }
.fb-results { border-radius: 0; }
.fb-result, .fb-result-img { border-radius: 0; }
.fb-mark { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.fb-front { border-radius: 2px 6px 6px 2px; }
.fb-back { border-radius: 6px 2px 2px 6px; }
.fb-face { box-shadow: 0 30px 60px rgba(20, 17, 13, .22); }
.mz-title { font-size: 44px; line-height: 44px; font-weight: 500; }
.mz-item-body h3 { font-size: 21px; line-height: 26px; }
.mz-item-price strong, .fb-result-price { font-size: 22px; }
.mz-thumb { border-radius: 0; }
.mz-toc button { font-size: 24px; border-radius: 0; }
.mz-mast { font-size: 72px; line-height: 64px; font-weight: 600; }
.mz-cover-title { font-size: 56px; line-height: 56px; font-weight: 500; }
.mz-ad, .mz-allergens { border-radius: 0; }
.mz-ad { background: var(--wine); }
.mz-ad-price { font-size: 64px; line-height: 60px; }
.mz-back { background: var(--night); }
.mz-back .r-brand-mark { display: none; }
.mz-pageno, .bk-pageno { font-size: 15px; }
/* Numărul paginii vine după conținut, ca să nu se suprapună când pagina e scurtă. */
.mz-page { display: flex; flex-direction: column; padding-bottom: 20px; }
.mz-page .mz-pageno { position: static; margin-top: auto; padding-top: 16px; }
@media (max-width: 1240px) {
	.fb-marks { gap: 4px; padding: 0 40px; }
	.fb-mark { padding: 8px 10px 18px; font-size: 10px; letter-spacing: .1em; }
	.fb-mark i { display: none; }
}
.mz-adpage > .r-btn { align-self: stretch; }

/* Caietul pe fundal închis */
.fb-scroll .fb-scroll-head .r-label { color: var(--brass-light); margin-bottom: 16px; }
.fb-scroll .fb-hint { color: var(--muted-inv); }
.fb-scroll .fb-status { color: var(--muted-inv); }
.fb-scroll .fb-face { box-shadow: 0 40px 80px rgba(0, 0, 0, .5); }
.bk-page h3 { font-size: 34px; line-height: 36px; }
.bk-page p, .bk-page li { font-size: 19px; }
.bk-tip { font-size: 17px !important; }

@media (prefers-reduced-motion: reduce) {
	.fb-leaf, .fb-book { transition: none; }
	.fb.is-single .fb-face.is-entering, .fb.is-single .fb-face.is-entering-back { animation: none; }
}
