/* Family "grid": shop-window masonry. Tokens: --bg, --surface (cards), --accent (prices, active chip),
   --fm-display (brand + names), --radius (cards). fx ratio: mixed | square, tabbar. Card var: --r (photo ratio). */
.fm--grid { background: var(--bg); }
.fm--grid .fm-app { background: var(--bg); }

.fmg-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; padding: max(14px, env(safe-area-inset-top)) 14px 6px; text-align: center; }
.fmg-head__mark.mz-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent-ink); font-size: 22px; overflow: hidden; }
.fmg-head__mark img { width: 100%; height: 100%; object-fit: cover; }
.fmg-name { margin: 0; font-family: var(--fm-display); font-weight: var(--fm-display-weight); font-size: clamp(30px, 9.4vw, 44px); line-height: 1; letter-spacing: -.01em; color: var(--ink); }
.fmg-name i { font-style: normal; color: var(--accent); font-weight: 500; }
.fmg-tagline { margin: 6px 0 0; font-size: 11px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); }
.fmg-head .fm-round { background: transparent; box-shadow: none; font-size: 24px; }
.fmg-head__sub { grid-column: 1 / -1; display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.fmg-head__sub .fm-lang.mz-lang { height: 38px; } .fmg-head__sub .fm-lang.mz-lang a { height: 30px; min-width: 32px; }
.fmg-head__sub .fm-round { width: 38px; height: 38px; font-size: 16px; }
.fmg-about { margin: 6px 22px 0; color: var(--muted); font-size: 14px; line-height: 1.5; text-align: center; }
.fmg-extras { padding: 14px 14px 0; }

.fmg-chips { position: sticky; top: 0; z-index: 30; padding: 10px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.fmg-chips__track { display: flex; gap: 8px; overflow-x: auto; padding: 2px 14px 4px; scrollbar-width: none; }
.fmg-chips__track::-webkit-scrollbar { display: none; }
.fmg-chip { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--surface); color: var(--ink); font-family: var(--fm-display); font-size: 16px; font-weight: 500; text-decoration: none; box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 14px -10px rgba(0,0,0,.25); transition: background .25s ease, color .25s ease, transform .4s var(--fm-spring); }
.fmg-chip.is-on { background: var(--accent); color: var(--on-accent); transform: scale(1.04); }

.fmg-grid { columns: 2; column-gap: 12px; padding: 6px 14px 0; }
.fmg-head2 { column-span: all; display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 10px; font-family: var(--fm-display); font-weight: var(--fm-display-weight); font-size: 24px; line-height: 1.1; scroll-margin-top: 80px; }
.fmg-head2:first-child { margin-top: 6px; }
.fmg-head2 small { font-family: var(--font-b); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.fmg-card { position: relative; display: block; break-inside: avoid; margin-bottom: 12px; overflow: hidden; border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 14px 28px -20px rgba(60, 30, 30, .35); transition: transform .4s var(--fm-spring); }
.fmg-card:active { transform: scale(.97); }
.fmg-card__img { display: block; aspect-ratio: var(--r); overflow: hidden; }
.fmg-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--fm-ease); }
.fmg-card:hover .fmg-card__img img { transform: scale(1.05); }
.fmg-card__ic { display: grid; place-items: center; height: 74px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); color: var(--accent-ink); font-size: 26px; }
.fmg-card__pick { position: absolute; top: 10px; left: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--accent-ink); font-size: 15px; }
.fmg-card__tx { display: grid; gap: 4px; padding: 11px 13px 13px; }
.fmg-card .mz-item__name { margin: 0; font-family: var(--fm-display); font-size: 17px; font-weight: 500; line-height: 1.2; color: var(--ink); }
.fmg-card .mz-item__price { color: var(--accent-ink); font-family: var(--fm-display); font-weight: 700; font-size: 18px; }
.fmg-card .mz-item__desc { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }

.fmg-foot { padding: 20px 14px 30px; text-align: center; }
.fmg-foot.has-bar { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.fmg-bar { position: fixed; z-index: 40; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); display: flex; width: calc(min(100vw, var(--maxw)) - 20px); transform: translateX(-50%); padding: 6px; border-radius: 26px; background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: 0 18px 40px -18px rgba(60, 30, 30, .45), 0 0 0 1px var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.fmg-bar__a { flex: 1; min-width: 0; display: grid; justify-items: center; gap: 3px; min-height: 58px; padding: 8px 2px; border-radius: 20px; color: var(--ink); font-size: 11.5px; font-weight: 600; text-decoration: none; transition: background .25s ease, transform .4s var(--fm-spring); }
.fmg-bar__a .icon { font-size: 24px; stroke-width: 1.4; }
.fmg-bar__a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmg-bar__a.is-on { background: var(--surface); color: var(--accent-ink); transform: translateY(-2px); }
html.mz-hero-embed .fmg-bar { position: absolute; }
