Files
smartmenu-collina/src/app/globals.css
T
Jorem Juárez 6cda59387c Public menu UX fixes: brand header, FABs, consultant add/carousel, modal safe-area
B1 brand header: shorter banner (h-36), avatar centered over the banner's lower
edge (z-10, no clipping/layout push), and a compact name-only header when neither
banner nor logo is set (no giant gray gradient block). Banner stays edge-to-edge
behind the island when an image exists.

B2 FABs: reorganized into an ordered bottom-right vertical stack that never
overlaps each other or covers dish names/prices; the global 'more' button is now a
distinct ⋯ (was a '+', which clashed with the per-dish add '+'). Container
padding-bottom raised (pb-48) so the last dish is never hidden behind the FABs.

B3 consultant add-to-cart: each recommendation (direct and complement) resolves to
a real product by name and shows an 'Agregar' button that adds to the shared cart
(badge updates) — only when orders are enabled.

B4 consultant carousel: reuses SuggestionCarousel at the bottom of the consultant,
contextual to the cart, only when orders are on and pairings exist.

B5 safe-area: new .safe-modal padding (top+bottom env insets) on the consultant and
cart sheets so content clears the island and gesture bar; layout unchanged.

Suggestion computation + name resolution lifted into PublicMenu and shared by the
cart and consultant (no duplicated logic). No new i18n keys. Build passes; public
page renders in both header modes with no runtime errors.
2026-06-15 18:01:07 -06:00

131 lines
3.4 KiB
CSS

@tailwind base;
@tailwind components;
@tailwind utilities;
:root {
/* Default restaurant palette (overridden per-restaurant at runtime). */
--bg: #f4f1ec;
--bg-2: #e9e3da;
--surface: rgba(255, 255, 255, 0.55);
--accent: #b45309;
--text: #2a2520;
--tab: rgba(255, 255, 255, 0.45);
}
html,
body {
padding: 0;
margin: 0;
min-height: 100%;
}
body {
color: var(--text);
font-family: var(--font-inter), system-ui, sans-serif;
background:
radial-gradient(1200px 800px at 80% -10%, rgba(255, 255, 255, 0.6), transparent 60%),
radial-gradient(1000px 700px at -10% 110%, rgba(255, 255, 255, 0.4), transparent 55%),
linear-gradient(160deg, var(--bg), var(--bg-2));
background-attachment: fixed;
}
@layer components {
.glass {
background: var(--surface);
backdrop-filter: blur(18px) saturate(140%);
-webkit-backdrop-filter: blur(18px) saturate(140%);
border: 1px solid rgba(255, 255, 255, 0.6);
box-shadow:
0 8px 32px rgba(31, 38, 135, 0.08),
inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.glass-soft {
background: rgba(255, 255, 255, 0.35);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255, 255, 255, 0.5);
}
.glass-pill {
background: var(--tab);
backdrop-filter: blur(14px);
-webkit-backdrop-filter: blur(14px);
border: 1px solid rgba(255, 255, 255, 0.55);
}
.display {
font-family: var(--font-fraunces), Georgia, serif;
}
}
/* 3D flip card primitives */
.flip-scene {
perspective: 1400px;
}
.flip-card {
position: relative;
transform-style: preserve-3d;
transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.flip-card.is-flipped {
transform: rotateY(180deg);
}
.flip-face {
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
position: absolute;
inset: 0;
}
.flip-front {
position: relative;
}
.flip-back {
transform: rotateY(180deg);
}
/* hide horizontal scrollbar on section tabs */
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.no-scrollbar {
-ms-overflow-style: none;
scrollbar-width: none;
}
/* Safe-area helpers for edge-to-edge layout (viewport-fit=cover).
The background covers behind the notch / dynamic island and gesture bar, while
interactive content is padded so it isn't covered. On devices without insets
env() resolves to 0, so spacing matches the previous values. */
@layer utilities {
/* public menu header */
.safe-pt-header {
padding-top: calc(env(safe-area-inset-top, 0px) + 1.25rem);
}
/* editor header */
.safe-pt-editor {
padding-top: calc(env(safe-area-inset-top, 0px) + 1rem);
}
/* sticky section tabs keep clear of the island when scrolled */
.safe-top-sticky {
top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
}
/* public floating action buttons clear the gesture bar */
.safe-bottom-fab {
bottom: calc(env(safe-area-inset-bottom, 0px) + 1.25rem);
}
/* editor bottom tab bar clears the gesture bar */
.safe-pb-tabbar {
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.5rem);
}
/* absolute overlay on the brand banner, kept clear of the island */
.safe-abs-top {
top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
}
/* full-screen modal/sheet overlays: keep content clear of island + gesture bar */
.safe-modal {
padding-top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
}
}